Add configuration.variant_deactivate_stock_zero check

This commit is contained in:
Jared Esparza 2022-01-19 09:48:53 +01:00
parent 15c9e432cd
commit f6d4dd8692

View file

@ -128,6 +128,7 @@ class Product(WineMixin, metaclass=PoolMeta):
locations = Location.search(['type', '=', 'warehouse'])
locations = [location.id for location in locations]
with Transaction().set_context(locations=locations, with_childs=True):
if config.variant_deactivation_time:
products = cls.search(
[
('quantity', '=', 0),