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 | etc.
I've created a module where I put some new category of product that will be created by xml.
So I'have to filter some field with domain, like 'categ_it', '=', xml_id, but i try to eval=ref('xml_id') but without success.
Does anyone have some solution or exampel to suggest me?
I don't want to put normal integer id to filter fileds, I want a more generalized and dynamic option :)
In 8.0 I did the following to make domain based on XML ID:
When creating an ir.actions.act_windows
<field name="domain" eval="[('categ_id', '=', ref('xml_id'))]"/>
Though, if you need to create a filter you will have to write:
<filter string="My filter" name="my_filter" domain="[('categ_id', '=', %(xml_id)d)]"/>
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 6/10/14, 12:42 PM|
|Seen: 2229 times|
|Last updated: 3/16/15, 8:10 AM|