Skip to content

Commit

Permalink
[FIX] web: re-introduce on_change="0" to prevent onchanges for custom…
Browse files Browse the repository at this point in the history
…ization

In 10.0, adding on_change="0" allowed to prevent
default onchanges to occur for the field on which was added this attribute.

In 11.0, the rev. eaa66d1
added a regression by removing this possibility.
It was an oversight, it was not an expected change
in the web client.

In 10.0, it's this line which bring this possibility:
e8a00bc#diff-ff0e90fb0eb4418a7f66e618e4b51323R444

opw-1883366
  • Loading branch information
beledouxdenis committed Oct 18, 2018
1 parent 2c0a76f commit a56f581
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/web/static/src/js/services/data_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ return core.Class.extend({
attrs.options = attrs.options ? pyeval.py_eval(attrs.options) : {};
}

if (attrs.on_change && !field.onChange) {
if (attrs.on_change && attrs.on_change !== "0" && !field.onChange) {
field.onChange = "1";
}

Expand Down

0 comments on commit a56f581

Please sign in to comment.