diff --git a/purchase.py b/purchase.py index 1473ce758c..d777bbc2be 100644 --- a/purchase.py +++ b/purchase.py @@ -123,7 +123,8 @@ class Purchase: PurchaseConfig = pool.get('purchase.configuration') config = PurchaseConfig(1) - return config.purchase_drop_location.id + if config.purchase_drop_location: + return config.purchase_drop_location.id @fields.depends('customer', 'delivery_address') def on_change_customer(self):