Skip to content

Commit

Permalink
Merge PR #531 into 15.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Nov 17, 2023
2 parents 146d001 + 1ac5f5c commit ff674f4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion account_invoice_inter_company/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ def _find_company_from_invoice_partner(self):
company = (
self.env["res.company"]
.sudo()
.search([("partner_id", "=", self.commercial_partner_id.id)], limit=1)
.search(
[
("partner_id", "=", self.commercial_partner_id.id),
("id", "!=", self.company_id.id),
],
limit=1,
)
)
return company or False

Expand Down

0 comments on commit ff674f4

Please sign in to comment.