From 9daf707f40733901d2d276a77cb597381a2ae104 Mon Sep 17 00:00:00 2001 From: luis Date: Thu, 4 Dec 2025 17:15:36 +0100 Subject: [PATCH] Criptomart/red-supermercados-coop#18 stock_inventory_product_exhausted: allow unlink empty stock.quants for archived products --- stock_inventory_product_exhausted/models/stock_inventory.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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()