[FIX] prevent field going to be misplaced when going from readonly to writable in editable list view

bzr revid: mat@openerp.com-20131210155703-2mzqa2mch46nxpcj
This commit is contained in:
xmo 2013-12-10 16:57:03 +01:00 committed by Martin Trigaux
parent 9a4c62861f
commit 762774df37
1 changed files with 7 additions and 0 deletions

View File

@ -451,6 +451,13 @@ openerp.web.list_editable = function (instance) {
field.on("change:effective_readonly", self, set_invisible);
field.on("change:invisible", self, set_invisible);
set_invisible();
field.on('change:invisible', self, function () {
if (field.get('invisible')) { return; }
var item = _(self.fields_for_resize).find(function (item) {
return item.field === field;
});
if (item) { self.resize_field(item.field, item.cell); }
});
});
this.editor.$el.on('keyup keydown', function (e) {