From b5d7f5e5f76fb0a7fc6f8734ce857922181a51fc Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Wed, 1 Feb 2017 12:08:38 +0100 Subject: [PATCH] Legal name in report header --- base_usability/company.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/base_usability/company.py b/base_usability/company.py index 2cb4206..dfe6e15 100644 --- a/base_usability/company.py +++ b/base_usability/company.py @@ -61,6 +61,11 @@ class ResCompany(models.Model): } return options + def _report_company_legal_name(self): + '''Method inherited in the module base_company_extension''' + self.ensure_one() + return self.name + # for reports @api.multi def _display_report_header( @@ -70,7 +75,8 @@ class ResCompany(models.Model): res = u'' address = self.partner_id._display_address(without_company=True) address = address.replace('\n', u' - ') - line1 = u'%s - %s' % (self.name, address) + + line1 = u'%s - %s' % (self._report_company_legal_name(), address) lines = [line1] options = self._prepare_header_options() for details in line_details: