Test sale_drop_location value before returning id

The default_drop_location method should not fail if there is no
sale_drop_location configured.

issue6690
review35221002
This commit is contained in:
Cédric Krier committed 2017-08-07 12:44:27 +02:00
1 parent 26be4016ad
commit d7a3b188f9
1 file changed
+2 -1
+2 -1
View File
@@ -78,7 +78,8 @@ class Sale:
Config = pool.get('sale.configuration')
config = Config(1)
return config.sale_drop_location.id
if config.sale_drop_location:
return config.sale_drop_location.id
def get_drop_shipments(self, name):
DropShipment = Pool().get('stock.shipment.drop')