diff --git a/__manifest__.py b/__manifest__.py index ce6b71780f77939b484389c149d3980189bf4573..058cd134aaf82d1f25b90edb69969bebe974ff6e 100644 --- a/__manifest__.py +++ b/__manifest__.py @@ -23,7 +23,6 @@ "views/res_partner.xml", "views/cgscop_inpi_director_views.xml", # templates - ], "installable": True, "auto_install": False, diff --git a/models/res_partner.py b/models/res_partner.py index 65ca18aa312d0d563f1c1ded49f29926319f27e4..a5260bdf31c0d95ec634faf26eab4385fc787887 100644 --- a/models/res_partner.py +++ b/models/res_partner.py @@ -264,6 +264,7 @@ class ResPartner(models.Model): "is_company": True, "siret": inpi_facility.descriptionEtablissement.siret, "naf_id": inpi_naf_id.id, + "lang": "fr_FR", } facility_values.update(inpi_adress) logger.info( diff --git a/views/res_partner.xml b/views/res_partner.xml index a5abebccee2d40eaa3ce517d59df98f5e57b7660..4fcfe9cdb1344600db18b2fd3c74008259a61ffa 100644 --- a/views/res_partner.xml +++ b/views/res_partner.xml @@ -13,10 +13,9 @@ /> <field name="arch" type="xml"> <xpath expr="//notebook" position="inside"> - <page name="director_page" string="Dirigeants"> + <page name="director_page" string="Dirigeants" attrs="{'invisible': [('is_cooperative', '!=', True)]}" > <field name="inpi_director_ids" /> </page> - </xpath> </field> </record> diff --git a/wizard/inpi_update_wizard.py b/wizard/inpi_update_wizard.py index 4ea8ce9c57f511cd350a8424e77f5c211488cc25..2c80017d7640a19556c7aef2596495c7cf07d8f8 100644 --- a/wizard/inpi_update_wizard.py +++ b/wizard/inpi_update_wizard.py @@ -43,4 +43,6 @@ class InpiUpdateWizard(models.TransientModel): scop_to_update = self.partner_ids for scop in scop_to_update: - scop.sudo().with_delay().update_from_inpi(update_type="all") + scop.sudo().with_delay( + description=f"Mise à jours INPI: {scop.name}" + ).update_from_inpi(update_type="all")