Closed manuelregidor closed 2 months ago
@ValentinVinagre
@LoisRForgeFlow @rousseldenis @Cedric-Pigeon Could you have a look, please? Thank you.
@pedrobaeza @etobella This is a critical FIX for this module. Could you give us a hand in order to move it forward?
THX!
AFAIK, the idea is to have all the activities added in one shot. This way, you are only getting one update, not the in between. If the activity order is reversed, then do the for
reversed, but don't remove such loop.
@pedrobaeza What this FIX does is just getting the most recent state update obtained from the carrier, which is in the first position of the list of the states updates list (shipment["package"][0]["activity"][0]). In the previous version of the module, the element of the states updates list that was taken was the last element, which is not correct, as the last element of the list is the oldest state. This is the value that we need to update the delivery_state field.
However, this method also updates the field tracking_state_history with the full list of states updates, placing the most recent states on top, and this part has remained unchaged.
@pedrobaeza Done
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). 🤖
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). 🤖
This PR looks fantastic, let's merge it! Prepared branch 14.0-ocabot-merge-pr-832-by-pedrobaeza-bump-patch, awaiting test results.
Congratulations, your PR was merged at cc09f6ef2c2ebc0da0bf233ac4e1fd48c6677f80. Thanks a lot for contributing to OCA. ❤️
Before this fix, the delivery state was not properly updated, as the first UPS state was taken instead of the last one.