Skip to content
Snippets Groups Projects
Commit b9521bdd authored by Daniil Digtyar Vasilieva's avatar Daniil Digtyar Vasilieva :call_me:
Browse files

[IMP] energy_selfconsumption: generate next invoices with context

parent ecbe5cbb
No related branches found
No related tags found
No related merge requests found
......@@ -8,4 +8,6 @@ class InvoicingWizard(models.TransientModel):
contract_ids = fields.Many2many("contract.contract")
def generate_invoices(self):
return True
return self.with_context(
{"energy_delivered": self.power}
).contract_ids._recurring_create_invoice()
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