Skip to content

Commit

Permalink
shopfloor: add hook before assign after change lot
Browse files Browse the repository at this point in the history
  • Loading branch information
simahawk authored and TDu committed Nov 30, 2023
1 parent 844618b commit 183a88d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions shopfloor/actions/change_package_lot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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
Expand Down

0 comments on commit 183a88d

Please sign in to comment.