Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
2726 มุมมอง

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

.


อวตาร
ละทิ้ง