[FIX] account_voucher: remove pay button if state is posted.

bzr revid: tpa@tinyerp.com-20120323093013-3x546uunrbe5t0nc
This commit is contained in:
Turkesh Patel (Open ERP) 2012-03-23 15:00:13 +05:30
parent b917267f2d
commit 12381be010
1 changed files with 1 additions and 1 deletions

View File

@ -153,7 +153,7 @@
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
<button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to confirm this record ?"/>
<button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward"/>
<group attrs="{'invisible':['|', ('state','!=','posted'), ('paid','=',True)]}">
<group attrs="{'invisible':['|', ('state','=','posted'), ('paid','=',True)]}">
<button icon="terp-dolar_ok!" name="%(act_pay_voucher)d" context="{'narration':narration, 'title':'Customer Payment', 'type':'receipt', 'partner_id':partner_id, 'reference':reference, 'amount':amount}" type="action" string="Pay" attrs="{'invisible':[('pay_now','=','pay_now')]}"/>
</group>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>