diff --git a/stock_inventory_product_exhausted/models/stock_inventory.py b/stock_inventory_product_exhausted/models/stock_inventory.py index d384c88..cad759e 100644 --- a/stock_inventory_product_exhausted/models/stock_inventory.py +++ b/stock_inventory_product_exhausted/models/stock_inventory.py @@ -110,4 +110,7 @@ class StockQuant(models.Model): This may need review to ensure it doesn't conflict with standard Odoo behavior. """ - _logger.debug("Preventing automatic unlinking of zero quants") + if self.product_tmpl_id.active: + _logger.debug("Preventing automatic unlinking of zero quants") + else: + super()._unlink_zero_quants()