[FIX] FieldBoolean: required attribute should be ignored
In order to match the model-level bevahior of boolean fields, the required attribute should be ignored, as a NULL value is automatically converted to False, and considered valid. This contrasts with Char fields, but is similar to Integer/Float fields, for which NULL values are converted automatically to 0, and considered valid. lp bug: https://launchpad.net/bugs/879412 fixed bzr revid: odo@openerp.com-20111021123510-a8tfpo8h3hqesdcd
This commit is contained in:
@@ -1424,9 +1424,6 @@ openerp.web.form.FieldBoolean = openerp.web.form.Field.extend({
|
||||
this._super.apply(this, arguments);
|
||||
this.$element.find('input').attr('disabled', this.readonly);
|
||||
},
|
||||
validate: function() {
|
||||
this.invalid = this.required && !this.$element.find('input').is(':checked');
|
||||
},
|
||||
focus: function() {
|
||||
this.$element.find('input').focus();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user