From ddc5cc186fc6e2efa92fea6a83ad4bbed72d648c Mon Sep 17 00:00:00 2001 From: Nans Lefebvre Date: Tue, 18 Dec 2018 12:01:22 +0000 Subject: [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 --- addons/web/static/src/js/views/basic/basic_model.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'addons/web/static/src/js/views/basic/basic_model.js') 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); } -- cgit v1.2.3