[FIX] m2o switches correctly its button

bzr revid: nicolas.vanhoren@openerp.com-20121022161426-1oqwa8e3n6kh7pba
This commit is contained in:
niv-openerp 2012-10-22 18:14:26 +02:00
parent 6972b34029
commit 3b5b24b72e
1 changed files with 3 additions and 1 deletions

View File

@ -3119,8 +3119,10 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
if (!this.get("effective_readonly")) {
this.$input.val(str.split("\n")[0]);
this.current_display = this.$input.val();
if(this.is_false()){
if (this.is_false()) {
this.$('.oe_m2o_cm_button').css({'display':'none'});
} else {
this.$('.oe_m2o_cm_button').css({'display':'inline'});
}
} else {
var lines = _.escape(str).split("\n");