generate invoice from consumption doesn't link with related invoice_line
I create a subscription with several lines,
when invoices are generated from consumptions there is only one consumption updated with the related invoice_line.
the others are not updated (the invoice line exists but not linked with consumption).
i think this solve the problem :
--- a/subscription.py Wed Jul 05 14:51:49 2017 +0200
+++ b/subscription.py Thu Jul 27 09:03:12 2017 +0000
@@ -333,7 +333,7 @@
assert not consumption.invoice_line
consumption.invoice_line = invoice_line
all_consumptions.append(consumption)
- Consumption.save(consumptions)
+ Consumption.save(all_consumptions)
Invoice.update_taxes(all_invoices)