Skip to content
Extraits de code Groupes Projets
Valider e9f1a254 rédigé par Rémi - Le Filament's avatar Rémi - Le Filament
Parcourir les fichiers

Add category per UR and rework data import

parent 0ec8ba25
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
"views/scop_config_views.xml", "views/scop_config_views.xml",
"views/scop_config_lists_views.xml", "views/scop_config_lists_views.xml",
"datas/res.country.csv", "datas/res.country.csv",
"datas/union.regionale.csv",
"datas/res.partner.category.csv",
"datas/res.partner.certification.csv", "datas/res.partner.certification.csv",
"datas/res.partner.company.type.csv", "datas/res.partner.company.type.csv",
"datas/res.partner.cooperative.form.csv", "datas/res.partner.cooperative.form.csv",
...@@ -40,6 +42,5 @@ ...@@ -40,6 +42,5 @@
"datas/scop.legal.event.type.csv", "datas/scop.legal.event.type.csv",
"datas/scop.membership.reason.end.csv", "datas/scop.membership.reason.end.csv",
"datas/scop.membership.type.csv", "datas/scop.membership.type.csv",
"datas/union.regionale.csv",
] ]
} }
"id","ur_id","id_riga","name"
aura_01,"AURA","11776","Alimentation / Agriculture / Horticulture"
aura_02,"AURA","14074","Bois / Ameublement / carton / Verre / Céramique"
aura_03,"AURA","11777","BTP et activités connexes"
aura_04,"AURA","14075","Bureaux d'etudes batiment"
aura_05,"AURA","14076","Cuirs et étoffes"
aura_06,"AURA","14077","Divers"
aura_07,"AURA","14078","Fonderie / Travail des métaux / Mécanique"
aura_08,"AURA","14079","Industrie du livre et communication"
aura_09,"AURA","14080","Services intellectuels et culturels"
aura_10,"AURA","14081","Services matériels"
idf_01,"Paris","14071","ACTION SOCIALE"
idf_02,"Paris","14073","ALIMENTATION / COMMERCE"
idf_03,"Paris","11772","ARTISANAT / PETITE PRODUCTION"
idf_04,"Paris","14063","BTP"
idf_05,"Paris","14068","COMMUNICATION / WEB / PRESSE / EVT"
idf_06,"Paris","14069","CULTURE / LOISIR"
idf_07,"Paris","14072","EDITION"
idf_08,"Paris","14064","ETUDES ET CONCEPTION BTP / AMENAGEMENT TERRITOIRE "
idf_09,"Paris","14070","FORMATION / ACCOMPAGNEMENT DES PERSONNES"
idf_10,"Paris","14065","FORMATION / CONSEIL AUX ORGANISATIONS"
idf_11,"Paris","14062","IMPRIMERIE / REPROGRAPHIE / FACONNAGE / ROUTAGE"
idf_12,"Paris","11771","INDUSTRIE"
idf_13,"Paris","14067","INFORMATIQUE (développement, conseil, maintenance)"
idf_14,"Paris","14066","PRESTATION DE SERVICE"
idf_15,"Paris","11773","TRANSPORT / MANUTENTION"
\ No newline at end of file
id,id_riga,name id,id_riga,name
"riga_16747",16747,"Aéronautique EN9100" riga_16747,16747,"Aéronautique EN9100"
"riga_14102",14102,"Autres (à preciser)" riga_14102,14102,"Autres (à preciser)"
"riga_13038",13038,"Centre de formation" riga_13038,13038,"Centre de formation"
"riga_11571",11571,"Entreprise adaptée" riga_11571,11571,"Entreprise adaptée"
"riga_11570",11570,"Entreprise d'insertion" riga_11570,11570,"Entreprise d'insertion"
"riga_11573",11573,"Entreprise Solidaire" riga_11573,11573,"Entreprise Solidaire"
"riga_16429",16429,"ESUS" riga_16429,16429,"ESUS"
"riga_11576",11576,"ISO 14 001" riga_11576,11576,"ISO 14 001"
"riga_16538",16538,"ISO 26 000" riga_16538,16538,"ISO 26 000"
"riga_11575",11575,"ISO 9 001" riga_11575,11575,"ISO 9 001"
"riga_11574",11574,"Jeune Entreprise Innovante" riga_11574,11574,"Jeune Entreprise Innovante"
"riga_13037",13037,"Lamaneur" riga_13037,13037,"Lamaneur"
"riga_16774",16774,"QHSAS 18001" riga_16774,16774,"QHSAS 18001"
"riga_16775",16775,"QUALIPAYSAGE" riga_16775,16775,"QUALIPAYSAGE"
"riga_14126",14126,"SAP" riga_14126,14126,"SAP"
"riga_11572",11572,"Services à la personne" riga_11572,11572,"Services à la personne"
id,name,id_riga,shortcut id,name,id_riga,shortcut
"riga_14675","Artisan / Commerçant",14675,"" riga_14675,"Artisan / Commerçant",14675,""
"riga_14672","Association loi 1901 ou assimilée",14672,"asso" riga_14672,"Association loi 1901 ou assimilée",14672,"asso"
"riga_14673","Collectivité territoriale",14673,"" riga_14673,"Collectivité territoriale",14673,""
"riga_14674","Profession libérale",14674,"" riga_14674,"Profession libérale",14674,""
"riga_14669","Société à Responsabilité Limitée (SARL)",14669,"SARL" riga_14669,"Société à Responsabilité Limitée (SARL)",14669,"SARL"
"riga_16496","Société à Responsabilité Limitée (SARL) unipersonnelle",16496,"SARLU" riga_16496,"Société à Responsabilité Limitée (SARL) unipersonnelle",16496,"SARLU"
"riga_14668","Société Anonyme à Conseil d'Administration",14668,"SA" riga_14668,"Société Anonyme à Conseil d'Administration",14668,"SA"
"riga_14670","Société Anonyme à directoire",14670,"SA" riga_14670,"Société Anonyme à directoire",14670,"SA"
"riga_14677","Société civile coopérative",14677,"" riga_14677,"Société civile coopérative",14677,""
"riga_14860","Société Civile Immobilière (SCI)",14860,"SCI" riga_14860,"Société Civile Immobilière (SCI)",14860,"SCI"
"riga_16771","Société d exercice libéral par action simplifiée (SELAS)",16771,"SELAS" riga_16771,"Société d exercice libéral par action simplifiée (SELAS)",16771,"SELAS"
"riga_14671","Société par actions simplifiée (SAS)",14671,"SAS" riga_14671,"Société par actions simplifiée (SAS)",14671,"SAS"
"riga_16399","Société par actions simplifiée à associé unique (SASU)",16399,"SAS" riga_16399,"Société par actions simplifiée à associé unique (SASU)",16399,"SAS"
"id","parent_id:id","name","id_riga" "id","parent_id:id","name","id_riga"
"riga_14215",,"Ex-Nihilo",14215 exnihilo,,"Ex-Nihilo",14215
15,"riga_14215","Création par des porteurs de projet",14648 exnihilo_5,exnihilo,"Création par des porteurs de projet",14648
16,"riga_14215","Création d'une filiale de Scop ou de Scic",14649 exnihilo_6,exnihilo,"Création d'une filiale de Scop ou de Scic",14649
17,"riga_14215","Essaimage",14658 exnihilo_7,exnihilo,"Essaimage",14658
"riga_14634",,"Transmission d'entreprise saine",14634 transmission,,"Transmission d'entreprise saine",14634
21,"riga_14634","Transmission d'une entreprise indépendante saine avec départ des dirigeants (succession)",14993 transmission_1,transmission,"Transmission d'une entreprise indépendante saine avec départ des dirigeants (succession)",14993
22,"riga_14634","Transmission d'une entreprise indépendante saine avec maintien des dirigeants",14992 transmission_2,transmission,"Transmission d'une entreprise indépendante saine avec maintien des dirigeants",14992
26,"riga_14634","Transmission d'une filiale suite à restructuration de groupe",14661 transmission_6,transmission,"Transmission d'une filiale suite à restructuration de groupe",14661
27,"riga_14634","Transmission d'une filiale d'une association",14660 transmission_7,transmission,"Transmission d'une filiale d'une association",14660
"riga_14217",,"Reprise d'entreprise en difficulté",14217 reprise,,"Reprise d'entreprise en difficulté",14217
35,"riga_14217","Reprise d'une entreprise en procédure collective",14656 reprise_5,reprise,"Reprise d'une entreprise en procédure collective",14656
36,"riga_14217","Reprise d'une entreprise en difficulté économique",14652 reprise_6,reprise,"Reprise d'une entreprise en difficulté économique",14652
37,"riga_14217","Création suite à un arrêt d'activité",14655 reprise_7,reprise,"Création suite à un arrêt d'activité",14655
"riga_14218",,"Transformation d'association ou de coopérative",14218 transformation,,"Transformation d'association ou de coopérative",14218
45,"riga_14218","Transformation d'une association (hors association de préfiguration)",14659 transformation_5,transformation,"Transformation d'une association (hors association de préfiguration)",14659
46,"riga_14218","Transformation d'une Coopérative",14653 transformation_6,transformation,"Transformation d'une Coopérative",14653
id,id_riga,long_name,name id,id_riga,long_name,name
"ur_idf","12784","UNION REGIONALE DES SCOP ILE DE FRANCE CENTRE VAL DE LOIRE DOM-TOM","Paris" ur_idf,"12784","UNION REGIONALE DES SCOP ILE DE FRANCE CENTRE VAL DE LOIRE DOM-TOM","Paris"
"ur_hdf","12785","UNION REGIONALE DES SCOP HAUTS DE FRANCE","Hauts-de-France" ur_hdf,"12785","UNION REGIONALE DES SCOP HAUTS DE FRANCE","Hauts-de-France"
"ur_bfc","12787","UNION REGIONALE DES SCOP BOURGOGNE FRANCHE COMTE","Bourgogne" ur_bfc,"12787","UNION REGIONALE DES SCOP BOURGOGNE FRANCHE COMTE","Bourgogne"
"ur_ge","12788","UNION REGIONALE DES SCOP GRAND EST","Est" ur_ge,"12788","UNION REGIONALE DES SCOP GRAND EST","Est"
"ur_arh","12789","UNION REGIONALE DES SCOP AUVERGNE RHONE ALPES","AURA" ur_arh,"12789","UNION REGIONALE DES SCOP AUVERGNE RHONE ALPES","AURA"
"ur_pacac","12791","UNION REGIONALE DES SCOP PROVENCE ALPES COTE D'AZUR CORSE","Paca" ur_pacac,"12791","UNION REGIONALE DES SCOP PROVENCE ALPES COTE D'AZUR CORSE","Paca"
"ur_mp","12792","UNION REGIONALE DES SCOP MIDI PYRENEES","Midi Pyrénées" ur_mp,"12792","UNION REGIONALE DES SCOP MIDI PYRENEES","Midi Pyrénées"
"ur_lim","12793","UNION REGIONALE DES SCOP LIMOUSIN","Limousin Berry" ur_lim,"12793","UNION REGIONALE DES SCOP LIMOUSIN","Limousin Berry"
"ur_pc","12794","UNION REGIONALE DES SCOP POITOU CHARENTES","Poitou Charentes" ur_pc,"12794","UNION REGIONALE DES SCOP POITOU CHARENTES","Poitou Charentes"
"ur_go","12795","UNION REGIONALE DES SCOP OUEST","Ouest" ur_go,"12795","UNION REGIONALE DES SCOP OUEST","Ouest"
"ur_aq","12796","UNION REGIONALE DES SCOP AQUITAINE","Aquitaine" ur_aq,"12796","UNION REGIONALE DES SCOP AQUITAINE","Aquitaine"
"ur_lr","12797","UNION REGIONALE DES SCOP LANGUEDOC ROUSSILLON","Languedoc Roussillon" ur_lr,"12797","UNION REGIONALE DES SCOP LANGUEDOC ROUSSILLON","Languedoc Roussillon"
...@@ -12,5 +12,4 @@ class ResCompany(models.Model): ...@@ -12,5 +12,4 @@ class ResCompany(models.Model):
# Renvoie l'UR de l'utlisateur courant # Renvoie l'UR de l'utlisateur courant
return self.env['res.users']._get_ur() return self.env['res.users']._get_ur()
ur_id = fields.Many2one('union.regionale', string='UR', ur_id = fields.Many2one('union.regionale', string='UR')
default="_ur_default_get")
...@@ -388,8 +388,7 @@ class ScopPartner(models.Model): ...@@ -388,8 +388,7 @@ class ScopPartner(models.Model):
@api.multi @api.multi
def coop_open_act(self): def coop_open_act(self):
user_current = self.env.user.id ur_current = self.env.user.company_id.ur_id
company_current = self.env['res.company'].browse(self.env.user.company_id.id)
return { return {
'name': _("Cooperative"), 'name': _("Cooperative"),
'type': 'ir.actions.act_window', 'type': 'ir.actions.act_window',
...@@ -398,13 +397,34 @@ class ScopPartner(models.Model): ...@@ -398,13 +397,34 @@ class ScopPartner(models.Model):
'view_type': 'form', 'view_type': 'form',
'views': [[False, 'tree'], [False, 'form'], ], 'views': [[False, 'tree'], [False, 'form'], ],
# 'context': {'search_default_company_id': [company_current.id]}, # 'context': {'search_default_company_id': [company_current.id]},
'context': {'search_default_type_cooperative': True, 'search_default_company_id': [company_current.id], 'default_is_company': True, 'default_is_cooperative': True, 'default_company_type': 'company', 'default_project_status': '5_suivi'}, 'context': {'search_default_type_cooperative': True,
'search_default_ur_id': [ur_current.id],
'default_is_company': True,
'default_is_cooperative': True,
'default_company_type': 'company',
'default_project_status': '5_suivi'},
'target': 'current', 'target': 'current',
} }
# @api.multi # @api.multi
# def action_deces(self): # def action_deces(self):
class ScopPartnerCategory(models.Model):
_inherit = "res.partner.category"
def _default_ur(self):
return self.env['res.company']._ur_default_get()
id_riga = fields.Integer("ID RIGA")
ur_id = fields.Many2one(
'union.regionale',
string='Union Régionale',
index=True,
on_delete='restrict',
default=_default_ur)
class ResPartneCertification(models.Model): class ResPartneCertification(models.Model):
_name = "res.partner.certification" _name = "res.partner.certification"
_description = "Certification" _description = "Certification"
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
modifiers="{'readonly':['|','&',['type','=','contact'],['parent_id','!=',false],['is_cooperative','=',True]]}"/> modifiers="{'readonly':['|','&',['type','=','contact'],['parent_id','!=',false],['is_cooperative','=',True]]}"/>
<field name="street3" placeholder="Rue 3..." class="o_address_street" attrs="{'readonly': ['|', '&amp;', ('type', '=', 'contact'), ('parent_id', '!=', False), ('is_cooperative','=',True)]}" <field name="street3" placeholder="Rue 3..." class="o_address_street" attrs="{'readonly': ['|', '&amp;', ('type', '=', 'contact'), ('parent_id', '!=', False), ('is_cooperative','=',True)]}"
modifiers="{'readonly':['|','&amp;',['type','=','contact'],['parent_id','!=',false],['is_cooperative','=',True]]}"/> modifiers="{'readonly':['|','&amp;',['type','=','contact'],['parent_id','!=',false],['is_cooperative','=',True]]}"/>
<field name="zip_id" options="{'create_name_field': 'city', 'no_open': True, 'no_create': True}" placeholder="Location completion" class="oe_edit_only" <field name="zip_id" options="{'create_name_field': 'city', 'no_open': True, 'no_create': True}" placeholder="CP - Ville autocompletion..." class="oe_edit_only"
attrs="{'readonly': ['|', '&amp;', ('type', '=', 'contact'), ('parent_id', '!=', False), ('is_cooperative','=',True)]}" attrs="{'readonly': ['|', '&amp;', ('type', '=', 'contact'), ('parent_id', '!=', False), ('is_cooperative','=',True)]}"
on_change="1" can_create="true" can_write="true" on_change="1" can_create="true" can_write="true"
modifiers="{'readonly':['|','&amp;',['type','=','contact'],['parent_id','!=',false],['is_cooperative','=',True]]}"/> modifiers="{'readonly':['|','&amp;',['type','=','contact'],['parent_id','!=',false],['is_cooperative','=',True]]}"/>
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
<xpath expr='//form/sheet/group/group[2]' position="replace"> <xpath expr='//form/sheet/group/group[2]' position="replace">
<group name="Infos activités" attrs="{'invisible': [('is_company','=', False)]}"> <group name="Infos activités" attrs="{'invisible': [('is_company','=', False)]}">
<field name="certification_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}" attrs="{'invisible': [('is_company','=', False)]}"/> <field name="certification_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}" attrs="{'invisible': [('is_company','=', False)]}"/>
<field name="category_id" string="Territoire Rattaché" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}" placeholder="Territoire Rattaché..." can_create="true" can_write="true" modifiers="{}" attrs="{'invisible': [('is_company','=', False)]}"/> <field name="category_id" string="Segmentation" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}" placeholder="Territoire Rattaché..." can_create="true" can_write="true" modifiers="{}" attrs="{'invisible': [('is_company','=', False)]}" domain="[('ur_id', '=', ur_id)]"/>
<field name="industry_id" attrs="{'invisible': [('is_company','=', False)]}"/> <field name="industry_id" attrs="{'invisible': [('is_company','=', False)]}"/>
<field name="organization_type_id" attrs="{'invisible': [('is_company','=', False)]}"/> <field name="organization_type_id" attrs="{'invisible': [('is_company','=', False)]}"/>
<field name="organization_subtype_id" attrs="{'invisible': [('is_company','=', False)]}"/> <field name="organization_subtype_id" attrs="{'invisible': [('is_company','=', False)]}"/>
......
...@@ -253,7 +253,7 @@ ...@@ -253,7 +253,7 @@
<field name="followup_delegate_id" widget="res_partner_many2one" attrs="{'required':[('project_status','in',('5_suivi'))]}"/> <field name="followup_delegate_id" widget="res_partner_many2one" attrs="{'required':[('project_status','in',('5_suivi'))]}"/>
<field name="revision_person_id" widget="res_partner_many2one" readonly="True"/> <field name="revision_person_id" widget="res_partner_many2one" readonly="True"/>
<field name="parent_group_name"/> <field name="parent_group_name"/>
<field name="category_id" string="Segmentation" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}"/> <field name="category_id" string="Segmentation" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}" domain="[('ur_id', '=', ur_id)]"/>
</group> </group>
<group string="Informations Activité"> <group string="Informations Activité">
<field name="creation_origin_id" required="True"/> <field name="creation_origin_id" required="True"/>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter