diff --git a/modules/stock_product_location/location.py b/modules/stock_product_location/location.py index fa08dcb58a..8976be7609 100644 --- a/modules/stock_product_location/location.py +++ b/modules/stock_product_location/location.py @@ -2,7 +2,7 @@ # this repository contains the full copyright notices and license terms. from trytond.model import ( MatchMixin, ModelSQL, ModelView, fields, sequence_ordered) -from trytond.pool import PoolMeta +from trytond.pool import Pool, PoolMeta from trytond.pyson import Bool, Eval, If @@ -39,6 +39,11 @@ class ProductLocation(sequence_ordered(), ModelSQL, ModelView, MatchMixin): if self.product: self.template = self.product.template + @classmethod + def default_warehouse(cls): + Location = Pool().get('stock.location') + return Location.get_default_warehouse() + class Move(metaclass=PoolMeta): __name__ = 'stock.move'