Skip to content

Commit

Permalink
Complete porting bc2dba2 to 14.0: IMP l10n_it_reverse_charge supporti…
Browse files Browse the repository at this point in the history
…ng "with_supplier_self_invoice" for e-invoices
  • Loading branch information
eLBati committed Apr 30, 2023
1 parent 6a7fa1d commit 1ce5a39
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion l10n_it_reverse_charge/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ def rc_inv_vals(self, partner, rc_type, lines, currency):
move_type = "out_invoice"
else:
move_type = "out_refund"
supplier = self.partner_id
original_invoice = self.search(
[("rc_self_purchase_invoice_id", "=", self.id)], limit=1
)
if original_invoice:
supplier = original_invoice.partner_id

narration = _(
"Reverse charge self invoice.\n"
Expand All @@ -80,7 +86,7 @@ def rc_inv_vals(self, partner, rc_type, lines, currency):
"Date: %s\n"
"Internal reference: %s"
) % (
self.partner_id.display_name,
supplier.display_name,
self.invoice_origin or self.ref or "",
self.date,
self.name,
Expand Down

0 comments on commit 1ce5a39

Please sign in to comment.