Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions contract/wizards/contract_manually_create_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ def action_show_contract_to_invoice(self):
"context": self.env.context,
}

def create_invoice(self):
self.ensure_one()
def _create_invoices(self):
invoices = self.env["account.move"]
for contract in self.contract_to_invoice_ids:
try:
Expand All @@ -75,7 +74,11 @@ def create_invoice(self):
ue=repr(oe),
)
) from oe
return invoices

def create_invoice(self):
self.ensure_one()
invoices = self._create_invoices()
return {
"type": "ir.actions.act_window",
"name": self.env._("Invoices"),
Expand Down
Loading