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

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.

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ก.ย. 23
2297
1
ต.ค. 23
2344
1
ก.ย. 23
2212
1
ส.ค. 23
23931
0
ก.พ. 23
3020