summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_model.js
diff options
context:
space:
mode:
authorNans Lefebvre <len@odoo.com>2018-12-18 12:01:22 +0000
committerNans Lefebvre <len@odoo.com>2018-12-18 14:28:55 +0000
commitddc5cc186fc6e2efa92fea6a83ad4bbed72d648c (patch)
treebcb726b551e613c3ee1b53a4050eebc5f129089b /addons/web/static/src/js/views/basic/basic_model.js
parent9b6073c3ea6264f59fb11e6f797f4fff200c3d5d (diff)
[FIX] web: call _applyX2ManyChange with the correct viewtype
Have a one2many display records in a kanban subview, which opens a form view when edited. Edit a field displayed only on the form view. A call to _applyX2ManyChange is done without giving it the viewtype argument, therefore the fieldinfo is taken from the wrong view, traceback ensues. opw 1914163 closes odoo/odoo#29607
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_model.js')
-rw-r--r--addons/web/static/src/js/views/basic/basic_model.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web/static/src/js/views/basic/basic_model.js b/addons/web/static/src/js/views/basic/basic_model.js
index cc923642047..c9e28db86c6 100644
--- a/addons/web/static/src/js/views/basic/basic_model.js
+++ b/addons/web/static/src/js/views/basic/basic_model.js
@@ -1937,7 +1937,7 @@ var BasicModel = AbstractModel.extend({
addDef = this._applyX2ManyChange(record, fieldName, {
operation: 'ADD_M2M',
ids: values
- });
+ }, viewType);
}
if (removedIds.length) {
var listData = _.map(list.data, function (localId) {
@@ -1951,7 +1951,7 @@ var BasicModel = AbstractModel.extend({
}
return _.findWhere(listData, {res_id: resID}).id;
}),
- });
+ }, viewType);
}
return $.when(addDef, removedDef);
}