Skip to content

Commit

Permalink
[FIX] delivery_roulier_laposte_fr: fix crash when error must be displ…
Browse files Browse the repository at this point in the history
…ayed to non-admin user
  • Loading branch information
alexis-via committed Sep 21, 2024
1 parent bd3f2e8 commit 34ee086
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions delivery_roulier_laposte_fr/models/stock_quant_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,11 @@ def _laposte_fr_carrier_error_handling(self, payload, exception):
if self._uid > 2:
# rm pwd from dict and xml
payload["auth"]["password"] = "****"
request = "{}<password>****{}".format(
request[: request.index("<password>")],
request[request.index("</password>") :],
request_str = "{}<password>****{}".format(
request[: request.index(b"<password>")],
request[request.index(b"</password>") :],
)
request = request_str.encode("utf-8")

# Webservice error
# on contextualise les réponses ws aux objets Odoo
Expand Down

0 comments on commit 34ee086

Please sign in to comment.