Skip to content

Commit

Permalink
postlogistics: Set customer name mandatory
Browse files Browse the repository at this point in the history
  • Loading branch information
mmequignon authored and sebalix committed Oct 4, 2023
1 parent 4c0495d commit 453ff3f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions delivery_postlogistics/postlogistics/web_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ def _prepare_customer(self, picking):
if picking.picking_type_id.code != "outgoing":
partner = picking.partner_id

if not partner.name:
raise exceptions.UserError(_("Customer name is required."))
customer = {
"name1": self._sanitize_string(partner.name),
"street": self._sanitize_string(partner.street),
Expand Down

0 comments on commit 453ff3f

Please sign in to comment.