Ensure there is a company id in the context before testing as positive

Closes #13228
(grafted from b317427d7a7599e310332894ab7ddbb013220d82)

--HG--
branch : 7.0
This commit is contained in:
Cédric Krier
2024-05-02 18:55:04 +02:00
parent 58c696a0f7
commit b7c3766e0e
+1 -1
View File
@@ -111,7 +111,7 @@ class Party(CompanyMultiValueMixin, metaclass=PoolMeta):
pool = Pool()
Company = pool.get('company.company')
company_id = Transaction().context.get('company')
if company_id >= 0:
if company_id is not None and company_id >= 0:
company = Company(company_id)
return company.currency.id