-
-
Notifications
You must be signed in to change notification settings - Fork 658
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
[9.0][FIX]stock_auto_move: fix action_done for automatique moves with lots #367
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this PR is based on #359 |
zakiuu
force-pushed
the
9.0-fix_stock_auto_move_action_done_zak
branch
2 times, most recently
from
September 14, 2017 17:20
449f84d
to
bcef1dc
Compare
lmignon
reviewed
Sep 15, 2017
stock_auto_move/models/stock_move.py
Outdated
lambda m: m.state == 'assigned' and m.auto_move and | ||
m.product_id.tracking != 'none') | ||
auto_moves_operations = \ | ||
auto_moves.mapped('linked_move_operation_ids').\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zakiuu auto_moves.mapped('linked_move_operation_ids.operation_id')
@zakiuu You changes makes sens. Can you check to the Travis error |
zakiuu
force-pushed
the
9.0-fix_stock_auto_move_action_done_zak
branch
from
September 17, 2017 11:33
bcef1dc
to
e1a9397
Compare
* The `_apply` method should not be overridden. In case of three step operation with the last step set to auto move. The override of the `_apply` method was causing the second move to be automatic as well.
zakiuu
force-pushed
the
9.0-fix_stock_auto_move_action_done_zak
branch
from
September 28, 2017 08:37
e1a9397
to
9f8dc2f
Compare
closed by #373 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current behavior: the
stock_auto_move
module allows to tag a movement to be processed automatically. In a situation of chained movements (ex: reception in two steps) with product tracking set toSerial
orLot
, the automatic movements can't be processed, and a message error is raised to the user:You have a difference between the quantity on the operation and the quantities specified for the lots.
Technically speaking this issue comes from the fact there is no quantity set on the
pack_lot_ids
of the operations linked to the movementlinked_move_operation_ids
.In this PR I've tried to fix this issue by providing a method that auto fills the quantity on the
pack_lot_ids
, and also fill theqty_done
of the operations using a new method that I've added called_auto_fill_pack_lot_ids_qty
defined on thestock.pack.operation
model. This method is called from theaction_done
of thestock.move
model.