Skip to content

Commit

Permalink
Merge PR #731 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Nov 28, 2024
2 parents 147b86a + 23948ee commit db20c1e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions account_invoice_inter_company/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ def _prepare_invoice_data(self, dest_company):
"move_type": self._get_destination_invoice_type(),
"partner_id": self.company_id.partner_id.id,
"ref": self.name,
"payment_reference": self.payment_reference,
"invoice_date": self.invoice_date,
"invoice_origin": _("%(company_name)s - Invoice: %(invoice_name)s")
% {"company_name": self.company_id.name, "invoice_name": self.name},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ def setUpClass(cls):
)
cls.invoice_company_a.partner_id = cls.partner_company_b
cls.invoice_company_a.journal_id = cls.sales_journal_company_a
cls.invoice_company_a.payment_reference = "Test Payment Ref"

with cls.invoice_company_a.invoice_line_ids.new() as line_form:
line_form.product_id = cls.product_consultant_multi_company
Expand Down Expand Up @@ -419,6 +420,9 @@ def test03_confirm_invoice_and_cancel(self):
invoices[0].company_id.partner_id,
self.invoice_company_a.partner_id,
)
self.assertEqual(
invoices[0].payment_reference, self.invoice_company_a.payment_reference
)
self.assertEqual(
len(invoices[0].invoice_line_ids),
len(self.invoice_company_a.invoice_line_ids),
Expand Down

0 comments on commit db20c1e

Please sign in to comment.