[ad_1]
i have a problem when i was write two tree in one group tag. this is my code :
<group>
<field name='values_data' attrs="'invisible': [('cover_data', '=', False)]" nolabel='1'>
<tree editable="bottom" create="1" class='scroll'>
<field readonly_force_submit="1" readonly="True" name='no'/>
<field readonly_force_submit="1" invisible="True" name='stock'/>
<field readonly_force_submit="1" readonly="True" name='date2'/>
<field readonly_force_submit="1" name='ref'/>
<field readonly_force_submit="1" name='tax'/>
<field readonly_force_submit="1" name='date_ta'/>
<field readonly_force_submit="1" name='calc'/>
<field readonly_force_submit="1" readonly="True" name='calc2'/>
</tree>
</field>
<field name='values_data_false' attrs="'invisible': [('cover_data', '=', True)]" nolabel='1'>
<tree editable="bottom" create="1" class='scroll'>
<field readonly_force_submit="1" readonly="True" name='no'/>
<field readonly_force_submit="1" invisible="True" name='stock'/>
<field readonly_force_submit="1" readonly="True" name='date2'/>
<!-- <field readonly_force_submit="1" name='ref' invisible='1'/> -->
<field readonly_force_submit="1" name='tax' invisible='1'/>
<!-- <field readonly_force_submit="1" name='date_ta' invisible='1'/> -->
<field readonly_force_submit="1" name='calc' invisible='1'/>
<field readonly_force_submit="1" readonly="True" name='calc2'/>
</tree>
</field>
</group>
In file .py, i was give a condition for values_data
which mean for choose the tree, but what i got, the system always process the both of tree. My expectation if the values_data
variable True of False, the process just take or process one tree, not both of tree.
[ad_2]
لینک منبع