[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#106614 X-original-commit: 1b09a6314dbce9363f4785c670033f41846359ad Signed-off-by: Aaron Bohy (aab) <aab@odoo.com> Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user