[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').
This commit is contained in:
fwi-odoo
2017-09-29 16:49:20 +02:00
parent a7d1740e47
commit da136d83bb
12 changed files with 191 additions and 31 deletions
@@ -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,
},
}