-
-
Notifications
You must be signed in to change notification settings - Fork 729
[18.0][MIG] stock_picking_auto_create_package #2030
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
base: 18.0
Are you sure you want to change the base?
[18.0][MIG] stock_picking_auto_create_package #2030
Conversation
85a89ca to
32ca896
Compare
AaronHForgeFlow
left a 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.
👍 Code review LGTM
|
To notify contributors about this migration @raumschmiede-joshuaL @mt-software-de @rousseldenis |
mt-software-de
left a 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.
Thx, for the migration.
| if ml.lot_id: | ||
| vals["lot_id"] = False | ||
| if ml.lot_name: | ||
| vals["lot_name"] = 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.
In v16 it removed the lot, but is this really necessary, and a good approach?
If there is a stock.move.line with a lot for a quantity, it will then be depending on the qty_to_pack, how much you will receive for the scanned lot.
For example: You picked 10 times the same lot and then want to create a automatic package for the qty 1. This will end up with 10 move lines, with a qty of 1. But only the first move.line is containing the lot. The rest will not have any lot.
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.
ping @jbaudoux
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.
@mt-software-de mm yes, it does not make much sense to remove the lot if we are just splitting
… of 1 This will put the move line per piece in a separate package Also it is now possible to package an amount which is not a multiple of a its packaging amount For example: a move over 5 pieces and with a packaging amount of 2 will create 3 packages with following amounts 2 2 1
Currently translated at 11.1% (1 of 9 strings) Translation: stock-logistics-workflow-14.0/stock-logistics-workflow-14.0-stock_picking_auto_create_package Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-14-0/stock-logistics-workflow-14-0-stock_picking_auto_create_package/it/
…re validating the picking
4bed8d9 to
73fc56d
Compare
mt-software-de
left a 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.
LG
|
/ocabot migration stock_picking_auto_create_package |
jbaudoux
left a 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.
As the package creation occurs before action done, to keep same behavior as before, we should rely on a picked quantity and not on the reserved quantity.
So depend on https://github.com/OCA/stock-logistics-workflow/tree/18.0/stock_move_line_qty_picked and replace quantity by picked_qty
WDYT @mt-software-de
If i am getting it correct When you suggesting to rely on IMO there a two possible options here
|
After checking everything for a response of your initial question, i maybe found a general problem with For example: If you end up with:
Then the addon will never create package for a qty of 2 instead i will create two packages with a quantity of 1. What do you think @jbaudoux |
|
Yes exactly
Because it's convenient
Beside shopfloor, this addon is the only one I found so far having to care for this. Other addons hook after action done and not before or don't care about the quantity.
|
|
@jbaudoux Odoo standard already gives us the "picked" boolean in order to check the lines that have been picked, not really sure if we should need to force the dependency or if it can simply be a glue module in case you are using both. |
In <=V16 Odoo used to automatically split the move lines when packing based on the quantity done on the move line (see: https://github.com/odoo/odoo/blob/fd5fe84f70dabc4b7d045f5181508658b6596c9c/addons/stock/models/stock_picking.py#L1457).
Since V17 the qty done field is not used anymore and Odoo is no longer splitting (see: https://github.com/odoo/odoo/blob/c5222a82887b6c5c781fe823865e2573c14e8b7b/addons/stock/models/stock_picking.py#L1782). Therefore, we manage the split ourselves.