Skip to content

Commit

Permalink
[IMP]pms: missing document take account country id
Browse files Browse the repository at this point in the history
  • Loading branch information
DarioLodeiros committed Jan 10, 2024
1 parent 7a43d2c commit 816c464
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pms/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,16 @@ def _missing_document(self, vals, partners=False):
any([not partner.vat for partner in partners]) if partners else True
)
)
or vals.get("country_id") is False
or vals.get("country_id") == ""
or (
"country_id" not in vals
and (
any([not partner.country_id for partner in partners])
if partners
else True
)
)
):
return True
return False
Expand Down

0 comments on commit 816c464

Please sign in to comment.