OCA / delivery-carrier

Odoo Carriers And Deliveries Management
https://odoo-community.org/psc-teams/logistics-18
GNU Affero General Public License v3.0
112 stars 351 forks source link

[16.0][FIX] delivery_postlogistics: splitting package label by package #798

Closed imlopes closed 4 months ago

imlopes commented 5 months ago

Problem :

In a picking, if we create 2 or more packages, after generating the postlogistic labels, all tracking numbers are concatenated on the first package.

image

image

It seems that this behavior was added here : https://github.com/OCA/delivery-carrier/commit/5504c9f26dae2739abb68314bab7ffb2756f332d

More precisely here : https://github.com/OCA/delivery-carrier/blob/5504c9f26dae2739abb68314bab7ffb2756f332d/delivery_postlogistics/postlogistics/web_service.py#L511C1-L518C14

and here : https://github.com/OCA/delivery-carrier/pull/323/files#diff-d3c06dad2d58ebdeb558386909ed5b2ad9ed22d84b8476e5fb2658ae4308d61f

I didn't identify why the code was changed before versions, but now we are always taking the first package when preparing the label values that will be used on write_tracking_number_label method.

rousseldenis commented 5 months ago

@imlopes Thanks for this. Could you maybe add a test to avoid regression ?

OCA-git-bot commented 4 months ago

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

dreispt commented 4 months ago

/ocabot merge patch

OCA-git-bot commented 4 months ago

Hey, thanks for contributing! Proceeding to merge this for you. Prepared branch 16.0-ocabot-merge-pr-798-by-dreispt-bump-patch, awaiting test results.

OCA-git-bot commented 4 months ago

Congratulations, your PR was merged at 68fcaf0b00bb6b0ca3d90729eb9301056c488f5d. Thanks a lot for contributing to OCA. ❤️