summaryrefslogtreecommitdiff
path: root/addons/web/static/tests/views
diff options
context:
space:
mode:
authorfwi-odoo <fwi@odoo.com>2017-09-15 10:19:16 +0200
committerfwi-odoo <fwi@odoo.com>2017-09-29 16:49:20 +0200
commitda136d83bb4cd952dc0e2417d67679cfc5068f34 (patch)
treed149d19de2188ecd5f5aff05bea09c6201e78211 /addons/web/static/tests/views
parenta7d1740e475c44b50d0cc6ce6f43e9f142e99334 (diff)
[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').
Diffstat (limited to 'addons/web/static/tests/views')
-rw-r--r--addons/web/static/tests/views/basic_model_tests.js9
1 files changed, 6 insertions, 3 deletions
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,
},
}