From a2dad3e01be9bd5fe3043defcf41baf0c6fc431b 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 --- work.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/work.py b/work.py index 33bbc88270..5b263a3bf9 100644 --- a/work.py +++ b/work.py @@ -76,9 +76,7 @@ class WorkCenter(DeactivableMixin, tree(separator=' / '), 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 get_picker(cls):