Skip to content

Commit

Permalink
Merge PR #526 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Oct 27, 2023
2 parents af62227 + b0051a5 commit 2730931
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 @@ -57,7 +57,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 2730931

Please sign in to comment.