#4305 (An alternative to the FOO_changed method)
by Luc Saffre · in Developers · assigned to Luc Saffre
Kurzbeschreibung
Kinder
Kommentare
- 5 Jahre, 2 Monate ago von Luc Saffre about #4305 (An alternative to the FOO_changed method) : At the moment the Store.form2obj() method collects the field triggers again and again for every submit. That's suboptimal.
- 5 Jahre, 2 Monate ago von Luc Saffre about #4305 (An alternative to the FOO_changed method) : My plan is to add a method Model.get_field_change_triggers(), which searches for FOO_changed methods at startup and stores an attribute _lino_change_triggers on every field that has at least one trigger. Application developers can override this method to add field change triggers without defining a ...
- 5 Jahre, 2 Monate ago von Luc Saffre about #4305 (An alternative to the FOO_changed method) : The FOO_changed approach is proven and venerable and heavily used... but it is anti-pythonic. It doesn't work well when using multiple model plugins. For example Voucher.payment_term_changed and Payable.payment_term_changed() need manual fiddling.