diff --git a/sale_automatic_workflow/models/account_invoice.py b/sale_automatic_workflow/models/account_invoice.py index e822facbebbf..8be06fda4b99 100644 --- a/sale_automatic_workflow/models/account_invoice.py +++ b/sale_automatic_workflow/models/account_invoice.py @@ -13,3 +13,10 @@ class AccountInvoice(models.Model): comodel_name='sale.workflow.process', string='Sale Workflow Process' ) + + @api.multi + def action_cancel(self): + for inv in self: + if inv.workflow_process_id: + inv.workflow_process_id = None + return super(AccountInvoice, self).action_cancel()