diff options
| author | Aaron Bohy <aab@odoo.com> | 2017-08-11 10:23:55 +0200 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-08-11 10:29:56 +0200 |
| commit | 5fce37486a707c19ba4c751b234f5620ed066aa7 (patch) | |
| tree | 5225b2daa2c94cc4ed341de19874dba900f18ea5 /addons/web/static/src/js/views/basic/basic_model.js | |
| parent | 870aa81ad9ef26b88bff8190a71e8c805fe33beb (diff) | |
[FIX] web: BasicModel: default_get: false m2o inside o2m
Sometimes, a default_get returns a create command for a one2many,
with a dict of values containing value 'false' for a many2one. This
is strictly equivalent to the case where the many2one field isn't
in the dict of values, but we have to handle both cases, and before
this rev., we only handled the latter one.
This happens for example in Sales > Leads (must be activated in the
Settings) > in the list view, check several leads > in 'Action',
click on 'Forward to Partner' > crash.
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_model.js')
| -rw-r--r-- | addons/web/static/src/js/views/basic/basic_model.js | 2 |
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 8bb46ea68aa..72a89a23cc2 100644 --- a/addons/web/static/src/js/views/basic/basic_model.js +++ b/addons/web/static/src/js/views/basic/basic_model.js @@ -2922,7 +2922,7 @@ var BasicModel = AbstractModel.extend({ r._changes = _.defaults(value[2], r.data); for (var name in r._changes) { - if (r._changes[name] === null) { + if (!r._changes[name]) { continue; } var isFieldInView = name in r.fields; |
