Commit 3dfeaf4f authored by Romain Courteaud's avatar Romain Courteaud

slapos_accounting: add assert

parent 853c3200
......@@ -37,6 +37,8 @@ for invoice in invoice_list:
causality_uid_list.append(invoice.payment_request_uid)
if invoice.SaleInvoiceTransaction_isLettered():
raise ValueError('This invoice is already lettered')
if invoice.getPortalType() != 'Sale Invoice Transaction':
raise ValueError('Not an invoice')
if not price:
raise ValueError('No total_price to pay')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment