Skip to Content
Menu
This question has been flagged
1 Reply
2603 Views

Hi,

In Odoo 11, I'm trying to add a button based on condition in QWEB

<t t-if="widget.model == 'mail.message'">
...
</t>

but it looks like the condition is false even though I'm in the right page.

Note: In Odoo 10 it worked as expected

Edit: How can i see the type name of widget.model?


Avatar
Discard
Author Best Answer

After few debugs I've found how to accomplish this

<t t-if="widget.modelName == 'mail.message'">
...
</t>
Avatar
Discard