تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
2275 أدوات العرض

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
سبتمبر 23
2278
1
أكتوبر 23
2326
1
سبتمبر 23
2184
1
أغسطس 23
23897
0
فبراير 23
3002