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

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>
الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
45
أبريل 23
85037
8
ديسمبر 22
19890
1
مايو 25
39726
2
أكتوبر 17
17229
0
مارس 15
11165