Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][IMP] stock_move_line_change_lot: add hooks before/after moves reservation #1825

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

sebalix
Copy link
Contributor

@sebalix sebalix commented Jan 8, 2025

With the extraction of shopfloor "change lot" action into this stock_move_line_change_lot module in 16.0 (see OCA/wms@51d5f4ae25), we lost one feature (which was still not merged in 14.0 at that time, but now it is): addition of hooks before/after the reassignment of moves.

This PR ports these hooks that were introduced in 14.0 in shofploor here:

@sebalix sebalix added this to the 16.0 milestone Jan 8, 2025
@sebalix sebalix requested a review from jbaudoux January 8, 2025 10:55
Port of hooks that were added in `shopfloor` 14.0 after that this module
was extracted from `shopfloor` during migration to 16.0:

- OCA/wms/pull/712/commits/c296499726f0f95082bfe40bfb0c137dfd2fb690
- OCA/wms/pull/945/commits/28d4a0116e9c891cd1f37e794e3a7643798260ac
@sebalix sebalix force-pushed the 16-stock_move_line_change_lot-add_hooks branch from ba9cdd8 to 24fecbc Compare January 8, 2025 11:02
@@ -161,6 +165,25 @@ def write(self, vals):
res &= super(StockMoveLine, self - already_processed).write(vals)

if to_reassign_moves:
to_reassign_moves._action_assign()
self._handle_change_lot_reassign(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put in a separate method to avoid flake8 issue:
stock_move_line_change_lot/models/stock_move_line.py:64:5: C901 'StockMoveLine.write' is too complex (17)

@sebalix sebalix marked this pull request as ready for review January 8, 2025 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant