跳至内容
菜单
此问题已终结
1 回复
2255 查看

Hi friends,

In Odoo, In a Contact page(Form), On Accounting page:

I want to filter The 'Bank' IDs based on the country set for contact.

For example, if the country of contact is set to 'Canada', I want to show just the Canadian bank name and not all banks. How can I do that?




形象
丢弃
最佳答案

Hi Masood Zarei,

You need to inherit the view and add the following domain to the field bank.


[('country','=',parent.country_id)]


Hope it helps,
Kiran K

形象
丢弃

<field name="bank_id" position="attributes">
<attribute name="domain">[('country','=',parent.country_id)]</attribute>
</field>

编写者

Dear Kiran K, You are great. Thank you so much.

相关帖文 回复 查看 活动
1
9月 23
2241
1
10月 23
2298
1
9月 23
2156
1
8月 23
23871
0
2月 23
2979