Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
3 Відповіді
2723 Переглядів

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

.


Аватар
Відмінити