[FIX] don't resize & reposition invisible or readonly fields in editable listview
the datetime field doesn't setup its internal widget if the field is readonly, so accessing it blows up bzr revid: xmo@openerp.com-20121108153544-o2uvpfeoofu2tx12
This commit is contained in:
parent
e0094e20de
commit
788e8edf81
|
@ -242,7 +242,9 @@ openerp.web.list_editable = function (instance) {
|
|||
if (!this.editor.is_editing()) { return; }
|
||||
for(var i=0, len=this.fields_for_resize.length; i<len; ++i) {
|
||||
var item = this.fields_for_resize[i];
|
||||
this.resize_field(item.field, item.cell);
|
||||
if (!item.field.get('invisible')) {
|
||||
this.resize_field(item.field, item.cell);
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
|
@ -254,7 +256,6 @@ openerp.web.list_editable = function (instance) {
|
|||
*/
|
||||
resize_field: function (field, cell) {
|
||||
var $cell = $(cell);
|
||||
var position = $cell.position();
|
||||
|
||||
field.set_dimensions($cell.outerHeight(), $cell.outerWidth());
|
||||
field.$el.position({
|
||||
|
|
Loading…
Reference in New Issue