Skip to Content
Menu
This question has been flagged
2 Replies
1640 Views

I have created a widget in Odoo. It is a simple button which opens a popup window with some content and a Close button. 

The problem is when i click on the Close button, my popup is closed but my button is also removed from the DOM.

How do i stop this... i want my widget to be permanent.



Avatar
Discard

Please share your code so that we can find exact issue and help you.

Author Best Answer

I found out my mistake....

this.$el.html(QWeb.render('myTemplate',{}))

This line was removing the button from the DOM. I should have written append instead of html.

this.$el.append((QWeb.render('myTemplate',{}))

Appreciate the help!

Avatar
Discard
Related Posts Replies Views Activity
1
Jul 24
401
1
Jul 23
3223
0
Mar 24
1982
1
Sep 22
4950
1
Mar 22
3817