From b3b89745f6236da8842bcafb3ee8dd133bef0a09 Mon Sep 17 00:00:00 2001 From: svs-odoo Date: Thu, 27 Oct 2022 08:27:14 +0000 Subject: [PATCH] [FIX] stock: apply all returning a wizard When using the "Apply All" button to make inventory adjustments, a wizard is opened to choose a name. Then, this wizard calls the quant's `action_apply_inventory` method but doesn't return it. But sometime, this method doesn't apply immediately the inventory but ask for confirmation before (e.g.: trying to "Apply All" with quants for tracked product but without lot/serial number). In these cases, the "Apply All" does nothing. closes odoo/odoo#104307 X-original-commit: e555333cf3ca2511df55105a027ca52e55c13774 Signed-off-by: Arnold Moyaux (arm) --- addons/stock/wizard/stock_inventory_adjustment_name.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/wizard/stock_inventory_adjustment_name.py b/addons/stock/wizard/stock_inventory_adjustment_name.py index 099fd930c84..54ea339167e 100644 --- a/addons/stock/wizard/stock_inventory_adjustment_name.py +++ b/addons/stock/wizard/stock_inventory_adjustment_name.py @@ -21,4 +21,4 @@ class StockInventoryAdjustmentName(models.TransientModel): def action_apply(self): quants = self.quant_ids.filtered('inventory_quantity_set') - quants.with_context(inventory_name=self.inventory_adjustment_name).action_apply_inventory() + return quants.with_context(inventory_name=self.inventory_adjustment_name).action_apply_inventory()