[FIX] web: onchange compare changes using === operator
The onchange handler is doing a weak comparison between the values received from the onchange() method and the current field value, which leads to a falsy value such as "0000" being treated as equal to False. This patches changes the operator to enforce non-coercive equality. Fixes #6405
This commit is contained in:
parent
7ada8734bc
commit
d4aa2decde
|
@ -636,7 +636,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
|||
// If field is not defined in the view, just ignore it
|
||||
if (field) {
|
||||
var value_ = values[f];
|
||||
if (field.get_value() != value_) {
|
||||
if (field.get_value() !== value_) {
|
||||
field._inhibit_on_change_flag = true;
|
||||
field.set_value(value_);
|
||||
field._inhibit_on_change_flag = false;
|
||||
|
|
Loading…
Reference in New Issue