From d7a3b188f9bc8a8799422beb22e2365171c048ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 7 Aug 2017 12:44:27 +0200 Subject: [PATCH] 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 --- sale.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sale.py b/sale.py index 46bb047453..5ac59a1977 100644 --- a/sale.py +++ b/sale.py @@ -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')