diff --git a/__manifest__.py b/__manifest__.py index a85bf5e41611ef12400effa3378bc0c3c4e68c3c..bf9138e98519f07ff2e1257b69d087c8c70c94cc 100644 --- a/__manifest__.py +++ b/__manifest__.py @@ -32,6 +32,7 @@ "views/res_partner_cooperative.xml", "views/scop_config_views.xml", "views/scop_config_lists_views.xml", + "views/scop_partner_staff.xml", "views/scop_period_views.xml", "views/scop_federation_activity.xml", "datas/union_regionale_data.xml", diff --git a/models/scop_partner_staff.py b/models/scop_partner_staff.py index 1df1fa2d2ca0c398f122af41d3269c81d7ceb043..84584f6f6e99d45322573199a6bb38359c52a60c 100644 --- a/models/scop_partner_staff.py +++ b/models/scop_partner_staff.py @@ -42,6 +42,11 @@ class ScopPartnerStaff(models.Model): staff_count = fields.Integer("Effectif (EF)", required=True,) staff_shareholder_count = fields.Integer("Eff. Sociétaires (ES)", required=True,) staff_average = fields.Integer("Equivalent temps plein (ETP)", required=True,) + staff_men = fields.Integer("Eff. salariés hommes") + staff_women = fields.Integer("Eff. salariés femmes") + staff_shareholder_men = fields.Integer("Sociétaires salariés hommes") + staff_shareholder_women = fields.Integer("Sociétaires salariés femmes") + questionnaire_id = fields.Many2one( comodel_name='scop.questionnaire', string='Questionnaire', @@ -95,3 +100,18 @@ class ScopPartnerStaff(models.Model): and record.type_entry not in ('questionnaire', 'questionnaire_inscription')): raise ValidationError( "Vous ne pouvez pas créer 2 ajustements à la même date.") + + # ------------------------------------------------------ + # Buttons + # ------------------------------------------------------ + def edit_staff(self): + form_id = self.env.ref( + "cgscop_partner.scop_partner_staff_form_view") + return { + 'type': 'ir.actions.act_window', + 'res_model': 'scop.partner.staff', + 'view_mode': 'form', + 'views': [[form_id.id, 'form']], + 'res_id': self.id, + 'target': 'new', + } diff --git a/views/res_partner.xml b/views/res_partner.xml index 549af763c26be065cd03522f2df7c0ffae26a1b8..22e014b148aa1ceb87c696b49e015846851aaa08 100644 --- a/views/res_partner.xml +++ b/views/res_partner.xml @@ -115,8 +115,8 @@ <field name="zip" position="replace"/> <field name="city" position="before"> <field name="zip" placeholder="Code postal" class="o_address_city" - attrs="{'readonly': [('type', '=', 'contact'), ('parent_id', '!=', False)]}" on_change="1" - modifiers="{'readonly':[['type','=','contact'],['parent_id','!=',false]]}"/> + attrs="{'readonly': [('type', '=', 'contact'), ('parent_id', '!=', False)]}" on_change="1" + modifiers="{'readonly':[['type','=','contact'],['parent_id','!=',false]]}"/> </field> <field name="state_id" position="attributes"> <attribute name="placeholder">Région</attribute> @@ -196,8 +196,8 @@ <xpath expr="//field[@name='child_ids']//form//field[@name='zip']" position="replace"/> <xpath expr="//field[@name='child_ids']//form//field[@name='city']" position="before"> <field name="zip" placeholder="Code postal" class="o_address_city" - attrs="{'readonly': [('type', '=', 'contact'), ('parent_id', '!=', False)]}" on_change="1" - modifiers="{'readonly':[['type','=','contact'], ['parent_id','!=',false]]}"/> + attrs="{'readonly': [('type', '=', 'contact'), ('parent_id', '!=', False)]}" on_change="1" + modifiers="{'readonly':[['type','=','contact'], ['parent_id','!=',false]]}"/> </xpath> <xpath expr="//field[@name='child_ids']//form//field[@name='state_id']" position="attributes"> <attribute name="placeholder">Région</attribute> @@ -304,299 +304,299 @@ </field> <field name="image" position="after"> <div class="oe_title oe_title_cgscop" attrs="{'invisible': [('is_cooperative', '!=', True)]}"> - <field name="is_cooperative" invisible="1"/> - <field name="write_date" invisible="1"/> - <h1> - <field name="name" default_focus="1" required="1" placeholder="Raison Sociale" attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')]}"/> - </h1> - <div class="oe_bloc_cgscop"> - <div class="o_row d-flex"> - <h3> - <field class="o_field_header" name="cooperative_form_id" attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')], 'required':['|', ('project_status','in',('2_pre-diagnostic', '3_accompagnement','4_adhesion', '5_cg')), '&', ('write_date', '=', False), ('project_status', '=', '6_suivi')]}" options="{'no_open': True, 'no_create': True}" placeholder="Forme Coopérative"/> - </h3> - <span> </span> - <h3> - <field options="{'no_open': True, 'no_create': True}" domain="[('is_coop', '=', True)]" name="partner_company_type_id" attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')], 'required':['|', ('project_status','in',('4_adhesion', '5_cg')), '&', ('write_date', '=', False), ('project_status', '=', '6_suivi')], 'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}" placeholder="Statut Juridique"/> - </h3> - </div> - <div class="o_row d-flex "> - <h3> - <field name="membership_status" readonly="True" class="o_field_header"/> - </h3> - <h3> - <field name="member_number_int" readonly="True" class="o_field_header"/> - </h3> - <h3> - <span name="cae" class="o_field_widget o_readonly_modifier o_field_header oe_read_only" attrs="{'invisible':[('cae','=',False)]}">CAE</span> - <label for='cae' string="CAE" class="oe_edit_only"/> - <field name="cae" class="oe_edit_only" attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')]}" /> - </h3> - <field name="supplier" invisible="True"/> - <field name="customer" invisible="True"/> - <field name="user_id" invisible="True"/> - </div> + <field name="is_cooperative" invisible="1"/> + <field name="write_date" invisible="1"/> + <h1> + <field name="name" default_focus="1" required="1" placeholder="Raison Sociale" attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')]}"/> + </h1> + <div class="oe_bloc_cgscop"> + <div class="o_row d-flex"> + <h3> + <field class="o_field_header" name="cooperative_form_id" attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')], 'required':['|', ('project_status','in',('2_pre-diagnostic', '3_accompagnement','4_adhesion', '5_cg')), '&', ('write_date', '=', False), ('project_status', '=', '6_suivi')]}" options="{'no_open': True, 'no_create': True}" placeholder="Forme Coopérative"/> + </h3> + <span> </span> + <h3> + <field options="{'no_open': True, 'no_create': True}" domain="[('is_coop', '=', True)]" name="partner_company_type_id" attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')], 'required':['|', ('project_status','in',('4_adhesion', '5_cg')), '&', ('write_date', '=', False), ('project_status', '=', '6_suivi')], 'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}" placeholder="Statut Juridique"/> + </h3> + </div> + <div class="o_row d-flex "> + <h3> + <field name="membership_status" readonly="True" class="o_field_header"/> + </h3> + <h3> + <field name="member_number_int" readonly="True" class="o_field_header"/> + </h3> + <h3> + <span name="cae" class="o_field_widget o_readonly_modifier o_field_header oe_read_only" attrs="{'invisible':[('cae','=',False)]}">CAE</span> + <label for='cae' string="CAE" class="oe_edit_only"/> + <field name="cae" class="oe_edit_only" attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')]}" /> + </h3> + <field name="supplier" invisible="True"/> + <field name="customer" invisible="True"/> + <field name="user_id" invisible="True"/> </div> </div> + </div> </field> <!-- Partie statique avant Notebook --> <xpath expr="//form/sheet/group" position="after"> <group col="3" string="Informations Générales" name="scop_general_infos" attrs="{'invisible': [('is_cooperative','=', False)]}"> - <group string="Contact"> - <field name="sigle" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}"/> - <label for='street' string="Adresse du siège social"/> - <div class="o_address_format"> - <field name="street" placeholder="Rue..." class="o_address_street" attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')], 'required':['|', ('project_status','in',('4_adhesion', '5_cg')), '&', ('write_date', '=', False), ('project_status', '=', '6_suivi')]}"/> - <field name="street2" placeholder="Rue 2..." class="o_address_street" attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')]}"/> - <field name="street3" placeholder="Rue 3..." class="o_address_street" attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')]}"/> - <field name="zip_id" - options="{'create_name_field': 'city', 'no_open': True, 'no_create': True}" - placeholder="CP / Ville autocomplétion..." - class="oe_edit_only" attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')]}"/> - <field name="zip" placeholder="CP..." class="o_address_city" attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')], 'required':['|', ('project_status','in',('4_adhesion', '5_cg')), '&', ('write_date', '=', False), ('project_status', '=', '6_suivi')]}"/> - <field name="zip_departement" invisible="1"/> - <field name="city" placeholder="Ville..." class="o_address_city" - attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')], 'required':['|', ('project_status','in',('4_adhesion', '5_cg')), '&', ('write_date', '=', False), ('project_status', '=', '6_suivi')]}" modifiers="{'readonly':[['project_status', '=', '6_suivi']], 'required':['|', ('project_status','in',('4_adhesion', '5_cg')), '&', ('write_date', '=', False), ('project_status', '=', '6_suivi')]}"/> - <field name="city_id" invisible="1"/> - <field name="cedex" placeholder="Cedex" class="o_address_city" - attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')]}" modifiers="{'readonly':[['project_status', '=', '6_suivi']]}"/> - <field name="state_id" class="o_address_zip" placeholder="Région" - options='{"no_open": True, "no_create": True}' context="{'country_id': country_id, 'zip': zip}" - attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')]}" modifiers="{'readonly':[['project_status', '=', '6_suivi']]}"/> - <field name="country_id" placeholder="Pays" class="o_address_country" options='{"no_open": True, "no_create": True}' - attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')]}" modifiers="{'readonly':[['project_status', '=', '6_suivi']]}"/> - </div> - <field name="zip_departement" string="N° de département" /> - <field name="region" /> - <field name="phone" widget="phone" string="Téléphone 1" attrs="{'required':['|', ('project_status','in',('4_adhesion', '5_cg')), '&', ('write_date', '=', False), ('project_status', '=', '6_suivi')]}"/> - <field name="mobile" widget="phone" string="Téléphone 2" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"/> - <field name="email" widget="email" string="E-mail"/> - <field name="website" widget="url" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}"/> - <label for='facebook' class="oe_read_only" string="Réseaux sociaux" attrs="{'invisible':[('facebook','=',False),('linkedin','=',False),('twitter','=',False),('instagram','=',False)]}"/> - <div > - <button string="" class="btn-cgscop oe_read_only" name="open_facebook" type="object" icon="fa-facebook" attrs="{'invisible':['|', ('facebook','=',False), ('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}"/> - <button string="" class="btn-cgscop oe_read_only" name="open_linkedin" type="object" icon="fa-linkedin" attrs="{'invisible':['|', ('linkedin','=',False), ('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}"/> - <button string="" class="btn-cgscop oe_read_only" name="open_twitter" type="object" icon="fa-twitter" attrs="{'invisible':['|', ('twitter','=',False), ('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}"/> - <button string="" class="btn-cgscop oe_read_only" name="open_instagram" type="object" icon="fa-instagram" attrs="{'invisible':['|', ('instagram','=',False), ('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}"/> - </div> - <label for='facebook' string="Facebook" class="oe_edit_only" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}"/> - <div > - <field class="oe_edit_only" name="facebook" widget="url" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}"/> - </div> - <label class="oe_edit_only" for='linkedin' string="LinkedIn" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}"/> - <div > - <field class="oe_edit_only" name="linkedin" widget="url" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}"/> - </div> - <label class="oe_edit_only" for='twitter' string="Twitter" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}"/> - <div > - <field class="oe_edit_only" name="twitter" widget="url" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}"/> - </div> - <label class="oe_edit_only" for='instagram' string="Instagram" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}"/> - <div > - <field class="oe_edit_only" name="instagram" widget="url" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}"/> - </div> + <group string="Contact"> + <field name="sigle" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}"/> + <label for='street' string="Adresse du siège social"/> + <div class="o_address_format"> + <field name="street" placeholder="Rue..." class="o_address_street" attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')], 'required':['|', ('project_status','in',('4_adhesion', '5_cg')), '&', ('write_date', '=', False), ('project_status', '=', '6_suivi')]}"/> + <field name="street2" placeholder="Rue 2..." class="o_address_street" attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')]}"/> + <field name="street3" placeholder="Rue 3..." class="o_address_street" attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')]}"/> + <field name="zip_id" + options="{'create_name_field': 'city', 'no_open': True, 'no_create': True}" + placeholder="CP / Ville autocomplétion..." + class="oe_edit_only" attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')]}"/> + <field name="zip" placeholder="CP..." class="o_address_city" attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')], 'required':['|', ('project_status','in',('4_adhesion', '5_cg')), '&', ('write_date', '=', False), ('project_status', '=', '6_suivi')]}"/> + <field name="zip_departement" invisible="1"/> + <field name="city" placeholder="Ville..." class="o_address_city" + attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')], 'required':['|', ('project_status','in',('4_adhesion', '5_cg')), '&', ('write_date', '=', False), ('project_status', '=', '6_suivi')]}" modifiers="{'readonly':[['project_status', '=', '6_suivi']], 'required':['|', ('project_status','in',('4_adhesion', '5_cg')), '&', ('write_date', '=', False), ('project_status', '=', '6_suivi')]}"/> + <field name="city_id" invisible="1"/> + <field name="cedex" placeholder="Cedex" class="o_address_city" + attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')]}" modifiers="{'readonly':[['project_status', '=', '6_suivi']]}"/> + <field name="state_id" class="o_address_zip" placeholder="Région" + options='{"no_open": True, "no_create": True}' context="{'country_id': country_id, 'zip': zip}" + attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')]}" modifiers="{'readonly':[['project_status', '=', '6_suivi']]}"/> + <field name="country_id" placeholder="Pays" class="o_address_country" options='{"no_open": True, "no_create": True}' + attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')]}" modifiers="{'readonly':[['project_status', '=', '6_suivi']]}"/> + </div> + <field name="zip_departement" string="N° de département" /> + <field name="region" /> + <field name="phone" widget="phone" string="Téléphone 1" attrs="{'required':['|', ('project_status','in',('4_adhesion', '5_cg')), '&', ('write_date', '=', False), ('project_status', '=', '6_suivi')]}"/> + <field name="mobile" widget="phone" string="Téléphone 2" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"/> + <field name="email" widget="email" string="E-mail"/> + <field name="website" widget="url" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}"/> + <label for='facebook' class="oe_read_only" string="Réseaux sociaux" attrs="{'invisible':[('facebook','=',False),('linkedin','=',False),('twitter','=',False),('instagram','=',False)]}"/> + <div > + <button string="" class="btn-cgscop oe_read_only" name="open_facebook" type="object" icon="fa-facebook" attrs="{'invisible':['|', ('facebook','=',False), ('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}"/> + <button string="" class="btn-cgscop oe_read_only" name="open_linkedin" type="object" icon="fa-linkedin" attrs="{'invisible':['|', ('linkedin','=',False), ('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}"/> + <button string="" class="btn-cgscop oe_read_only" name="open_twitter" type="object" icon="fa-twitter" attrs="{'invisible':['|', ('twitter','=',False), ('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}"/> + <button string="" class="btn-cgscop oe_read_only" name="open_instagram" type="object" icon="fa-instagram" attrs="{'invisible':['|', ('instagram','=',False), ('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}"/> + </div> + <label for='facebook' string="Facebook" class="oe_edit_only" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}"/> + <div > + <field class="oe_edit_only" name="facebook" widget="url" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}"/> + </div> + <label class="oe_edit_only" for='linkedin' string="LinkedIn" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}"/> + <div > + <field class="oe_edit_only" name="linkedin" widget="url" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}"/> + </div> + <label class="oe_edit_only" for='twitter' string="Twitter" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}"/> + <div > + <field class="oe_edit_only" name="twitter" widget="url" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}"/> + </div> + <label class="oe_edit_only" for='instagram' string="Instagram" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}"/> + <div > + <field class="oe_edit_only" name="instagram" widget="url" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic'))]}"/> + </div> - <field name="id_riga" groups="cgscop_partner.group_cg_administrator"/> - </group> - <group string="Suivi UR"> - <field name="ur_id" required="True" options="{'no_open': True, 'no_create': True}"/> - <field name="creation_delegate_id" - attrs="{'required':[('project_status','in',('3_accompagnement','4_adhesion', '5_cg'))], 'invisible':[('project_status', 'in', '6_suivi')]}" options="{'no_open': True, 'no_create': True}" domain="[('ur_id', '=', ur_id)]"/> - <field name="followup_delegate_id" options="{'no_open': True, 'no_create': True}" domain="[('active', '=', True),('ur_id', '=', ur_id)]" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"/> - <field name="support_delegate_id" options="{'no_open': True, 'no_create': True}" domain="[('active', '=', True),('ur_id', '=', ur_id)]" /> - <field name="segment_1_id" widget="many2many_tags" options="{'color_field': 'color', 'no_create': True}" domain="[('ur_id', '=', ur_id)]" attrs="{'invisible': ['|',('project_status', 'in', ('1_information')),('segment_1_nb', '=', 0)]}"/> - <field name="segment_2_id" widget="many2many_tags" options="{'color_field': 'color', 'no_create': True}" domain="[('ur_id', '=', ur_id)]" attrs="{'invisible': ['|',('project_status', 'in', ('1_information')),('segment_2_nb', '=', 0)]}"/> - <field name="segment_3_id" widget="many2many_tags" options="{'color_field': 'color', 'no_create': True}" domain="[('ur_id', '=', ur_id)]" attrs="{'invisible': ['|',('project_status', 'in', ('1_information')),('segment_3_nb', '=', 0)]}"/> - <field name="segment_4_id" widget="many2many_tags" options="{'color_field': 'color', 'no_create': True}" domain="[('ur_id', '=', ur_id)]" attrs="{'invisible': ['|',('project_status', 'in', ('1_information')),('segment_4_nb', '=', 0)]}"/> - <field name="filiere_ids" widget="many2many_tags" options="{'no_create': True}" attrs="{'invisible': [('project_status', 'in', ('1_information'))]}"/> - <field name="is_federation_com" invisible="True"/> - <field name="is_federation_indus" invisible="True"/> - <field name="activity_federation_com_ids" groups="cgscop_partner.group_federation_com" options="{'no_open': True, 'no_create': True}" attrs="{'invisible': [('is_federation_com', '!=', True)]}" widget="many2many_tags"/> - <field name="activity_federation_indus_ids" groups="cgscop_partner.group_federation_indus" options="{'no_open': True, 'no_create': True}" attrs="{'invisible': [('is_federation_indus', '!=', True)]}" widget="many2many_tags"/> - </group> - <group string="Informations Activité"> - <field name="is_administrative" invisible="1"/> - <field name="creation_origin_id" attrs="{'invisible': [('cooperative_form_id', '=', %(cgscop_partner.form_noncooperative)d)], 'required': [('is_cooperative', '=', True), ('cooperative_form_id', '!=', %(cgscop_partner.form_noncooperative)d)]}" options="{'no_open': True, 'no_create': True}"/> - <field name="creation_suborigin_id" domain="[('parent_id', '=', creation_origin_id), ('child_ids', '=', False)]" options="{'no_open': True, 'no_create': True}" attrs="{'invisible': [('cooperative_form_id', '=', %(cgscop_partner.form_noncooperative)d)]}" /> - <field name="is_ag_constitution" attrs="{'invisible': ['|', ('project_status', '!=', '3_accompagnement'), ('cooperative_form_id', '=', %(cgscop_partner.form_noncooperative)d)]}"/> - <field name="date_1st_sign" - attrs="{ + <field name="id_riga" groups="cgscop_partner.group_cg_administrator"/> + </group> + <group string="Suivi UR"> + <field name="ur_id" required="True" options="{'no_open': True, 'no_create': True}"/> + <field name="creation_delegate_id" + attrs="{'required':[('project_status','in',('3_accompagnement','4_adhesion', '5_cg'))], 'invisible':[('project_status', 'in', '6_suivi')]}" options="{'no_open': True, 'no_create': True}" domain="[('ur_id', '=', ur_id)]"/> + <field name="followup_delegate_id" options="{'no_open': True, 'no_create': True}" domain="[('active', '=', True),('ur_id', '=', ur_id)]" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"/> + <field name="support_delegate_id" options="{'no_open': True, 'no_create': True}" domain="[('active', '=', True),('ur_id', '=', ur_id)]" /> + <field name="segment_1_id" widget="many2many_tags" options="{'color_field': 'color', 'no_create': True}" domain="[('ur_id', '=', ur_id)]" attrs="{'invisible': ['|',('project_status', 'in', ('1_information')),('segment_1_nb', '=', 0)]}"/> + <field name="segment_2_id" widget="many2many_tags" options="{'color_field': 'color', 'no_create': True}" domain="[('ur_id', '=', ur_id)]" attrs="{'invisible': ['|',('project_status', 'in', ('1_information')),('segment_2_nb', '=', 0)]}"/> + <field name="segment_3_id" widget="many2many_tags" options="{'color_field': 'color', 'no_create': True}" domain="[('ur_id', '=', ur_id)]" attrs="{'invisible': ['|',('project_status', 'in', ('1_information')),('segment_3_nb', '=', 0)]}"/> + <field name="segment_4_id" widget="many2many_tags" options="{'color_field': 'color', 'no_create': True}" domain="[('ur_id', '=', ur_id)]" attrs="{'invisible': ['|',('project_status', 'in', ('1_information')),('segment_4_nb', '=', 0)]}"/> + <field name="filiere_ids" widget="many2many_tags" options="{'no_create': True}" attrs="{'invisible': [('project_status', 'in', ('1_information'))]}"/> + <field name="is_federation_com" invisible="True"/> + <field name="is_federation_indus" invisible="True"/> + <field name="activity_federation_com_ids" groups="cgscop_partner.group_federation_com" options="{'no_open': True, 'no_create': True}" attrs="{'invisible': [('is_federation_com', '!=', True)]}" widget="many2many_tags"/> + <field name="activity_federation_indus_ids" groups="cgscop_partner.group_federation_indus" options="{'no_open': True, 'no_create': True}" attrs="{'invisible': [('is_federation_indus', '!=', True)]}" widget="many2many_tags"/> + </group> + <group string="Informations Activité"> + <field name="is_administrative" invisible="1"/> + <field name="creation_origin_id" attrs="{'invisible': [('cooperative_form_id', '=', %(cgscop_partner.form_noncooperative)d)], 'required': [('is_cooperative', '=', True), ('cooperative_form_id', '!=', %(cgscop_partner.form_noncooperative)d)]}" options="{'no_open': True, 'no_create': True}"/> + <field name="creation_suborigin_id" domain="[('parent_id', '=', creation_origin_id), ('child_ids', '=', False)]" options="{'no_open': True, 'no_create': True}" attrs="{'invisible': [('cooperative_form_id', '=', %(cgscop_partner.form_noncooperative)d)]}" /> + <field name="is_ag_constitution" attrs="{'invisible': ['|', ('project_status', '!=', '3_accompagnement'), ('cooperative_form_id', '=', %(cgscop_partner.form_noncooperative)d)]}"/> + <field name="date_1st_sign" + attrs="{ 'invisible': ['|', '&', ('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement')), ('is_ag_constitution', '!=', True), ('cooperative_form_id', '=', %(cgscop_partner.form_noncooperative)d)], 'required': ['|', ('project_status', 'in', ('4_adhesion', '5_cg', '6_suivi')), ('is_ag_constitution', '=', True), ('is_cooperative', '=', True), ('cooperative_form_id', '!=', %(cgscop_partner.form_noncooperative)d)], 'readonly': [('id','!=',False),('project_status', '=', '6_suivi'), ('is_administrative', '!=', True)]}"/> - <field name="registration_date" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"/> - <field name="social_object" attrs="{'required': [('is_cooperative', '=', True), ('project_status','in',('2_pre-diagnostic', '3_accompagnement','4_adhesion', '5_cg', '6_suivi'))]}"/> - <field name="naf_id" attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')], 'required':['|', ('project_status','in',('4_adhesion', '5_cg'), '&', ('write_date', '=', False), ('project_status', '=', '6_suivi'))], 'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}" options="{'no_open': True, 'no_create': True}"/> - <field name="certification_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_create': True}" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"/> - <field name="other_certification" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"/> - <label for='siret' string="SIRET" class="oe_edit_only" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"/> - <div> - <field name="siret" class="oe_edit_only" attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')], 'required':['|', ('project_status','in',('4_adhesion', '5_cg')), '&', ('write_date', '=', False), ('project_status', '=', '6_suivi')], 'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"/> - </div> - <label for='formatted_siret' string="SIRET" class="oe_read_only" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"/> - <div> - <field name="formatted_siret" class="oe_read_only" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"/> - </div> - <field name="siren" readonly="1" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"/> - <field name="capital" attrs="{'required':[('project_status','in',('4_adhesion', '5_cg', '6_suivi'))], 'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))],}" widget="monetary"/> - <field name="first_closeout" attrs="{ + <field name="registration_date" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"/> + <field name="social_object" attrs="{'required': [('is_cooperative', '=', True), ('project_status','in',('2_pre-diagnostic', '3_accompagnement','4_adhesion', '5_cg', '6_suivi'))]}"/> + <field name="naf_id" attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')], 'required':['|', ('project_status','in',('4_adhesion', '5_cg'), '&', ('write_date', '=', False), ('project_status', '=', '6_suivi'))], 'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}" options="{'no_open': True, 'no_create': True}"/> + <field name="certification_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_create': True}" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"/> + <field name="other_certification" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"/> + <label for='siret' string="SIRET" class="oe_edit_only" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"/> + <div> + <field name="siret" class="oe_edit_only" attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')], 'required':['|', ('project_status','in',('4_adhesion', '5_cg')), '&', ('write_date', '=', False), ('project_status', '=', '6_suivi')], 'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"/> + </div> + <label for='formatted_siret' string="SIRET" class="oe_read_only" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"/> + <div> + <field name="formatted_siret" class="oe_read_only" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"/> + </div> + <field name="siren" readonly="1" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"/> + <field name="capital" attrs="{'required':[('project_status','in',('4_adhesion', '5_cg', '6_suivi'))], 'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))],}" widget="monetary"/> + <field name="first_closeout" attrs="{ 'required':[('is_cooperative', '!=', False), ('project_status', 'in', ('4_adhesion', '5_cg', '6_suivi')), ('cooperative_form_id', '!=', %(cgscop_partner.form_noncooperative)d)], 'invisible': ['|', ('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement')), ('cooperative_form_id', '=', %(cgscop_partner.form_noncooperative)d)], 'readonly': [('id','!=',False),('project_status', '=', '6_suivi'), ('is_administrative', '!=', True)]}"/> - <field name="closeout_month" attrs="{'required':[('project_status','in',('4_adhesion', '5_cg', '6_suivi'))], 'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"/> - <field name="is_seed_scop" attrs="{'invisible': [('project_status', '=', '1_information')]}"/> - <field name="seed_end" attrs="{'invisible': [('is_seed_scop', '!=', True)], 'required':[('project_status','in',('4_adhesion', '5_cg', '6_suivi')),('is_seed_scop', '=', True)]}"/> - <field name="is_incubated" attrs="{'invisible': [('project_status', '=', '1_information')]}"/> - <field name="incubator_id" attrs="{'invisible': [('is_incubated', '!=', True)]}" options="{'no_create': True}"/> - <field name="staff_last" attrs="{'invisible': [('project_status', 'not in', ('6_suivi'))]}"/> - <field name="staff_last_date" attrs="{'invisible': [('project_status', 'not in', ('6_suivi'))]}"/> - </group> + <field name="closeout_month" attrs="{'required':[('project_status','in',('4_adhesion', '5_cg', '6_suivi'))], 'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"/> + <field name="is_seed_scop" attrs="{'invisible': [('project_status', '=', '1_information')]}"/> + <field name="seed_end" attrs="{'invisible': [('is_seed_scop', '!=', True)], 'required':[('project_status','in',('4_adhesion', '5_cg', '6_suivi')),('is_seed_scop', '=', True)]}"/> + <field name="is_incubated" attrs="{'invisible': [('project_status', '=', '1_information')]}"/> + <field name="incubator_id" attrs="{'invisible': [('is_incubated', '!=', True)]}" options="{'no_create': True}"/> + <field name="staff_last" attrs="{'invisible': [('project_status', 'not in', ('6_suivi'))]}"/> + <field name="staff_last_date" attrs="{'invisible': [('project_status', 'not in', ('6_suivi'))]}"/> </group> + </group> </xpath> <!-- Notebook organismes --> <xpath expr="//notebook/page" position="after"> <page name="scop_contacts" string="Contacts & Adresses" attrs="{'invisible': [('is_cooperative', '!=', True)]}"> - <!-- Directeurs et mandataires --> - <label for="director_ids" string="Dirigeants et mandataires"/> - <p> - <button name="add_director" type="object" class="btn-info" string="Ajouter un dirigeant"></button> - </p> - <field name="director_ids" readonly="1"> - <kanban> - <field name="id"/> - <field name="color"/> - <field name="name"/> - <field name="title"/> - <field name="type"/> - <field name="email"/> - <field name="parent_id"/> - <field name="is_company"/> - <field name="mandate_id"/> - <field name="function"/> - <field name="phone"/> - <field name="street"/> - <field name="street2"/> - <field name="street3"/> - <field name="zip_id"/> - <field name="zip"/> - <field name="city"/> - <field name="city_id"/> - <field name="cedex"/> - <field name="country_id"/> - <field name="mobile"/> - <field name="state_id"/> - <field name="image_small"/> - <field name="lang"/> - <field name="comment"/> - <field name="customer"/> - <field name="display_name"/> - <field name="supplier"/> - <field name="ur_id"/> - <field name="category_id"/> - <templates> - <t t-name="kanban-box"> - <t t-set="color" t-value="kanban_color(record.color.raw_value)"/> - <div t-att-class="color + (record.title.raw_value == 1 ? ' oe_kanban_color_alert' : '') + ' oe_kanban_global_click'"> - <a t-if="!read_only_mode" name="partner_archive" type="object" class="fa fa-times pull-right"/> - <a name="edit_director" type="object" class="fa fa-2x fa-edit text-info pull-right"/> - <div class="o_kanban_image"> - <img alt="" t-if="record.image_small.raw_value" t-att-src="kanban_image('res.partner', 'image_small', record.id.raw_value)"/> - <t t-if="!record.image_small.raw_value"> - <img alt="Avatar" t-att-src='_s + "/base/static/img/avatar.png"'/> - </t> - </div> - <div class="oe_kanban_details"> - <field name="name"/> - <div t-if="record.mandate_id.raw_value"><field name="mandate_id"/></div> - <div t-if="record.function.raw_value"><field name="function"/></div> - <div t-if="record.email.raw_value"><field name="email" widget="email"/></div> - <div t-if="record.phone.raw_value">Téléphone: <field name="phone" widget="phone"/></div> - <div t-if="record.mobile.raw_value">Mobile: <field name="mobile" widget="phone"/></div> - <div t-if="record.category_id.raw_value"><field name="category_id" widget="many2many_tags"/></div> - </div> + <!-- Directeurs et mandataires --> + <label for="director_ids" string="Dirigeants et mandataires"/> + <p> + <button name="add_director" type="object" class="btn-info" string="Ajouter un dirigeant"></button> + </p> + <field name="director_ids" readonly="1"> + <kanban> + <field name="id"/> + <field name="color"/> + <field name="name"/> + <field name="title"/> + <field name="type"/> + <field name="email"/> + <field name="parent_id"/> + <field name="is_company"/> + <field name="mandate_id"/> + <field name="function"/> + <field name="phone"/> + <field name="street"/> + <field name="street2"/> + <field name="street3"/> + <field name="zip_id"/> + <field name="zip"/> + <field name="city"/> + <field name="city_id"/> + <field name="cedex"/> + <field name="country_id"/> + <field name="mobile"/> + <field name="state_id"/> + <field name="image_small"/> + <field name="lang"/> + <field name="comment"/> + <field name="customer"/> + <field name="display_name"/> + <field name="supplier"/> + <field name="ur_id"/> + <field name="category_id"/> + <templates> + <t t-name="kanban-box"> + <t t-set="color" t-value="kanban_color(record.color.raw_value)"/> + <div t-att-class="color + (record.title.raw_value == 1 ? ' oe_kanban_color_alert' : '') + ' oe_kanban_global_click'"> + <a t-if="!read_only_mode" name="partner_archive" type="object" class="fa fa-times pull-right"/> + <a name="edit_director" type="object" class="fa fa-2x fa-edit text-info pull-right"/> + <div class="o_kanban_image"> + <img alt="" t-if="record.image_small.raw_value" t-att-src="kanban_image('res.partner', 'image_small', record.id.raw_value)"/> + <t t-if="!record.image_small.raw_value"> + <img alt="Avatar" t-att-src='_s + "/base/static/img/avatar.png"'/> + </t> + </div> + <div class="oe_kanban_details"> + <field name="name"/> + <div t-if="record.mandate_id.raw_value"><field name="mandate_id"/></div> + <div t-if="record.function.raw_value"><field name="function"/></div> + <div t-if="record.email.raw_value"><field name="email" widget="email"/></div> + <div t-if="record.phone.raw_value">Téléphone: <field name="phone" widget="phone"/></div> + <div t-if="record.mobile.raw_value">Mobile: <field name="mobile" widget="phone"/></div> + <div t-if="record.category_id.raw_value"><field name="category_id" widget="many2many_tags"/></div> </div> - </t> - </templates> - </kanban> - </field> - <!-- Autres contacts --> - <label for="other_child_ids" string="Autres Contacts / Adresses"/> - <p> - <button name="add_contact" type="object" class="btn-info" string="Ajouter un contact"></button> - </p> - <field name="other_child_ids" mode="kanban" readonly="1"> - <kanban> - <field name="id"/> - <field name="color"/> - <field name="name"/> - <field name="title"/> - <field name="type"/> - <field name="email"/> - <field name="parent_id"/> - <field name="is_company"/> - <field name="mandate_id"/> - <field name="function"/> - <field name="phone"/> - <field name="street"/> - <field name="street2"/> - <field name="street3"/> - <field name="zip"/> - <field name="zip_id"/> - <field name="city"/> - <field name="city_id"/> - <field name="cedex"/> - <field name="country_id"/> - <field name="mobile"/> - <field name="state_id"/> - <field name="image_small"/> - <field name="lang"/> - <field name="comment"/> - <field name="customer"/> - <field name="display_name"/> - <field name="supplier"/> - <field name="ur_id"/> - <field name="category_id"/> - <templates> - <t t-name="kanban-box"> + </div> + </t> + </templates> + </kanban> + </field> + <!-- Autres contacts --> + <label for="other_child_ids" string="Autres Contacts / Adresses"/> + <p> + <button name="add_contact" type="object" class="btn-info" string="Ajouter un contact"></button> + </p> + <field name="other_child_ids" mode="kanban" readonly="1"> + <kanban> + <field name="id"/> + <field name="color"/> + <field name="name"/> + <field name="title"/> + <field name="type"/> + <field name="email"/> + <field name="parent_id"/> + <field name="is_company"/> + <field name="mandate_id"/> + <field name="function"/> + <field name="phone"/> + <field name="street"/> + <field name="street2"/> + <field name="street3"/> + <field name="zip"/> + <field name="zip_id"/> + <field name="city"/> + <field name="city_id"/> + <field name="cedex"/> + <field name="country_id"/> + <field name="mobile"/> + <field name="state_id"/> + <field name="image_small"/> + <field name="lang"/> + <field name="comment"/> + <field name="customer"/> + <field name="display_name"/> + <field name="supplier"/> + <field name="ur_id"/> + <field name="category_id"/> + <templates> + <t t-name="kanban-box"> <t t-set="color" t-value="kanban_color(record.color.raw_value)"/> - <div t-att-class="color + (record.title.raw_value == 1 ? ' oe_kanban_color_alert' : '') + ' oe_kanban_global_click'"> - <a name="edit_contact" type="object" class="fa fa-2x fa-edit text-info pull-right"/> - <a t-if="!read_only_mode" name="partner_archive" type="object" class="fa fa-times pull-right"/> - <div class="o_kanban_image"> - <img alt="" t-if="record.image_small.raw_value" t-att-src="kanban_image('res.partner', 'image_small', record.id.raw_value)"/> - <t t-if="!record.image_small.raw_value"> - <img alt="Delivery" t-if="record.type.raw_value === 'delivery'" t-att-src='_s + "/base/static/img/truck.png"'/> - <img alt="Invoice" t-if="record.type.raw_value === 'invoice'" t-att-src='_s + "/base/static/img/money.png"'/> - <t t-if="record.type.raw_value !== 'invoice' && record.type.raw_value !== 'delivery'"> - <img alt="Logo" t-if="record.is_company.raw_value === true" t-att-src='_s + "/base/static/img/company_image.png"'/> - <img alt="Avatar" t-if="record.is_company.raw_value === false" t-att-src='_s + "/base/static/img/avatar.png"'/> - </t> + <div t-att-class="color + (record.title.raw_value == 1 ? ' oe_kanban_color_alert' : '') + ' oe_kanban_global_click'"> + <a name="edit_contact" type="object" class="fa fa-2x fa-edit text-info pull-right"/> + <a t-if="!read_only_mode" name="partner_archive" type="object" class="fa fa-times pull-right"/> + <div class="o_kanban_image"> + <img alt="" t-if="record.image_small.raw_value" t-att-src="kanban_image('res.partner', 'image_small', record.id.raw_value)"/> + <t t-if="!record.image_small.raw_value"> + <img alt="Delivery" t-if="record.type.raw_value === 'delivery'" t-att-src='_s + "/base/static/img/truck.png"'/> + <img alt="Invoice" t-if="record.type.raw_value === 'invoice'" t-att-src='_s + "/base/static/img/money.png"'/> + <t t-if="record.type.raw_value !== 'invoice' && record.type.raw_value !== 'delivery'"> + <img alt="Logo" t-if="record.is_company.raw_value === true" t-att-src='_s + "/base/static/img/company_image.png"'/> + <img alt="Avatar" t-if="record.is_company.raw_value === false" t-att-src='_s + "/base/static/img/avatar.png"'/> </t> - </div> - <div class="oe_kanban_details"> - <field name="name"/> - <div t-if="record.function.raw_value"><field name="function"/></div> - <div t-if="record.email.raw_value"><field name="email" widget="email"/></div> - <div t-if="record.type.raw_value != 'contact'"> - <div> - <field name="zip"/> - <field name="city"/> - <field name="cedex"/> - </div> - <field t-if="record.state_id.raw_value" name="state_id"/> - <field name="country_id"/> + </t> + </div> + <div class="oe_kanban_details"> + <field name="name"/> + <div t-if="record.function.raw_value"><field name="function"/></div> + <div t-if="record.email.raw_value"><field name="email" widget="email"/></div> + <div t-if="record.type.raw_value != 'contact'"> + <div> + <field name="zip"/> + <field name="city"/> + <field name="cedex"/> </div> - <div t-if="record.phone.raw_value">Phone: <field name="phone"/></div> - <div t-if="record.mobile.raw_value">Mobile: <field name="mobile"/></div> - <div t-if="record.category_id.raw_value"><field name="category_id" widget="many2many_tags"/></div> + <field t-if="record.state_id.raw_value" name="state_id"/> + <field name="country_id"/> </div> + <div t-if="record.phone.raw_value">Phone: <field name="phone"/></div> + <div t-if="record.mobile.raw_value">Mobile: <field name="mobile"/></div> + <div t-if="record.category_id.raw_value"><field name="category_id" widget="many2many_tags"/></div> </div> - </t> - </templates> - </kanban> - </field> - </page> + </div> + </t> + </templates> + </kanban> + </field> + </page> <page name='scop_revision' string="Révisions" attrs="{'invisible': ['|', ('is_cooperative', '!=', True), ('project_status', '!=', '6_suivi')]}"> <group col="3"> <group string="Contrat de révision"> @@ -607,7 +607,7 @@ <field name="revision_certified_person_id" options="{'no_open': True, 'no_create': True}"/> <field name="revision_person_assign_date"/> </group> - + <group string="Caractéristiques de la révision"> <field name="revision_format_id" options="{'no_open': True, 'no_create': True}" domain="[('ur_id', '=', ur_id)]" attrs="{'required': [('revision_contract','!=', False)]}"/> <field name="revision_tarif" widget="monetary"/> @@ -616,7 +616,7 @@ <group string="Prochaine révision"> <field name="revision_next_exercice" attrs="{'required': [('revision_contract','!=', False)]}"/> - <field name="revision_next_year" attrs="{'required': [('revision_contract','!=', False)]}"/> + <field name="revision_next_year" attrs="{'required': [('revision_contract','!=', False)]}"/> </group> </group> @@ -634,7 +634,7 @@ </page> <page name="scop_periods" string="Historique" attrs="{'invisible': ['|', ('is_cooperative', '!=', True), ('project_status', '!=', '6_suivi')]}"> <field name="scop_period_ids" mode="tree" - context="{'default_partner_id': active_id, 'default_name': name, 'default_cooperative_form_id': cooperative_form_id, 'default_partner_company_type_id': partner_company_type_id, 'default_siret': siret, 'default_street': street, 'default_street2': street2, 'default_city': city, 'default_cedex': cedex, 'default_state_id': state_id, 'default_zip': zip, 'default_zip_id': zip_id, 'default_country_id': country_id, 'default_naf_id': naf_id, 'default_cae': cae}" style="pointer-events:none;"> + context="{'default_partner_id': active_id, 'default_name': name, 'default_cooperative_form_id': cooperative_form_id, 'default_partner_company_type_id': partner_company_type_id, 'default_siret': siret, 'default_street': street, 'default_street2': street2, 'default_city': city, 'default_cedex': cedex, 'default_state_id': state_id, 'default_zip': zip, 'default_zip_id': zip_id, 'default_country_id': country_id, 'default_naf_id': naf_id, 'default_cae': cae}" style="pointer-events:none;"> <tree string="Périodes" decoration-muted="end_reason!=False" create="false" edit="false" delete="false"> <field name="partner_id" invisible="1"/> <field name="start"/> @@ -683,8 +683,8 @@ <field name="amount_called" widget="monetary"/> <field name="amount_paid" widget="monetary"/> <field name="amount_remaining" widget="monetary"/> -<!-- <field name="amount_remaining_previous" widget="monetary"/>--> -<!-- <field name="amount_paid_late" widget="monetary"/>--> + <!-- <field name="amount_remaining_previous" widget="monetary"/>--> + <!-- <field name="amount_paid_late" widget="monetary"/>--> <field name="spreading"/> <field name="quarter_1"/> <field name="quarter_2"/> @@ -694,23 +694,24 @@ </field> </page> <page name='scop_staff' string="Effectifs" attrs="{'invisible': ['|','&', ('is_cooperative', '=', True), ('project_status', '!=', '6_suivi'),'&',('is_cooperative', '=', False),('organization_subtype_id','!=', %(cgscop_partner.riga_11528)d)]}"> - <field name="staff_ids" mode="tree" context="{'default_partner_id': active_id, 'default_type_entry': 'regul_ur'}"> - <tree delete="false" default_order="effective_date desc" editable="top"> - <field name="effective_date" attrs="{'readonly':[('type_entry','in',('questionnaire', 'questionnaire_inscription'))]}"/> - <field name="type_entry" attrs="{'readonly':[('type_entry','in',('questionnaire', 'questionnaire_inscription'))]}"/> - <field name="staff_count" attrs="{'readonly':[('type_entry','in',('questionnaire', 'questionnaire_inscription'))]}"/> - <field name="staff_shareholder_count" attrs="{'readonly':[('type_entry','in',('questionnaire', 'questionnaire_inscription'))]}"/> - <field name="staff_average" attrs="{'readonly':[('type_entry','in',('questionnaire', 'questionnaire_inscription'))]}"/> - <field name="comment" /> - <field name="user_id" readonly="1"/> - </tree> - </field> - </page> + <field name="staff_ids" mode="tree" context="{'default_partner_id': active_id, 'default_type_entry': 'regul_ur'}"> + <tree delete="false" default_order="effective_date desc" editable="top"> + <field name="effective_date" attrs="{'readonly':[('type_entry','in',('questionnaire', 'questionnaire_inscription'))]}"/> + <field name="type_entry" attrs="{'readonly':[('type_entry','in',('questionnaire', 'questionnaire_inscription'))]}"/> + <field name="staff_count" attrs="{'readonly':[('type_entry','in',('questionnaire', 'questionnaire_inscription'))]}"/> + <field name="staff_shareholder_count" attrs="{'readonly':[('type_entry','in',('questionnaire', 'questionnaire_inscription'))]}"/> + <field name="staff_average" attrs="{'readonly':[('type_entry','in',('questionnaire', 'questionnaire_inscription'))]}"/> + <field name="comment" /> + <field name="user_id" readonly="1"/> + <button name="edit_staff" type="object" icon="fa-pencil-square-o"/> + </tree> + </field> + </page> <page name='scop_xnet' string="Extranet" attrs="{'invisible': ['|', ('is_cooperative', '!=', True), ('project_status', '!=', '6_suivi')]}"> <group string="Annuaire"> <field name="secteur_id" /> <field name="activity_desc" /> - </group> + </group> </page> </xpath> @@ -745,11 +746,11 @@ <filter string="Activités futures" name="activities_upcoming_all" domain="[('activity_ids.date_deadline', '>', context_today().strftime('%Y-%m-%d'))]"/> <separator/> <group expand="0" name="group_by" string="Group By"> - <filter name="naf_id" string="Code NAF" domain="[]" context="{'group_by' : 'naf_id'}"/> - <filter name="group_company" string="Structure" context="{'group_by': 'parent_id'}"/> - <filter name="group_country" string="Pays" context="{'group_by': 'country_id'}"/> + <filter name="naf_id" string="Code NAF" domain="[]" context="{'group_by' : 'naf_id'}"/> + <filter name="group_company" string="Structure" context="{'group_by': 'parent_id'}"/> + <filter name="group_country" string="Pays" context="{'group_by': 'country_id'}"/> </group> - </search> + </search> </field> </record> @@ -798,12 +799,12 @@ <field name="name">scop.partner.director.form.view</field> <field name="model">res.partner</field> <field name="arch" type="xml"> - <form string="Contact Dirigeant"> + <form string="Contact Dirigeant"> <sheet> <div class="oe_button_box" name="button_box"> - <button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive"> - <field name="active" widget="boolean_button" options="{'terminology': 'archive'}"/> - </button> + <button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive"> + <field name="active" widget="boolean_button" options="{'terminology': 'archive'}"/> + </button> </div> <field name="parent_id_onchange" invisible="1"/> <field name="parent_id" invisible="1"/> @@ -861,11 +862,11 @@ <field name="arch" type="xml"> <form string="Contacts / Addresses"> <sheet> - <div class="oe_button_box" name="button_box"> - <button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive"> - <field name="active" widget="boolean_button" options="{'terminology': 'archive'}"/> - </button> - </div> + <div class="oe_button_box" name="button_box"> + <button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive"> + <field name="active" widget="boolean_button" options="{'terminology': 'archive'}"/> + </button> + </div> <field name="type" required="1" widget="radio" options="{'horizontal': true}"/> <field name="parent_id_onchange" invisible="1"/> <field name="parent_id" invisible="1"/> @@ -884,19 +885,19 @@ class="oe_edit_only"/> <field name="zip" placeholder="ZIP" class="o_address_city"/> <field name="city" placeholder="Ville" class="o_address_city" - attrs="{'readonly': [('type', '=', 'contact'), ('parent_id', '!=', False)]}" modifiers="{'readonly':[['type','=','contact'],['parent_id','!=',false]]}"/> + attrs="{'readonly': [('type', '=', 'contact'), ('parent_id', '!=', False)]}" modifiers="{'readonly':[['type','=','contact'],['parent_id','!=',false]]}"/> <field name="city_id" invisible="1"/> <field name="cedex" placeholder="Cedex" class="o_address_city" - attrs="{'readonly': [('type', '=', 'contact'), ('parent_id', '!=', False)]}" modifiers="{'readonly':[['type','=','contact'],['parent_id','!=',false]]}"/> + attrs="{'readonly': [('type', '=', 'contact'), ('parent_id', '!=', False)]}" modifiers="{'readonly':[['type','=','contact'],['parent_id','!=',false]]}"/> <field name="state_id" class="o_address_zip" placeholder="Région" - options='{"no_open": True, "no_create": True}' context="{'country_id': country_id, 'zip': zip}"/> + options='{"no_open": True, "no_create": True}' context="{'country_id': country_id, 'zip': zip}"/> <field name="country_id" placeholder="Country" class="o_address_country" options='{"no_open": True, "no_create": True}'/> </div> </div> </group> <group> <field name="title" placeholder="Madame" - attrs="{'invisible': [('type','!=', 'contact')]}" options='{"no_open": True, "no_create": True}'/> + attrs="{'invisible': [('type','!=', 'contact')]}" options='{"no_open": True, "no_create": True}'/> <field name="name" string="Nom" attrs="{'required' : [('type', '!=', 'contact')], 'invisible' : [('type', '=', 'contact')]}"/> <field name="firstname" string="Prénom" attrs="{'required' : [('type', '=', 'contact')], 'invisible' : [('type', '!=', 'contact')]}"/> <field name="lastname" string="Nom de famille" attrs="{'required' : [('type', '=', 'contact')], 'invisible' : [('type', '!=', 'contact')]}"/> @@ -1007,30 +1008,30 @@ </record> <menuitem id="res_partner_menu_companies" - name="Partenaires" - action="action_companies_only" - parent="contacts.menu_contacts" - sequence="20"/> + name="Partenaires" + action="action_companies_only" + parent="contacts.menu_contacts" + sequence="20"/> <menuitem id="contacts.res_partner_menu_contacts" - name="Personnes" - action="action_not_companies_only" - parent="contacts.menu_contacts" - sequence="30"/> + name="Personnes" + action="action_not_companies_only" + parent="contacts.menu_contacts" + sequence="30"/> <menuitem - id="partner_multi_relation.menu_res_partner_relation_all" - sequence="32" - name="Relations" - parent="contacts.menu_contacts" - action="partner_multi_relation.action_res_partner_relation_all"/> + id="partner_multi_relation.menu_res_partner_relation_all" + sequence="32" + name="Relations" + parent="contacts.menu_contacts" + action="partner_multi_relation.action_res_partner_relation_all"/> <menuitem - id="partner_multi_relation.menu_res_partner_relation" - name="Relations" - sequence="41" - parent="contacts.menu_contacts" - groups='base.group_no_one'/> + id="partner_multi_relation.menu_res_partner_relation" + name="Relations" + sequence="41" + parent="contacts.menu_contacts" + groups='base.group_no_one'/> </data> </odoo> diff --git a/views/scop_partner_staff.xml b/views/scop_partner_staff.xml new file mode 100644 index 0000000000000000000000000000000000000000..93eef7aee5fd4a3488a90e76e5e1ce3570ef0bc8 --- /dev/null +++ b/views/scop_partner_staff.xml @@ -0,0 +1,49 @@ +<?xml version="1.0"?> +<!-- Copyright 2021 Le Filament + License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> + +<odoo> + <data> + + <record id="scop_partner_staff_form_view" model="ir.ui.view"> + <field name="name">scop.partner.staff.form</field> + <field name="model">scop.partner.staff</field> + <field name="arch" type="xml"> + <form string="Effectifs"> + <sheet> + <group col="2"> + <group name="infos_coop"> + <field name="partner_id" options="{'no_create': True, 'no_open': True}" readonly="1"/> + <field name="partner_city"/> + <field name="partner_siret"/> + </group> + <group name="infos_entry"> + <field name="user_id"/> + <field name="type_entry"/> + <field name="effective_date" attrs="{'readonly':[('type_entry','in',('questionnaire', 'questionnaire_inscription'))]}"/> + </group> + <group name="staff_stats"> + <field name="staff_count" attrs="{'readonly':[('type_entry','in',('questionnaire', 'questionnaire_inscription'))]}"/> + <field name="staff_shareholder_count" attrs="{'readonly':[('type_entry','in',('questionnaire', 'questionnaire_inscription'))]}"/> + <field name="staff_average" attrs="{'readonly':[('type_entry','in',('questionnaire', 'questionnaire_inscription'))]}"/> + </group> + <group name="staff_stats"> + <field name="staff_men"/> + <field name="staff_women"/> + <field name="staff_shareholder_men"/> + <field name="staff_shareholder_women"/> + </group> + <group name="quest_link"> + <field name="questionnaire_id" readonly="1"/> + </group> + <group name="comment"> + <field name="comment"/> + </group> + </group> + </sheet> + </form> + </field> + </record> + + </data> +</odoo>