From 7ed25e2922cc9ec4f94785008499c59d4e53d2d0 Mon Sep 17 00:00:00 2001 From: fwi-odoo Date: Thu, 20 Apr 2017 16:47:29 +0200 Subject: [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. --- addons/web/static/src/js/views/basic/basic_model.js | 1 - 1 file changed, 1 deletion(-) (limited to 'addons/web/static/src/js/views/basic/basic_model.js') 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]; } -- cgit v1.2.3