Skip to content
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

stock_picking_group_by_partner_by_carrier & delivery: wrong sale_id #1833

Open
jbaudoux opened this issue Jan 17, 2025 · 0 comments
Open

stock_picking_group_by_partner_by_carrier & delivery: wrong sale_id #1833

jbaudoux opened this issue Jan 17, 2025 · 0 comments
Labels

Comments

@jbaudoux
Copy link
Contributor

jbaudoux commented Jan 17, 2025

As the module merges pickings from different sales orders, a new sale_ids field is incremented. The standard field sale_id represents the first sales order that created the procurement group.
Many odoo delivery modules relies on the sale_id field. The OCA delivery_packag_fee also: https://github.com/OCA/delivery-carrier/blob/16.0/delivery_package_fee/models/stock_picking.py#L23

If you partially deliver but you don't deliver anything from the initial SO that created the procurement group, the shipping will be declared for that original SO (deliver_... modules) and delivery fee will be added on the original SO where there is nothing to invoice (in standard odoo, a sales order with only delivery fees to invoice is not marked as to invoice).

I think stock_picking_group_by_partner_by_carrier is lacking the update of sale_id (as well as likely sale_ids) on action_done before the call to send_to_shipper.

Maybe there is also an issue if you add a move in the delivered picking and it doesn't get added to one of the delivered SO but to the original SO.

Needs to be tested if this suspected issue can be reproduced and confirmed

@sebalix @rousseldenis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant