summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_model.js
diff options
context:
space:
mode:
authorfwi-odoo <fwi@odoo.com>2017-04-20 16:47:29 +0200
committerfwi-odoo <fwi@odoo.com>2017-04-24 13:36:06 +0200
commit7ed25e2922cc9ec4f94785008499c59d4e53d2d0 (patch)
treedf16ed1b253bbc9a6383f0b1dda0eee487e54b1f /addons/web/static/src/js/views/basic/basic_model.js
parent24f802504e97911a047fe2646630f6e48c10a13b (diff)
[FIX] web: don't delete the fields with value `false` on record creation
Before this commit, all the fields with value `false` on record creation were deleted from the given parameters for the `create` rpc. e.g. it was impossible to untick a checkbox in the settings, the `false` value was not saved in the created record.
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.js1
1 files changed, 0 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 efc7fbc1971..dcc73a2845b 100644
--- a/addons/web/static/src/js/views/basic/basic_model.js
+++ b/addons/web/static/src/js/views/basic/basic_model.js
@@ -671,7 +671,6 @@ var BasicModel = AbstractModel.extend({
if (method === 'create') {
var fieldNames = record.getFieldNames();
_.each(fieldNames, function (name) {
- changes[name] = changes[name] || record.data[name];
if (changes[name] === null) {
delete changes[name];
}