diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2020-05-25 14:41:42 +0000 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2020-05-27 16:56:19 +0000 |
| commit | 9d40ec7d15898ee9f3d2a92c7264690586c35cd8 (patch) | |
| tree | 501e37bd8c702b9299c9595e3b77236d9e73afc6 /addons/web/static/src/js/views/basic | |
| parent | ba20e42cc3acdb16f7dffb5d15e8d9cdf9f153ce (diff) | |
[FIX] web: resquencing stop at first controller
When a resequencing is done inside an object hierarchy of two
controllers, since 9b90d8727d we would call resquencing code one time
per controller.
So if for example we are in a list view inside a form view (eg. a
"Search More" modal in a form view) the resequencing would work for the
list view, but then cause traceback when it is handled by form view.
With this changeset, the first controller that get the event
`resequence_records` even gobbles it up.
Without change, added test fails because of original traceback:
Cannot read property 'res_id' of undefined@ 202 ms
Source:
TypeError: Cannot read property 'res_id' of undefined
at /web/static/src/js/views/basic/basic_controller.js:744:67
...
opw-2256818
closes #51827
closes odoo/odoo#52018
X-original-commit: eef4b99fdb9469c040af80d055933eda367b7b3d
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic')
| -rw-r--r-- | addons/web/static/src/js/views/basic/basic_controller.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/web/static/src/js/views/basic/basic_controller.js b/addons/web/static/src/js/views/basic/basic_controller.js index f652820e814..6434554d376 100644 --- a/addons/web/static/src/js/views/basic/basic_controller.js +++ b/addons/web/static/src/js/views/basic/basic_controller.js @@ -749,6 +749,7 @@ var BasicController = AbstractController.extend(FieldManagerMixin, { * @param {string} ev.data.handleField */ _onResequenceRecords: function (ev) { + ev.stopPropagation(); // prevent other controllers from handling this request this.trigger_up('mutexify', { action: async () => { let state = this.model.get(this.handle); |
