Skip to content

Commit

Permalink
Merge PR #3732 into 15.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Sep 24, 2024
2 parents 6fd1600 + c5aad41 commit 06a8876
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion delivery_seur_atlas/models/delivery_carrier.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ def _prepare_seur_atlas_shipping(self, picking):
"""The payload isn't compatible with the legacy API so a brand new method
has to be made"""
partner = picking.partner_id
partner_country_code = partner.country_id.code or ""
# SEUR oddity: Andorra is treated as domestic delivery
if partner_country_code == "AD":
partner_country_code = "ES"
partner_name = partner.display_name
# When we get a specific delivery address we want to prioritize its
# name over the commercial one
Expand Down Expand Up @@ -134,7 +138,7 @@ def _prepare_seur_atlas_shipping(self, picking):
),
"cityName": partner.city,
"postalCode": partner.zip,
"country": (partner.country_id and partner.country_id.code or ""),
"country": partner_country_code,
},
},
"sender": {
Expand Down

0 comments on commit 06a8876

Please sign in to comment.