From 183a88d26ce555a81960d13a1eed5642d4850918 Mon Sep 17 00:00:00 2001 From: Simone Orsi Date: Mon, 13 Feb 2023 14:20:36 +0100 Subject: [PATCH] shopfloor: add hook before assign after change lot --- shopfloor/actions/change_package_lot.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/shopfloor/actions/change_package_lot.py b/shopfloor/actions/change_package_lot.py index 4a2ed00c50..bb56cbafb2 100644 --- a/shopfloor/actions/change_package_lot.py +++ b/shopfloor/actions/change_package_lot.py @@ -161,6 +161,9 @@ def is_lesser(value, other, rounding): # lines move_line.move_id._action_assign() + self._change_pack_lot_change_lot__before_assign( + previous_lot, lot, to_assign_moves + ) # Find other available goods for the lines which were using the # lot before... to_assign_moves._action_assign() @@ -170,6 +173,11 @@ def is_lesser(value, other, rounding): message["body"] = "{} {}".format(message["body"], " ".join(message_parts)) return response_ok_func(move_line, message=message) + def _change_pack_lot_change_lot__before_assign( + self, previous_lot, lot, to_assign_moves + ): + pass + def _package_content_replacement_allowed(self, package, move_line): # we can't replace by a package which doesn't contain the product... return move_line.product_id in package.quant_ids.product_id