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
This commit is contained in:
parent
685c315fa3
commit
6403eb7151
|
@ -68,7 +68,10 @@ class DPDeliveryCarrier(models.Model):
|
||||||
person = None
|
person = None
|
||||||
if partner.name:
|
if partner.name:
|
||||||
(first, last) = split_first_lastname(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,
|
return im.build_comp_addr(company = partner.parent_id.name,
|
||||||
address = addr,
|
address = addr,
|
||||||
person = person)
|
person = person)
|
||||||
|
|
Loading…
Reference in New Issue