Skip to content
Snippets Groups Projects
Commit b686c1d9 authored by Walid HANNICHE (waha)'s avatar Walid HANNICHE (waha)
Browse files

[FIX] web: adding toggle to view with studio


Steps to reproduce:
- edit RFQ model with studio
- add a toggle widget to the product list
- activate/deactivate the toggle multiple times on different products

Bug:
sometimes the element on the widget is undefined when trying to rerender

Fix:
check the element is defined before trying to render it

opw-3013024

closes odoo/odoo#106607

X-original-commit: 1b09a631
Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
Signed-off-by: default avatarWalid Hanniche (waha) <waha@odoo.com>
parent 60ca63a0
No related branches found
No related tags found
No related merge requests found
......@@ -789,6 +789,9 @@ var BasicRenderer = AbstractRenderer.extend(WidgetAdapterMixin, {
// associated to new widget)
var self = this;
def.then(function () {
if(!widget.$el){
return;
}
// when the caller of renderFieldWidget uses something like
// this.renderFieldWidget(...).addClass(...), the class is added on
// the temporary div and not on the actual element that will be
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment