Test if contextual company id is positive before using it
Closes #13176 (grafted from fa023763f7b00cd4fbfa9e818bf25db9e259cfbd) --HG-- branch : 7.0
This commit is contained in:
1 parent
3b36968b65
commit
78a6017ae8
1 file changed
+1
-1
@@ -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:
|
||||
if company_id >= 0:
|
||||
company = Company(company_id)
|
||||
return company.currency.id
|
||||
|
||||
|
||||
Reference in new issue
Block a user