From b6b7b8f7d5d67d826ac899e5c0745ba1ead793c1 Mon Sep 17 00:00:00 2001 From: Benjamin <benjamin@le-filament.com> Date: Tue, 4 Feb 2020 18:48:03 +0100 Subject: [PATCH] [mig] migration v12 + add closed institution --- __init__.py | 1 - __manifest__.py | 6 +----- models/__init__.py | 1 - models/res_partner.py | 2 -- views/res_partner.xml | 2 -- wizard/__init__.py | 1 - wizard/wizard_siren.py | 6 ++++-- wizard/wizard_siren.xml | 4 +++- 8 files changed, 8 insertions(+), 15 deletions(-) diff --git a/__init__.py b/__init__.py index 4218e82..93aa2c1 100644 --- a/__init__.py +++ b/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from . import models diff --git a/__manifest__.py b/__manifest__.py index 30e5a6a..be73e68 100644 --- a/__manifest__.py +++ b/__manifest__.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - # © 2018 Le Filament (<https://www.le-filament.com>) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). @@ -20,7 +18,5 @@ 'wizard/wizard_siren.xml', 'views/res_partner.xml', ], - 'qweb': [ - 'static/src/xml/*.xml', - ], + 'qweb': [], } diff --git a/models/__init__.py b/models/__init__.py index 2d6da85..c6cc3b3 100644 --- a/models/__init__.py +++ b/models/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from . import res_partner diff --git a/models/res_partner.py b/models/res_partner.py index 34768b2..94a8c85 100644 --- a/models/res_partner.py +++ b/models/res_partner.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - # © 2018 Le Filament (<http://www.le-filament.com>) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). diff --git a/views/res_partner.xml b/views/res_partner.xml index 18de112..86fc290 100644 --- a/views/res_partner.xml +++ b/views/res_partner.xml @@ -1,6 +1,4 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright 2018 Le Filament (<https://www.le-filament.com>) - License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> <odoo> <data> <!-- Client Form View --> diff --git a/wizard/__init__.py b/wizard/__init__.py index 5fc4b17..1cb9160 100644 --- a/wizard/__init__.py +++ b/wizard/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from . import wizard_siren diff --git a/wizard/wizard_siren.py b/wizard/wizard_siren.py index da4e03b..a0438ac 100644 --- a/wizard/wizard_siren.py +++ b/wizard/wizard_siren.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - # © 2018 Le Filament (<https://www.le-filament.com>) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). @@ -51,6 +49,9 @@ class SirenWizard(models.TransientModel): 'effectif': data.get('trancheeffectifsunitelegale', 0), 'ess': (True if data.get('economiesocialesolidaireunitelegale') else False), + 'etat_etablissement': data.get( + 'etatadministratifetablissement', + False), } def get_company_lines(self): @@ -97,6 +98,7 @@ class SirenWizardCompanies(models.TransientModel): effectif = fields.Char("Effectif") ess = fields.Boolean("ESS", default=False) categorie = fields.Char("Catégorie") + etat_etablissement = fields.Char("Etat établissement") # Action @api.multi diff --git a/wizard/wizard_siren.xml b/wizard/wizard_siren.xml index a415981..aa2e0d8 100644 --- a/wizard/wizard_siren.xml +++ b/wizard/wizard_siren.xml @@ -14,11 +14,12 @@ <button class="btn btn-sm btn-primary" name="get_company_lines" string="Rechercher" type="object"/> </h4> <field name="company_lines" readonly="True"> - <tree> + <tree decoration-it="etat_etablissement == 'Fermé'" decoration-danger="etat_etablissement == 'Fermé'" > <field name="name" /> <field name="street" /> <field name="zip" /> <field name="city" /> + <field name="etat_etablissement" /> <button class="btn btn-primary" name="update_partner" string="Sélectionner" type="object" confirm="Valider l'entreprise sélectionnée ?"/> </tree> </field> @@ -50,6 +51,7 @@ <field name="lib_ape" /> </group> <group string="Infos Entreprise"> + <field name="etat_etablissement" /> <field name="categorie" /> <field name="date_creation" /> <field name="effectif" /> -- GitLab