[FIX] point_of_sale: Show/Hide some groups in function of the state and the cash_control flag

bzr revid: stw@openerp.com-20120917140138-sjsnjxv27nd8rnao
This commit is contained in:
Stephane Wirtel 2012-09-17 16:01:38 +02:00
parent 06852d994b
commit 2a4aaeba31
1 changed files with 6 additions and 5 deletions

View File

@ -896,8 +896,8 @@
<field name="stop_at" attrs="{'invisible' : [('state', '!=', 'closed')]}"/>
</group>
<newline/>
<group string="Opening Cash Control" attrs="{'invisible' : ['|', ('cash_control', '=', False),('state', 'in', ('opened', 'closing_control'))]}">
<group string="Opening Cash Control" attrs="{'invisible' : [ '&amp;' ,'!', '&amp;', ('state', '=', 'opening_control'), ('cash_control', '=', True), ('state', '!=',
'closed')] }" >
<field name="opening_details_ids" nolabel="1" colspan="2" attrs="{'readonly' : [('state', 'not in', ('opening_control',))]}">
<tree string="Opening Cashbox Lines" editable="bottom">
<field name="pieces" readonly="1" />
@ -906,7 +906,8 @@
</tree>
</field>
</group>
<group string="Closing Cash Control" attrs="{'invisible': ['|', ('cash_control', '=', False), ('state', 'in', ('opening_control', 'opened'))]}">
<group string="Closing Cash Control" attrs="{'invisible' : [ '&amp;' ,'!', '&amp;', ('state', '=', 'closing_control'), ('cash_control', '=', True), ('state', '!=',
'closed')] }" >
<field name="details_ids" nolabel="1" colspan="2">
<tree string="Cashbox Lines" editable="bottom">
<field name="pieces" readonly="1" />
@ -916,7 +917,7 @@
</field>
</group>
<div attrs="{'invisible' : ['|', ('cash_control', '=', False),('state', 'in', ('opened', 'closing_control'))]}">
<div attrs="{'invisible' : [('state', '!=', 'closed')]}">
<group class="oe_subtotal_footer oe_right">
<field name="cash_register_balance_start" readonly="1" string="Opening Balance" class="oe_subtotal_footer_separator"/>
<field name="cash_register_total_entry_encoding" attrs="{'invisible' : [('state', '=', 'opening_control')]}" string="+ Transactions"/>
@ -933,7 +934,7 @@
</div>
<group class="oe_subtotal_footer oe_right" attrs="{'invisible': ['|', ('cash_control', '=', False), ('state', 'in', ('opening_control', 'opened'))]}">
<group class="oe_subtotal_footer oe_right" attrs="{'invisible': [('state', '!=', 'closed')]}">
<field name="cash_register_balance_end_real" class="oe_subtotal_footer_separator"/>
<field name="cash_register_difference" class="oe_subtotal_footer_separator"/>
</group>