From 11c710d990974a347ea52230c3967317daf42e15 Mon Sep 17 00:00:00 2001 From: "Tiffany Chang (tic)" Date: Tue, 7 Apr 2020 15:18:37 +0000 Subject: [PATCH] [FIX] delivery: add barcode app check into package wizard Because the barcode app bypasses the detailed operations for receipts (with default settings set), an error was being thrown when doing "put in pack" when a carrier is set (saving during the delivery package wizard) because the picking move lines are incorrectly selected. This commit adds in a check for when the wizard is accessed via the barcode app so that the error does not occur and the same behavior as when no carrier is assigned is followed. Related Enterprise PR: odoo/enterprise#9808 closes odoo/odoo#59792 Task: 2039720 X-original-commit: 945b5f6791ae890498ef9a34828eaf91dc1457e2 Signed-off-by: Arnold Moyaux --- addons/delivery/wizard/choose_delivery_package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/delivery/wizard/choose_delivery_package.py b/addons/delivery/wizard/choose_delivery_package.py index 83026e5e3d6..f5299832451 100644 --- a/addons/delivery/wizard/choose_delivery_package.py +++ b/addons/delivery/wizard/choose_delivery_package.py @@ -48,7 +48,7 @@ class ChooseDeliveryPackage(models.TransientModel): def action_put_in_pack(self): picking_move_lines = self.picking_id.move_line_ids - if not self.picking_id.picking_type_id.show_reserved: + if not self.picking_id.picking_type_id.show_reserved and not self.env.context.get('barcode_view'): picking_move_lines = self.picking_id.move_line_nosuggest_ids move_line_ids = picking_move_lines.filtered(lambda ml: