Test if company if filled before computing incoterm required
Closes #13889 (grafted from 094ad074bd9b99ac8201ae301a8b0ad48bd245ff) --HG-- branch : 7.0
This commit is contained in:
@@ -38,7 +38,7 @@ class Sale(IncotermAvailableMixin, metaclass=PoolMeta):
|
||||
@property
|
||||
@fields.depends('company', 'warehouse', 'shipment_address')
|
||||
def _incoterm_required(self):
|
||||
if self.company.incoterms:
|
||||
if self.company and self.company.incoterms:
|
||||
if (self.warehouse and self.warehouse.address
|
||||
and self.shipment_address):
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user