diff options
| author | fwi-odoo <fwi@odoo.com> | 2017-04-06 15:42:09 +0200 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-04-11 19:44:38 +0200 |
| commit | 85790a298088e95f760ff9183a2ea9d81258a59e (patch) | |
| tree | 9d1cef9cea601b4bbce05161ee89c148dd566698 /addons/web/static/src | |
| parent | 60ae646c664bf3c78ce0ba22583c5af61d06b299 (diff) | |
[FIX] web: don't try to create datapoint for relational field not in view
In some case ´default_get´ returns values for relational fields that are not
in the view so we cannot create a datapoint for these field. Furthermore, we
cannot discard these fields in order to save their values correctly in the newly
created record.
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/views/basic/basic_model.js | 3 |
1 files changed, 2 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 82351645c26..d904f8f1ec7 100644 --- a/addons/web/static/src/js/views/basic/basic_model.js +++ b/addons/web/static/src/js/views/basic/basic_model.js @@ -2075,7 +2075,8 @@ var BasicModel = AbstractModel.extend({ } for (var name in r._changes) { - if (r.fields[name].type === 'many2one') { + var isFieldInView = name in r.fields; + if (isFieldInView && r.fields[name].type === 'many2one') { var rec = self._makeDataPoint({ context: r.context, modelName: r.fields[name].relation, |
