Update company/name in report
This commit is contained in:
@@ -69,13 +69,19 @@ class ResPartner(models.Model):
|
|||||||
# To make the icons work with py3o with PDF export, on the py3o server:
|
# To make the icons work with py3o with PDF export, on the py3o server:
|
||||||
# 1) sudo apt-get install fonts-symbola
|
# 1) sudo apt-get install fonts-symbola
|
||||||
# 2) start libreoffice in xvfb (don't use --headless) (To confirm)
|
# 2) start libreoffice in xvfb (don't use --headless) (To confirm)
|
||||||
|
if self.is_company:
|
||||||
|
company = self.name
|
||||||
|
name = False
|
||||||
|
else:
|
||||||
|
name = self.name_title
|
||||||
|
company = self.parent_id and self.parent_id.is_company and\
|
||||||
|
self.parent_id.name or False
|
||||||
options = {
|
options = {
|
||||||
'name': {
|
'name': {
|
||||||
'value': self.name_title,
|
'value': name,
|
||||||
},
|
},
|
||||||
'company': {
|
'company': {
|
||||||
'value': self.parent_id and self.parent_id.is_company and
|
'value': company,
|
||||||
self.parent_id.name or False,
|
|
||||||
},
|
},
|
||||||
'phone': {
|
'phone': {
|
||||||
'value': self.phone,
|
'value': self.phone,
|
||||||
|
|||||||
Reference in New Issue
Block a user