[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) <arm@odoo.com>
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user