Test purchase_drop_location value before returning id
The default_drop_location method should not fail if there is no purchase_drop_location configured. issue6690
This commit is contained in:
+2
-1
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user