[FIX] m2o#focus() does nothing when readonly

bzr revid: fme@openerp.com-20121018154755-a9hurjb0664l03x2
This commit is contained in:
Fabien Meghazi 2012-10-18 17:47:55 +02:00
parent b5be361c55
commit 6e04399945
1 changed files with 3 additions and 1 deletions

View File

@ -3172,7 +3172,9 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
return ! this.get("value");
},
focus: function () {
this.$input.focus();
if (!this.get('effective_readonly')) {
this.$input.focus();
}
},
_quick_create: function() {
this.no_ed = true;