Add a global method to set default warehouse
issue8396 review277371003
This commit is contained in:
1 parent
2c222b467e
commit
d0ad8a9c7d
1 file changed
+1
-3
+1
-3
@@ -222,9 +222,7 @@ class PurchaseRequisition(Workflow, ModelSQL, ModelView):
|
||||
@classmethod
|
||||
def default_warehouse(cls):
|
||||
Location = Pool().get('stock.location')
|
||||
locations = Location.search(cls.warehouse.domain)
|
||||
if len(locations) == 1:
|
||||
return locations[0].id
|
||||
return Location.get_default_warehouse()
|
||||
|
||||
@classmethod
|
||||
def default_currency(cls):
|
||||
|
||||
Reference in new issue
Block a user