summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorDebauche Stéphane <std@odoo.com>2020-03-06 08:30:00 +0000
committerDebauche Stéphane <std@odoo.com>2020-03-09 09:41:27 +0000
commitdb2ec4888cedc7a5201121062a6378896a4503ba (patch)
tree50898095b35e5b383c6c708103b6d7e5d5353661 /addons/web/static/src
parent3ec104ed3c8af192ea906deb0dd8c75f0259dea9 (diff)
[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) <aab@odoo.com>
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/views/basic/basic_model.js2
1 files changed, 1 insertions, 1 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 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;
});