From 7e889a1bd59c1cd177d376f73f5060568b02705b Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Wed, 31 Jul 2019 15:19:44 +0000 Subject: [FIX] web: init makeRecord fields with correct values In the calendar view In the partner filter in the calendar side bar type something, and backspace rapidly to remove everything Before this commit, there was a error because the framework tried to write something in the corresponding field This was because the o2m field was not initialized with the correct values After this commit, there is no error OPW 2043975 closes odoo/odoo#35330 Signed-off-by: Lucas Perais (lpe) --- addons/web/static/src/js/views/basic/basic_model.js | 1 + 1 file changed, 1 insertion(+) (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 1a4f1574ac8..5e4ec6a4a6d 100644 --- a/addons/web/static/src/js/views/basic/basic_model.js +++ b/addons/web/static/src/js/views/basic/basic_model.js @@ -726,6 +726,7 @@ var BasicModel = AbstractModel.extend({ }); _.each(fields, function (field) { var dataPoint; + record.data[field.name] = null; if (field.type === 'many2one') { if (field.value) { var id = _.isArray(field.value) ? field.value[0] : field.value; -- cgit v1.2.3