This question has been flagged
2 Replies
34226 Views

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>
Avatar
Discard