I'm trying to set up a way to adjust the search custom filters when i'm on the contacts list page. How can I get the currently active model name within a <t-if> statement?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
In the qweb report, try like this one:
t-if="doc_model=='account.invoice'"
In the qweb template, if active_model exist in context:
t-if="request.context.get('active_model')=='account.invoice'"
Uncaught Error: QWeb2 - template['SearchView.extended_search.proposition']: Runtime Error: TypeError: Cannot read property 'context' of undefined
Demonstrate exactly what you want to do.
use this :
<span t-esc="o._name"/>
also you can use this on if condition:
<t t-if='o._name == sale.order'>
</t>
Uncaught Error: QWeb2 - template['SearchView.extended_search.proposition']: Runtime Error: TypeError: Cannot read property '_name' of undefined