fix visibility of cancel button for canceled purchase order for issue 1232

This commit is contained in:
Korbinian Preisler
2009-10-13 12:38:02 +02:00
parent 9b923bc543
commit fb288146ce
+1 -1
View File
@@ -89,7 +89,7 @@ this repository contains the full copyright notices and license terms. -->
<field name="state"/>
<group col="6" colspan="2" id="buttons">
<button name="cancel" string="Cancel"
states="{'invisible': '''not ((state in ('draft', 'quotation')) or (invoice_state == 'exception') or (shipment_state == 'exception')) ''', 'readonly': '''%(group_purchase)d not in groups'''}"
states="{'invisible': '''state == 'cancel' or not ((state in ('draft', 'quotation')) or ((invoice_state == 'exception') and (shipment_state == 'exception'))) ''', 'readonly': '''%(group_purchase)d not in groups'''}"
icon="tryton-cancel"/>
<button name="draft" string="Draft"
states="{'invisible': '''state != 'quotation' ''', 'readonly': '''%(group_purchase)d not in groups'''}"