changeset 0bb9532114e2 in modules/production_work:default
details:
https://hg.tryton.org/modules/production_work?cmd=changeset;node=0bb9532114e2
description:
Add a global method to set default warehouse
issue8396
review277371003
diffstat:
work.py | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diffs (14 lines):
diff -r 29ff22d744e9 -r 0bb9532114e2 work.py
--- a/work.py Fri Aug 09 16:36:43 2019 +0200
+++ b/work.py Sat Sep 07 23:13:33 2019 +0200
@@ -76,9 +76,7 @@
@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 get_picker(cls):