Set readonly on cancel button

This commit is contained in:
Cédric Krier committed 2008-11-06 15:14:37 +01:00
1 parent 8f4357d0b1
commit 4d246a93f4
1 file changed
+1 -1
+1 -1
View File
@@ -195,7 +195,7 @@ this repository contains the full copyright notices and license terms. -->
<field name="state"/>
<group col="8" colspan="2">
<button string="Cancel" name="cancel"
states="{'invisible': '''state in ('cancel', 'done') '''}"
states="{'invisible': '''state in ('cancel', 'done') ''', 'readonly': '''%(group_stock)d not in groups'''}"
icon="tryton-cancel"/>
<button string="Draft" name="draft"
states="{'invisible': '''state != 'waiting' ''', 'readonly': '''%(group_stock)d not in groups'''}"