From 7f4725f7b653f24e123c77995aad534f8c8e4cf2 Mon Sep 17 00:00:00 2001 From: Joan Sisquella Date: Wed, 24 Apr 2024 12:27:16 +0200 Subject: [PATCH] [FIX] stock_inventory: only set to done adjustment if there is an adjustment --- stock_inventory/models/stock_quant.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stock_inventory/models/stock_quant.py b/stock_inventory/models/stock_quant.py index bfd04a6c4b99..dff7db5af46d 100644 --- a/stock_inventory/models/stock_quant.py +++ b/stock_inventory/models/stock_quant.py @@ -51,7 +51,7 @@ def _apply_inventory(self): } ) rec.to_do = False - if self.env.company.stock_inventory_auto_complete: + if adjustment and self.env.company.stock_inventory_auto_complete: adjustment.action_auto_state_to_done() return res