From 21ebca4c4cc8417c40e39005b2f44d5614fbf1fc Mon Sep 17 00:00:00 2001 From: Thierry Bruyere Date: Sat, 7 Sep 2019 23:13:33 +0200 Subject: [PATCH] Add a global method to set default warehouse issue8396 review277371003 --- production.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/production.py b/production.py index 431fe377f0..bd88fd6ac3 100644 --- a/production.py +++ b/production.py @@ -244,9 +244,7 @@ class Production(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_location(cls):