[IMP] readonly sortable o2m

The making of the column invisible would happen after the header was
rendered (?), and the header would not be re-rendered afterwards. So
there would be a missing chunk of table. Make the cells invisible
instead. It's all going to be changed looks-wise anyway so meh.

bzr revid: xmo@openerp.com-20121022103935-78bm40gfotpt1ds6
This commit is contained in:
Xavier Morel 2012-10-22 12:39:35 +02:00
parent 6aeb3f5907
commit 8a3a92bbfc
1 changed files with 2 additions and 12 deletions

View File

@ -3351,23 +3351,13 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({
controller.on('edit:before', self, function (e) {
e.cancel = true;
});
var has_handle = _(controller.columns).find(function (column) {
_(controller.columns).find(function (column) {
if (!column instanceof instance.web.list.Handle) {
return false;
}
column.modifiers.tree_invisible = true;
column.invisible = '1';
// remove from visibles
controller.visible_columns.splice(
controller.visible_columns.indexOf(column),
1);
column.modifiers.invisible = true;
return true;
});
if (has_handle) {
// recompute aggregates
controller.aggregate_columns =
_(controller.visible_columns).invoke('to_aggregate');
}
}
} else if (view_type === "form") {
if (self.get("effective_readonly")) {