-
-
Notifications
You must be signed in to change notification settings - Fork 644
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
[14.0][IMP] stock_restrict_lot: validate lot moved is correct #1443
Conversation
Hi @florian-dacosta, |
2ce3838
to
a215e49
Compare
@florian-dacosta should be ready for review now |
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.
Please fix the code by my comments.
a215e49
to
fac88e2
Compare
Thank you for your review @geomer198 , I've addressed all your comments |
fac88e2
to
bbbe514
Compare
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.
LGTM!
This PR has the |
@florian-dacosta looks good to you? :) |
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.
LGTM
But which is the case where we could an inconsistency between the lot of the stock.move.line
and the stock.move
?
Is it manual mistak choosing the wrong lot in the UI? In that case, I guess it could also be solved by adding a domain on the stock.move.line
lot_id
depending on the restrict_lot_id
of the stock.move.
Another possibility, to block the user before the validation, would be to replace the action_done
override by an api.constrains
method to check the lot.
Anyway, ok for me the way it is.
Thanks for the approval! I didn't want to add a constraint because |
@pedrobaeza go with this? |
or actually also @florian-dacosta can merge :) |
/ocabot merge patch |
On my way to merge this fine PR! |
Congratulations, your PR was merged at 75be393. Thanks a lot for contributing to OCA. ❤️ |
Adds a check on picking's validation that the lot indicated in the move line is actually the one in the restriction.
TODO: