-
-
Notifications
You must be signed in to change notification settings - Fork 148
[18.0][FIX] Fix shipment advice function is_loaded_in_shipment #204
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?
Conversation
|
Hi @jbaudoux, |
|
@TDu When the move line is marked as picked by the move line load_shipment, the package level is then also marked as is_done. However, I see the compute is_done is lacking a depends on move_line_ids.picked If we write also the current quantity when we mark as picked, will it trigger the compute is_done? This way, it will work without the patch on odoo. Also I prefer we don't rely on is_done if possible as this is dropped in odoo v19. |
584b722 to
77dc424
Compare
Following the change from the PR * OCA#200 There was an issue with the is loaded function on package level. This fixes the function by not relying on the state of the package level but the state of move lines it contains.
77dc424 to
3cad079
Compare
|
Added a unit test |
| return all([pl.is_done and pl.shipment_advice_id for pl in self]) | ||
| return all( | ||
| [ | ||
| all([line.picked for line in pl.move_line_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.
| all([line.picked for line in pl.move_line_ids]) | |
| pl.move_line_ids and all([line.picked for line in pl.move_line_ids]) |
|
@TDu Can't we just invalidate is_done on the corresponding package levels when we mark a move line as picked in the move line load shipment ? |
Finally fixing the broken function after the commit described below
Revert
It breaks the module
shopfloor_delivery_shipmentBecause this function
stock-logistics-transport/shipment_advice/models/stock_package_level.py
Line 43 in a1b8ac8
is_donefield. And it is not covered by tests 😞Also there is a fix proposed on odoo for the root cause of the issue