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

Closes #13228
This commit is contained in:
Cédric Krier committed 2024-05-02 18:55:04 +02:00
1 parent 3b7fb6adca
commit 9e6789f8c1
1 file changed
+1 -1
+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