diff options
| author | Géry Debongnie <ged@odoo.com> | 2017-11-15 11:45:26 +0100 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2017-11-15 13:48:49 +0100 |
| commit | 6158c5ce04589d7e51928d2d19aa5b2eec05cebf (patch) | |
| tree | 5e823c95e32ac0054e93577468439fd1249b240a /addons/web/static/src/js/fields/relational_fields.js | |
| parent | 6d616c566f8fbd49d277720c04abd079a04ced76 (diff) | |
[FIX] web: fix issue with combination of o2m, m2m, and m2o
Consider this: a form view with a one2many list view. In the one2many
list view, there is a many2one field. When opening the manyone in a
modal form view, there is a many2many field. In that situation,
clicking on 'Add a new record' on the many2many field had the
unfortunate effect of interfering with the one2many field in the main
form view, which caused a crash or the modal form view to close
unexpectedly.
The issue is that an event was simply not properly stopped at the proper
location. This is usually not a big deal, but, as described above, it can be
a problem in some cases.
Diffstat (limited to 'addons/web/static/src/js/fields/relational_fields.js')
| -rw-r--r-- | addons/web/static/src/js/fields/relational_fields.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/web/static/src/js/fields/relational_fields.js b/addons/web/static/src/js/fields/relational_fields.js index c9e6f218895..e7cd2e1eebf 100644 --- a/addons/web/static/src/js/fields/relational_fields.js +++ b/addons/web/static/src/js/fields/relational_fields.js @@ -1191,9 +1191,13 @@ var FieldMany2Many = FieldX2Many.extend({ * * @override * @private + * @param {OdooEvent|MouseEvent} ev this event comes either from the 'Add + * record' link in the list editable renderer, or from the 'Create' button + * in the kanban view */ - _onAddRecord: function () { + _onAddRecord: function (ev) { var self = this; + ev.stopPropagation(); var domain = this.record.getDomain({fieldName: this.name}); |
