diff options
| author | Géry Debongnie <ged@odoo.com> | 2017-09-18 11:49:39 +0200 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2017-09-18 13:48:50 +0200 |
| commit | b3aa323919ef6e504dce818a5391c8d9db90e700 (patch) | |
| tree | d72b5e35aa03569d00f2b662cdeb13a1947f73a7 /addons/web/static/src/js | |
| parent | 52c57b4f1192590b987ce9e1a2cdffb99eb5add4 (diff) | |
[FIX] web: prevent crash sometimes when sorting one2many
Before this commit, there was a crash when sorting a one2many in a form view.
This is due to the fact that the event from the one2many bubbled up to
the main form view, which basically assumed that it was supposed to sort
some sub one2many.
It could be seen for example when editing a 'attribute' in a product
form view (need to activate variants), then sorting the 'attribute
values' sub one2many.
With this commit, we simply stop the event propagation at the correct
level.
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/views/form/form_controller.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/web/static/src/js/views/form/form_controller.js b/addons/web/static/src/js/views/form/form_controller.js index 611847ac3f4..df5ce2cc2c1 100644 --- a/addons/web/static/src/js/views/form/form_controller.js +++ b/addons/web/static/src/js/views/form/form_controller.js @@ -514,6 +514,7 @@ var FormController = BasicController.extend({ * @param {OdooEvent} event */ _onToggleColumnOrder: function (event) { + event.stopPropagation(); this.model.setSort(event.data.id, event.data.name); var field = event.data.field; var state = this.model.get(this.handle); |
