Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2257 Lượt xem

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?




Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ

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

Tác giả

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

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 9 23
2243
1
thg 10 23
2298
1
thg 9 23
2156
1
thg 8 23
23872
0
thg 2 23
2979