Skip to content
Snippets Groups Projects
Commit e6079fa9c081 authored by Anael Lorimier's avatar Anael Lorimier
Browse files

Override the function that reset the invoice workflow. We bypass its behaviour...

Override the function that reset the invoice workflow. We bypass its behaviour in case of a reversed invoice
parent 1cffde56aed3
No related branches found
No related tags found
No related merge requests found
...@@ -369,3 +369,17 @@ ...@@ -369,3 +369,17 @@
cr, uid, ids, context=context cr, uid, ids, context=context
) )
return True return True
def action_cancel_draft(self, cr, uid, ids, *args):
invoices = self.browse(cr, uid, ids)
for invoice in invoices:
for line in invoice.move_id.line_id:
if line.reconcile_id or line.reconcile_partial_id:
raise osv.except_osv(
_(u"Operation not Permitted"),
_(u"Some move lines linked to "
u"this invoice are reconciled.")
)
return super(account_invoice_streamline, self).action_cancel_draft(
cr, uid, ids, *args
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment