summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorFabien Meghazi <fme@openerp.com>2012-10-18 17:47:55 +0200
committerFabien Meghazi <fme@openerp.com>2012-10-18 17:47:55 +0200
commit6e0439994576e317a93dbd5bd9b7ef2fa9f40a68 (patch)
tree5eea80e532b8b9fce13968f7c578815521996c0b /addons/web/static/src
parentb5be361c55855ef560a82ce531c06f72886debd2 (diff)
[FIX] m2o#focus() does nothing when readonly
bzr revid: fme@openerp.com-20121018154755-a9hurjb0664l03x2
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/view_form.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index c2262c0d69d..d096e15b51d 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -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;