how to use ref in filter domains?
this does not work
<filter string="service" domain="[('service_ids', 'in', ref('service.service_1')]"/>
neither does this
<filter string="service" domain="[('service_ids', 'in', %(service.service_1)d)]"/>
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
how to use ref in filter domains?
this does not work
<filter string="service" domain="[('service_ids', 'in', ref('service.service_1')]"/>
neither does this
<filter string="service" domain="[('service_ids', 'in', %(service.service_1)d)]"/>
I'm using this and works fine.
<filter string="Ecuadorian States" name="ecuadorian_states" domain="[('country_id', '=', %(base.ec)d)]"/>
Thanks for your reply,
Any workaround to hardcode it in the xml?
Hi ,
Go to the module you want to create the filter for .
Now create a view/ Filter the save it.(You can only create a view with the given fields in filter list.)
Now go to user define filter . you can find the view .if you want you can change it there as well.
Ps - there are some fields you cannot see in the custom filter list initially. You can add the fields using studio.
Hope this helps.
Srijita Banerjee
Jr. Odoo Consultant
Tel: +353 1 886 5684 (IE) +44 121 285 5684 (UK) +91 964 381 7554 (IN)
Target Integration | CRM • ERP • Cloud
Website | LinkedIn | Twitter | Facebook | YouTube | Instagram
.
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อ