From c62a4edcb04fb1e3d65dea056123cece72425b7e Mon Sep 17 00:00:00 2001 From: Martin Geubelle Date: Wed, 21 Jun 2017 16:43:21 +0200 Subject: [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. --- addons/web/static/tests/fields/relational_fields_tests.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'addons/web/static/tests/fields/relational_fields_tests.js') diff --git a/addons/web/static/tests/fields/relational_fields_tests.js b/addons/web/static/tests/fields/relational_fields_tests.js index 628026f89e4..a1631e33139 100644 --- a/addons/web/static/tests/fields/relational_fields_tests.js +++ b/addons/web/static/tests/fields/relational_fields_tests.js @@ -2927,8 +2927,8 @@ QUnit.module('relational_fields', { assert.strictEqual(form.$('.o_data_row').length, 3, "sould have 3 records in one2many list"); - assert.strictEqual(form.$('.o_data_row').text(), "blip1.59yop1.5tototo1.550xphone", - "sould display the record values in one2many list"); + assert.strictEqual(form.$('.o_data_row').text(), "blip1.59yop1.50tototo1.550xphone", + "should display the record values in one2many list"); $('.o_form_button_save').click(); -- cgit v1.2.3