[FIX] FieldBoolean: allow click event to propagate the value to the model in all cases
If not done, once a boolean field becomes invalid, it cannot be made valid again in any way. This seems to be coherent with the way change events are handled in other widgets, like TextArea. lp bug: https://launchpad.net/bugs/879412 fixed bzr revid: odo@openerp.com-20111021123043-enthjyo6g459kzt0
This commit is contained in:
commit
6691f4108a
|
@ -1406,11 +1406,7 @@ openerp.web.form.FieldBoolean = openerp.web.form.Field.extend({
|
|||
start: function() {
|
||||
var self = this;
|
||||
this._super.apply(this, arguments);
|
||||
this.$element.find('input').click(function() {
|
||||
if ($(this).is(':checked') != self.value) {
|
||||
self.on_ui_change();
|
||||
}
|
||||
});
|
||||
this.$element.find('input').click(self.on_ui_change);
|
||||
},
|
||||
set_value: function(value) {
|
||||
this._super.apply(this, arguments);
|
||||
|
|
Loading…
Reference in New Issue