Skip to content

Commit

Permalink
Merge PR #728 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by sebalix
  • Loading branch information
OCA-git-bot committed Jun 21, 2024
2 parents c6365d1 + dd67e71 commit 795e4a9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions delivery_postlogistics/postlogistics/web_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,11 @@ def _prepare_customer(self, picking):
if picking.picking_type_id.code != "outgoing":
partner = picking.partner_id

if not partner.name:
partner_name = partner.name or partner.parent_id.name
if not partner_name:
raise exceptions.UserError(_("Customer name is required."))
customer = {
"name1": self._sanitize_string(partner.name)[:35],
"name1": self._sanitize_string(partner_name)[:35],
"street": self._sanitize_string(partner.street)[:35],
"zip": self._sanitize_string(partner.zip)[:10],
"city": self._sanitize_string(partner.city)[:35],
Expand Down

0 comments on commit 795e4a9

Please sign in to comment.