Fix last commit

This commit is contained in:
Jared Esparza 2021-09-30 12:22:10 +02:00
parent 78217011f2
commit a119400b84
1 changed files with 2 additions and 2 deletions

View File

@ -33,8 +33,8 @@ class Location(metaclass=PoolMeta):
location.check_company() location.check_company()
def check_company(self): def check_company(self):
if (self.company.id != Transaction().context.get('company') if (self.company is not None and
and self.company is not None): self.company.id != Transaction().context.get('company')):
raise UserError(gettext( raise UserError(gettext(
'stock_location_company.msg_wrong_company', 'stock_location_company.msg_wrong_company',
location=self.rec_name)) location=self.rec_name))