[FIX] Code optimization as per suggestion.
bzr revid: cpa@tinyerp.com-20120607060633-ewnd0kr9qzxw0tey
This commit is contained in:
@@ -2664,7 +2664,7 @@ openerp.web.form.FieldMany2Many = openerp.web.form.Field.extend({
|
||||
return [commands.replace_with(this.dataset.ids)];
|
||||
},
|
||||
validate: function() {
|
||||
this.invalid = this.required && !this.dataset.ids.length ? true : false ;
|
||||
this.invalid = this.required && _(this.dataset.ids).isEmpty();
|
||||
},
|
||||
is_readonly: function() {
|
||||
return this.readonly || this.force_readonly;
|
||||
|
||||
Reference in New Issue
Block a user