Test if company if filled before computing incoterm required

Closes #13889
(grafted from 094ad074bd9b99ac8201ae301a8b0ad48bd245ff)

--HG--
branch : 7.0
This commit is contained in:
Cédric Krier
2025-02-26 23:23:26 +01:00
parent b3ea89468d
commit aba223bdf1
+1 -1
View File
@@ -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 (