From db2ec4888cedc7a5201121062a6378896a4503ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Debauche=20St=C3=A9phane?= Date: Fri, 6 Mar 2020 08:30:00 +0000 Subject: [FIX] web: fix edition of a reference field How to reproduce ================ You must have - a form view with a one2many list - in this one2many list add a column of a reference field How to reproduce 1. open the record associated to the reference field 2. edit this record in the form modal view 3. click on save -> Traceback Bug === In `basic_model` the attribute `localData` become inconsistent because of the method `_fetchReferenceData`. We want to store the ID of the parent and not the all dict. closes odoo/odoo#47171 X-original-commit: af411b866aa2052c01168342f8f05ae3dabad83e Signed-off-by: Aaron Bohy (aab) --- addons/web/static/src/js/views/basic/basic_model.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src/js/views/basic') 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 532af65744c..9112756aaed 100644 --- a/addons/web/static/src/js/views/basic/basic_model.js +++ b/addons/web/static/src/js/views/basic/basic_model.js @@ -2475,7 +2475,7 @@ var BasicModel = AbstractModel.extend({ display_name: el[1], }, modelName: model, - parentID: parent, + parentID: parent.id, }); parent.data[fieldName] = referenceDp.id; }); -- cgit v1.2.3