[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:
andreparames
2015-04-23 16:02:21 +02:00
committed by Martin Trigaux
parent 7ada8734bc
commit d4aa2decde
+1 -1
View File
@@ -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;