From 2177a045d0b9fbe82e6460b02b86502a7f09f1d8 Mon Sep 17 00:00:00 2001 From: "Tiffany Chang (tic)" Date: Fri, 14 Apr 2023 15:55:00 +0000 Subject: [PATCH] [FIX] stock_picking_batch: print correct num of labels PR https://github.com/odoo/odoo/pull/106414 made it so the `product.label.layout` expecting `stock.move` ids rather than `stock.move.line` ids. Unfortunately it missed updating this for the batch picking case => when printing the labels for a batch picking, only 1 label was printed per product rather than the qty done. Note that this issue does not occur when the batch is Done + has lots/SNs assigned in it closes odoo/odoo#118995 X-original-commit: a5af45a8e3ff8860655351dd76a11f1dbb6d8a70 Signed-off-by: Steve Van Essche Signed-off-by: Tiffany Chang --- addons/stock_picking_batch/models/stock_picking_batch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock_picking_batch/models/stock_picking_batch.py b/addons/stock_picking_batch/models/stock_picking_batch.py index cb32a11e0f6..598cf65ea7b 100644 --- a/addons/stock_picking_batch/models/stock_picking_batch.py +++ b/addons/stock_picking_batch/models/stock_picking_batch.py @@ -314,7 +314,7 @@ class StockPickingBatch(models.Model): 'target': 'new', 'context': { 'default_product_ids': self.move_line_ids.product_id.ids, - 'default_move_line_ids': self.move_line_ids.ids, + 'default_move_ids': self.move_ids.ids, 'default_picking_quantity': 'picking'}, }