Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
37231 Переглядів

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>
Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
45
квіт. 23
84908
8
груд. 22
19808
1
трав. 25
39684
2
жовт. 17
17190
0
бер. 15
11117