From 68327c28b6ef9e5b94d40ab2cf3307e280ac6fdd Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 30 Sep 2024 08:15:07 +0200 Subject: [PATCH] base_usability: Add rcs_siren in company header --- base_usability/models/res_company.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/base_usability/models/res_company.py b/base_usability/models/res_company.py index 78f36a0..a4ffc7c 100644 --- a/base_usability/models/res_company.py +++ b/base_usability/models/res_company.py @@ -69,6 +69,10 @@ class ResCompany(models.Model): 'value': hasattr(self, 'siren') and self.siren or False, 'label': _('SIREN:'), }, + 'rcs_siren': { + 'value': hasattr(self, 'siren') and self.siren and self.company_registry and f"{self.company_registry} {self.siren}", + 'label': 'RCS', + }, 'eori': { 'value': self._get_eori(), 'label': _('EORI:'), @@ -102,7 +106,7 @@ class ResCompany(models.Model): """This method is designed to be inherited""" # I decided not to put email in the default header because only a few very small # companies have a generic company email address - line_details = [['phone', 'website', 'capital'], ['vat', 'siret', 'eori', 'ape']] + line_details = [['phone', 'website', 'rcs_siren', 'capital'], ['vat', 'siret', 'eori', 'ape']] return line_details # for reports