Commit f2f66264 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_accounting: Minor fixup

parent fb4b1c16
Pipeline #15222 failed with stage
in 0 seconds
......@@ -20,12 +20,11 @@ if invoice is None:
line_found = False
line_list = invoice.getMovementList(portal.getPortalAccountingMovementTypeList())
if not len(line_list):
# Ignore since lines to group don't exist yet
return
for line in invoice.getMovementList(portal.getPortalAccountingMovementTypeList()):
for line in line_list:
if isNodeFromLineReceivable(line):
line_found = True
if line.hasGroupingReference():
......@@ -40,7 +39,8 @@ if line_found and paid:
with grouping reference %s" % letter)
# Should be safe now to fix everything XXXXXXX
context.SaleInvoiceTransaction_resetPaymentMode()
invoice.SaleInvoiceTransaction_resetPaymentMode()
return
return "Payment Cancelled"
return "Skipped"
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