summaryrefslogtreecommitdiff
path: root/addons/web/static/tests/views/basic_model_tests.js
diff options
context:
space:
mode:
authorMartin Geubelle <mge@odoo.com>2017-06-21 16:43:21 +0200
committerMartin Geubelle <mge@odoo.com>2017-06-22 10:52:26 +0200
commitc62a4edcb04fb1e3d65dea056123cece72425b7e (patch)
treeea8a615d6314998690c2debed6047c57222695b5 /addons/web/static/tests/views/basic_model_tests.js
parent3de0715f12d1a965d444f2d1cc816ca3d740a839 (diff)
[FIX] web: set 0 as default value for numeric fields
When creating a new record, the numeric field default value should be 0 in order to avoid manually setting mandatory fields to 0. This behaviour has been removed with the new views but one wants to restore it. The `mockRead` function has also been adapted in this commit because the server returns 0 for unset numeric fields.
Diffstat (limited to 'addons/web/static/tests/views/basic_model_tests.js')
-rw-r--r--addons/web/static/tests/views/basic_model_tests.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web/static/tests/views/basic_model_tests.js b/addons/web/static/tests/views/basic_model_tests.js
index cbe04f5b43b..9fbc2acdd88 100644
--- a/addons/web/static/tests/views/basic_model_tests.js
+++ b/addons/web/static/tests/views/basic_model_tests.js
@@ -1364,8 +1364,8 @@ QUnit.module('Views', {
delete this.params.res_id;
model.load(this.params).then(function (resultID) {
var record = model.get(resultID);
- assert.strictEqual(record.data.bar, false,
- "should be initialized with correct value");
+ assert.strictEqual(record.data.bar, 0,
+ "should be initialized with correct value (0 as integer)");
model.notifyChanges(resultID, {foo: "anotherverylongstring"});