summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2017-03-31 14:18:22 +0200
committerAaron Bohy <aab@odoo.com>2017-04-11 19:44:38 +0200
commitb9d9c6e3bc8d3fd4bb547aadf002652bb7bb9db4 (patch)
tree6ce9dadcaa09811f69afeee604b9d3d97fc92ba8 /addons/web/static/src/js/views
parentc5d5d7a0ff05d1664e50e5239e5b5efa77a032f6 (diff)
[FIX] web: monetary should reset on currency change
This reverts commit 839a07fbed4720fc71c070507c591295722df350. Indeed, the system will need the `resetOnAnyFieldChange` option as the `FieldMonetary` will need to be re-rendered if the currency changes. This does not use the `_fetchSpecialData` system as it will be refactored later and the currency can be fetched without RPC.
Diffstat (limited to 'addons/web/static/src/js/views')
-rw-r--r--addons/web/static/src/js/views/form/form_renderer.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/form/form_renderer.js b/addons/web/static/src/js/views/form/form_renderer.js
index f417b53885d..0212832929c 100644
--- a/addons/web/static/src/js/views/form/form_renderer.js
+++ b/addons/web/static/src/js/views/form/form_renderer.js
@@ -155,7 +155,7 @@ return BasicRenderer.extend({
this.field_values = this._getFieldValues(this.state);
var defs = [];
_.each(this.widgets, function (widget) {
- if (_.contains(fields, widget.name)) {
+ if (_.contains(fields, widget.name) || widget.resetOnAnyFieldChange) {
defs.push(widget.reset(state, event));
}
});