changeset 875add501209 in modules/production:default
details: 
https://hg.tryton.org/modules/production?cmd=changeset;node=875add501209
description:
        Add a global method to set default warehouse

        issue8396
        review277371003
diffstat:

 production.py |  4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diffs (14 lines):

diff -r 15ab809d95d7 -r 875add501209 production.py
--- a/production.py     Fri Aug 09 16:36:25 2019 +0200
+++ b/production.py     Sat Sep 07 23:13:33 2019 +0200
@@ -244,9 +244,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 default_location(cls):

Reply via email to