summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/form_widgets.js
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2015-07-29 09:11:53 +0200
committerAaron Bohy <aab@odoo.com>2015-07-29 14:36:03 +0200
commitaa887ed02ce864cd1036f39f7bc6b984b60578d0 (patch)
treed73520f191fdd3e773a9164717732c9a44e887f9 /addons/web/static/src/js/views/form_widgets.js
parent51952f30332448b98fd120e9dce13b068507d1c3 (diff)
[FIX] web,mail: widgets: replace $el.toggle() by do_toggle()
Since rev. 16eb36ff, do_show() and do_hide() on widgets toggle the classname o_hidden on which the rule 'display: none' is defined, instead of calling jQuery's show() and hide(). The method do_toggle(), sharing the same logic, has been introduced in rev. 74c5f772. From now on, every widgets should call do_toggle() instead of $el.toggle() as it will have undesiderable effects (they should call do_show() and do_hide() instead of $el.show() and $el.hide() as well, this as been done in 16eb36ff). This rev. replaces all calls to $el.toggle() by do_toggle(). It also adds an optional argument to do_toggle() to force hidding or showing the widget.
Diffstat (limited to 'addons/web/static/src/js/views/form_widgets.js')
-rw-r--r--addons/web/static/src/js/views/form_widgets.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/form_widgets.js b/addons/web/static/src/js/views/form_widgets.js
index a46695e9e19..79e4a5f97bb 100644
--- a/addons/web/static/src/js/views/form_widgets.js
+++ b/addons/web/static/src/js/views/form_widgets.js
@@ -1069,7 +1069,7 @@ var FieldReference = common.AbstractField.extend(common.ReinitializeFieldMixin,
}
this.m2o.field.relation = this.get('value')[0];
this.m2o.set_value(this.get('value')[1]);
- this.m2o.$el.toggle(!!this.get('value')[0]);
+ this.m2o.do_toggle(!!this.get('value')[0]);
this.reference_ready = true;
},
});