From 28d4a0116e9c891cd1f37e794e3a7643798260ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Alix?= Date: Thu, 14 Nov 2024 17:33:40 +0100 Subject: [PATCH] shopfloor: change_package_lot action, add after assign hook --- shopfloor/actions/change_package_lot.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/shopfloor/actions/change_package_lot.py b/shopfloor/actions/change_package_lot.py index bb56cbafb2..09a9dbccc0 100644 --- a/shopfloor/actions/change_package_lot.py +++ b/shopfloor/actions/change_package_lot.py @@ -167,6 +167,9 @@ def is_lesser(value, other, rounding): # Find other available goods for the lines which were using the # lot before... to_assign_moves._action_assign() + self._change_pack_lot_change_lot__after_assign( + previous_lot, lot, to_assign_moves + ) message = self.msg_store.lot_replaced_by_lot(previous_lot, lot) if message_parts: @@ -176,7 +179,12 @@ def is_lesser(value, other, rounding): def _change_pack_lot_change_lot__before_assign( self, previous_lot, lot, to_assign_moves ): - pass + """Hook to override.""" + + def _change_pack_lot_change_lot__after_assign( + self, previous_lot, lot, to_assign_moves + ): + """Hook to override.""" def _package_content_replacement_allowed(self, package, move_line): # we can't replace by a package which doesn't contain the product...