diff --git a/recurring_contract/models/recurring_contract.py b/recurring_contract/models/recurring_contract.py index ac29523f..2d074604 100644 --- a/recurring_contract/models/recurring_contract.py +++ b/recurring_contract/models/recurring_contract.py @@ -593,10 +593,12 @@ def _cancel_invoices(self): ) if remaining_lines: # We can move or remove the line - invoice.write({ - "invoice_line_ids": [(2, inv_line.id)], - "payment_mode_id": invoice.payment_mode_id.id, - }) + invoice.write( + { + "invoice_line_ids": [(2, inv_line.id)], + "payment_mode_id": invoice.payment_mode_id.id, + } + ) else: # The invoice would be empty if we remove the line empty_invoices |= invoice