-
-
Notifications
You must be signed in to change notification settings - Fork 489
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] repair_stock_move: relate lot_id and common methods #1375
base: 14.0
Are you sure you want to change the base?
Conversation
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.
Have a look if my comment makes sense, maybe it isn't the desired functionality
Hi, I can't see the comment! |
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.
sorry, now I saved the comment. try again :)
if rec.move_id.move_line_ids: | ||
rec.lot_id = ( | ||
rec.move_id.move_line_ids[0].lot_id | ||
if rec.move_id.move_line_ids.mapped("lot_id") | ||
else False | ||
) |
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.
There could be an edge case if the lot_id is not assigned on the first move_line_ids.
Don't know if makes sense like this. give it a try
if rec.move_id.move_line_ids: | |
rec.lot_id = ( | |
rec.move_id.move_line_ids[0].lot_id | |
if rec.move_id.move_line_ids.mapped("lot_id") | |
else False | |
) | |
if rec.move_id.move_line_ids.lot_id: | |
rec.lot_id = rec.move_id.move_line_ids.lot_id[0] | |
else: | |
rec.lot_id = False |
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.
I fixed the corner case thx! Your code give me some errors so I changed it a little bit!
The value of lot id in repair lines is not related to the one of the move related. The idea is to make them correlated to improve visibility. Also added stock_rule._get_custom_move_fields method from repair_picking as it should be added in the module that adds the field.
68240fc
to
dc744bb
Compare
The value of lot id in repair lines is not related to the one of the move related. The idea is to make them correlated to improve visibility. Also added stock_rule._get_custom_move_fields method from repair_picking as it should be added in the module that adds the field.
@ForgeFlow