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

i want to display a customized field "wilaya" depending the value of another field "country_id" in the view base.view_partner_form

my code is : 

                <field name="wilaya" attrs="{'invisible': [('country_id','!=', 'Algeria')] }"/>

but the condition doesn't work. need help please
Ảnh đại diện
Huỷ bỏ

How to visible and invisible fields in odoo

https://goo.gl/BCxCpk

Câu trả lời hay nhất

Hello Kader,

<field name="wilaya" attrs="{'invisible': [('country_id','!=',record_id)] }"/>

record_id = Database id then it will work

Ảnh đại diện
Huỷ bỏ
Tác giả

very helpful thx very much it's working

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 1 20
15064
16
thg 8 19
10066
5
thg 6 18
10715
0
thg 9 17
2401
0
thg 2 17
2914