From da136d83bb4cd952dc0e2417d67679cfc5068f34 Mon Sep 17 00:00:00 2001 From: fwi-odoo Date: Fri, 15 Sep 2017 10:19:16 +0200 Subject: [IMP] web: x2m list: conditionnaly hide a column This commit introduces a new way to hide a column in a x2m list view. The attribute 'tree_invisible' can be add in the field attrs in the x2m view definition. This attribute can use the 'parent' key to make a reference to the parent record (e.g. 'parent.id'). --- addons/web/static/tests/views/basic_model_tests.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'addons/web/static/tests/views/basic_model_tests.js') diff --git a/addons/web/static/tests/views/basic_model_tests.js b/addons/web/static/tests/views/basic_model_tests.js index a4a19ab620d..efbbb276aef 100644 --- a/addons/web/static/tests/views/basic_model_tests.js +++ b/addons/web/static/tests/views/basic_model_tests.js @@ -1504,7 +1504,9 @@ QUnit.module('Views', { default: { foo: {}, bar: { - modifiers:"{\"readonly\": true}", + modifiers: { + readonly: true, + }, }, } }; @@ -1524,7 +1526,6 @@ QUnit.module('Views', { return this._super(route, args); }, }); - model.load(this.params).then(function (resultID) { var record = model.get(resultID); assert.strictEqual(record.data.bar, 2, @@ -1568,7 +1569,9 @@ QUnit.module('Views', { default: { foo: {}, bar: { - modifiers:"{\"readonly\": true}", + modifiers: { + readonly: true, + }, force_save: true, }, } -- cgit v1.2.3