[FIX] web: view_form.js: radio buttons bug fix
Clicking on a checked radio button doesn't uncheck it anymore
This commit is contained in:
parent
8de7be6219
commit
3505dcce70
|
@ -3215,9 +3215,7 @@ instance.web.form.FieldRadio = instance.web.form.AbstractField.extend(instance.w
|
|||
click_change_value: function (event) {
|
||||
var val = $(event.target).val();
|
||||
val = this.field.type == "selection" ? val : +val;
|
||||
if (val == this.get_value()) {
|
||||
this.set_value(false);
|
||||
} else {
|
||||
if (val !== this.get_value()) {
|
||||
this.set_value(val);
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue