Allow to reset to draft a cancelled sale
review360001
This commit is contained in:
1 parent
0bcf3b29f0
commit
b6dccc932f
2 files changed
+5
-3
No files matched your search
@@ -181,13 +181,16 @@ class Sale(Workflow, ModelSQL, ModelView):
|
||||
('draft', 'cancel'),
|
||||
('quotation', 'cancel'),
|
||||
('quotation', 'draft'),
|
||||
('cancel', 'draft'),
|
||||
))
|
||||
self._buttons.update({
|
||||
'cancel': {
|
||||
'invisible': ~Eval('state').in_(['draft', 'quotation']),
|
||||
},
|
||||
'draft': {
|
||||
'invisible': Eval('state') != 'quotation',
|
||||
'invisible': ~Eval('state').in_(['cancel', 'quotation']),
|
||||
'icon': If(Eval('state') == 'cancel', 'tryton-clear',
|
||||
'tryton-go-previous'),
|
||||
},
|
||||
'quote': {
|
||||
'invisible': Eval('state') != 'draft',
|
||||
|
||||
@@ -91,8 +91,7 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<group col="7" colspan="2" id="buttons">
|
||||
<button name="cancel" type="object" string="Cancel"
|
||||
icon="tryton-cancel"/>
|
||||
<button name="draft" type="object" string="Draft"
|
||||
icon="tryton-go-previous"/>
|
||||
<button name="draft" type="object" string="Draft"/>
|
||||
<button name="quote" type="object" string="Quote"
|
||||
icon="tryton-go-next"/>
|
||||
<button name="%(wizard_invoice_handle_exception)d"
|
||||
|
||||
Reference in new issue
Block a user