[FIX] Problem in editable list view: in sale orders, when we add a line in the order lines o2m then select a product, some strange numbers appear on the top left of the list view.
bzr revid: nicolas.vanhoren@openerp.com-20121015123856-j4sgaqtf3oexg6of
This commit is contained in:
parent
fca9f19f76
commit
38582c8410
|
@ -201,10 +201,7 @@ openerp.web.list_editable = function (instance) {
|
|||
}, function () {
|
||||
return self.editor.edit(item, function (field_name, field) {
|
||||
var cell = cells[field_name];
|
||||
if (!cell || field.get('effective_readonly')) {
|
||||
// Readonly fields can just remain the list's,
|
||||
// form's usually don't have backgrounds &al
|
||||
field.set({invisible: true});
|
||||
if (!cell) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -400,6 +397,21 @@ openerp.web.list_editable = function (instance) {
|
|||
},
|
||||
setup_events: function () {
|
||||
var self = this;
|
||||
_.each(this.editor.form.fields, function(field, field_name) {
|
||||
var field;
|
||||
var setting = false;
|
||||
var set_invisible = function() {
|
||||
if (!setting && field.get("effective_readonly")) {
|
||||
setting = true;
|
||||
field.set({invisible: true});
|
||||
setting = false;
|
||||
}
|
||||
};
|
||||
field.on("change:effective_readonly", self, set_invisible);
|
||||
field.on("change:invisible", self, set_invisible);
|
||||
set_invisible();
|
||||
});
|
||||
|
||||
this.editor.$el.on('keyup keydown', function (e) {
|
||||
if (!self.editor.is_editing()) { return; }
|
||||
var key = _($.ui.keyCode).chain()
|
||||
|
|
Loading…
Reference in New Issue