diff options
| author | Julien Mougenot <jum@odoo.com> | 2019-09-30 09:57:21 +0000 |
|---|---|---|
| committer | Julien Mougenot <jum@odoo.com> | 2019-10-07 11:22:04 +0000 |
| commit | da2b24714616bfbaf3ed7834844618207ec6ca2c (patch) | |
| tree | f21539e7c4d4bd7cfa7b958e959332710cf00346 /addons/web/static/tests/fields | |
| parent | 0f412d56d6fa3f53e7a15b7eba87863334497cf0 (diff) | |
[FIX] web: m2o updates its value after reload
Changes the behaviour of many2ones when their value is changed via a form dialog.
Before this commit, when editing a m2o with a form dialog opened by an external button,
the field triggered an onchange with its old value before reloading its widget.
This caused the edition in list views to display outdated information when
saving multiple records.
Now, the reload is executed first, then the onchange occurs so that the value is
the newly updated one.
Part of task 2078807
closes odoo/odoo#37576
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Diffstat (limited to 'addons/web/static/tests/fields')
| -rw-r--r-- | addons/web/static/tests/fields/relational_fields/field_many2one_tests.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/tests/fields/relational_fields/field_many2one_tests.js b/addons/web/static/tests/fields/relational_fields/field_many2one_tests.js index a8743a4cddf..081bd4e3598 100644 --- a/addons/web/static/tests/fields/relational_fields/field_many2one_tests.js +++ b/addons/web/static/tests/fields/relational_fields/field_many2one_tests.js @@ -557,7 +557,7 @@ QUnit.module('fields', {}, function () { // save the modal and make sure an onchange is triggered await testUtils.dom.click($('.modal .modal-footer .btn-primary').first()); - assert.verifySteps(['read', 'get_formview_id', 'load_views', 'read', 'write', 'onchange', 'read']); + assert.verifySteps(['read', 'get_formview_id', 'load_views', 'read', 'write', 'read', 'onchange']); // save the main record, and check that no extra rpcs are done (record // is not dirty, only a related record was modified) |
