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

[IMP] energy_selfconsumption: selfconsumption_id by default

parent 626cb8bb
No related branches found
No related tags found
2 merge requests!253[REL] Release 06/11/23,!211[IMP] energy_selfconsumption: invoicing acquired power
......@@ -122,6 +122,7 @@ class Selfconsumption(models.Model):
"views": [(False, "form")],
"view_id": False,
"target": "new",
"context": {"default_selfconsumption_id": self.id},
}
# Move state write to contract wizard
# record.write({"state": "active"})
......
......@@ -29,6 +29,9 @@ class ContractGenerationWizard(models.TransientModel):
string="Recurrence",
help="Specify Interval for automatic invoice generation.",
)
selfconsumption_id = fields.Many2one(
"energy_selfconsumption.selfconsumption", readonly=True
)
def generate_contracts_button(self):
product_id = self.env["product.product"].create(
......
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