-
- Downloads
[FIX] web: handle 'domain' key returned by onchanges
Onchange RPCs return an object that may contain a 'domain' key. When it does, its value is an object whose keys are field names and values are the new domain for the corresponding field. Before this rev., the 'domain' key was totally ignored by the BasicModel. This feature is used for example in the account.payment form view (go to an open invoice, click on 'Register payment'): the domain of field payment_method_id is updated by the onchanges (e.g. when changing the journal_id). As the domain was ignored, it always displayed all possible payment methods.
Showing
- addons/web/static/src/js/fields/relational_fields.js 74 additions, 30 deletionsaddons/web/static/src/js/fields/relational_fields.js
- addons/web/static/src/js/views/basic/basic_model.js 9 additions, 1 deletionaddons/web/static/src/js/views/basic/basic_model.js
- addons/web/static/src/xml/base.xml 5 additions, 9 deletionsaddons/web/static/src/xml/base.xml
- addons/web/static/tests/fields/relational_fields_tests.js 150 additions, 0 deletionsaddons/web/static/tests/fields/relational_fields_tests.js
Loading
Please register or sign in to comment