From 2f275a1aa606390a53f4daf94525d8de1b96ea79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Alix?= Date: Mon, 2 Nov 2020 10:27:04 +0100 Subject: [PATCH] shopfloor: fix singleton error --- shopfloor/models/stock_move_line.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/shopfloor/models/stock_move_line.py b/shopfloor/models/stock_move_line.py index bd8b2c3de3..f6105e4d55 100644 --- a/shopfloor/models/stock_move_line.py +++ b/shopfloor/models/stock_move_line.py @@ -89,14 +89,13 @@ def _split_pickings_from_source_location(self): "backorder_id": picking.id, } ) - pickings.message_post( - body=_( - 'The backorder %s has been created.' - ) - % (new_picking.id, new_picking.name) - ) + message = _( + 'The backorder %s has been created.' + ) % (new_picking.id, new_picking.name) + for pick in pickings: + pick.message_post(body=message) new_moves.write({"picking_id": new_picking.id}) new_moves.mapped("move_line_ids").write({"picking_id": new_picking.id}) new_moves.move_line_ids.package_level_id.write(