跳至內容
選單
此問題已被標幟
1 回覆
2258 瀏覽次數

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
2244
1
10月 23
2300
1
9月 23
2156
1
8月 23
23879
0
2月 23
2979