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 6 years ago
parent 685c315fa3
commit 6403eb7151

@ -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