Browse Source

fix res.partner.title handling in Internetmarke Address Generation

We don't want to try to print the object, but the abbreviated version
of the title
for/master
Harald Welte 5 years ago
parent
commit
6403eb7151
  1. 5
      models/dp_delivery_carrier.py

5
models/dp_delivery_carrier.py

@ -68,7 +68,10 @@ class DPDeliveryCarrier(models.Model):
person = None
if partner.name:
(first, last) = split_first_lastname(partner.name)
person = im.build_pers_name(first=first, last=last, title=partner.title)
title = None
if partner.title and partner.title.shortcut:
title = partner.title.shortcut
person = im.build_pers_name(first=first, last=last, title=title)
return im.build_comp_addr(company = partner.parent_id.name,
address = addr,
person = person)

Loading…
Cancel
Save