mirror of
https://github.com/NaN-tic/trytond-agronomics.git
synced 2023-12-14 05:33:01 +01:00
Add configuration.variant_deactivate_stock_zero check
This commit is contained in:
parent
15c9e432cd
commit
f6d4dd8692
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue