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

here is my source code and i need to know hide bank_id field when i select != bank value from selection box ? I tried with

attrs="{'invisible': [('special_deduction_type', '!=', 'bank')]}"

also for all fields.but then many2one fields shows in out of layout.please refer the image

image description

<page string="Special Deductions">
<field name='special_deduction_ids' nolabel='1'>
<tree string='List' editable='bottom'>
<field name='deduction_id' invisible="1" />
<field name='special_deduction_type' />
<field name='bank_id'
attrs="{'invisible': [('special_deduction_type', '=', 'bank')]}" />
<field name='union_id'
attrs="{'invisible': [('special_deduction_type', '=', 'union')]}" />
<field name='insurance_id'
attrs="{'invisible': [('special_deduction_type', '=', 'insurance')]}" />
<field name='loan_id'
attrs="{'invisible': [('special_deduction_type', '=', 'loan')]}" />
</tree>
</field>
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
45
thg 4 23
85479
8
thg 12 22
20097
1
thg 5 25
39860
2
thg 10 17
17396
0
thg 3 15
11300