diff --git a/views/res_partner.xml b/views/res_partner.xml index f4f4272fe693f9cf11bc4f8798cdfec51f1e6be6..8b14d66e6ddd831980303e59e10d295ee83031d6 100644 --- a/views/res_partner.xml +++ b/views/res_partner.xml @@ -473,7 +473,7 @@ 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'" + t-att-class="color + (record.title.raw_value == 1 ? ' oe_kanban_color_alert' : '')" > <a name="edit_contact" @@ -987,7 +987,7 @@ /> <field name="creation_delegate_id" - attrs="{'required':['|', ('membership_status','in',('adhesion', 'soumis_cg')), ('project_status','in',('3_accompagnement'))],]}" + attrs="{'required':['|', ('membership_status','in',('adhesion', 'soumis_cg')), ('project_status','in',('3_accompagnement'))]}" options="{'no_open': True, 'no_create': True, 'mailto_field': 'email'}" widget="many2one_mailto" domain="[('ur_id', '=', ur_id)]" @@ -1264,7 +1264,7 @@ 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'" + t-att-class="color + (record.title.raw_value == 1 ? ' oe_kanban_color_alert' : '')" > <a t-if="!read_only_mode" @@ -1385,7 +1385,7 @@ 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'" + t-att-class="color + (record.title.raw_value == 1 ? ' oe_kanban_color_alert' : '')" > <a name="edit_contact" @@ -1851,6 +1851,7 @@ <sheet> <field name="parent_id_onchange" invisible="1" /> <field name="parent_id" invisible="1" /> + <field name="type" invisible="1" /> <group> <group> <field @@ -1910,12 +1911,92 @@ /> </group> </group> - <field name="subscription_ids"> - <tree string="Subscriptions" editable="bottom"> - <field name="newsletter_id" domain="[]" /> - <field name="consent" /> - </tree> - </field> + <notebook> + <page string="Abonnements"> + <field + name="subscription_ids" + attrs="{'invisible': [('type', '!=', 'contact')]}" + > + <tree string="Subscriptions" editable="bottom"> + <field name="newsletter_id" domain="[]" /> + <field name="consent" /> + </tree> + </field> + </page> + <page + string="Adresse" + attrs="{'invisible': ['|',('type', '!=', 'contact'), + ('ur_id','!=',%(cgscop_partner.riga_14234)d)]}" + > + <div + class="alert alert-warning" + role="alert" + > + Attention ces informations sous soumises à la règlementation RGPD. + </div> + <group> + <label for="street" string="Adresse" /> + <div> + <div name="div_address" class="o_address_format"> + <field + name="street" + placeholder="Rue..." + class="o_address_street" + /> + <field + name="street2" + placeholder="Rue 2..." + class="o_address_street" + /> + <field + name="street3" + placeholder="Rue 3..." + class="o_address_street" + /> + <field + name="zip_id" + options="{'create_name_field': 'city', 'no_open': True, 'no_create': True}" + placeholder="CP/Ville autocomplétion" + 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]]}" + /> + <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]]}" + /> + <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}" + /> + <field + name="country_id" + placeholder="Country" + class="o_address_country" + options='{"no_open": True, "no_create": True}' + /> + </div> + </div> + </group> + </page> + </notebook> <field name="lang" invisible="1" /> <field name="image_128" invisible="1" /> <field name="user_id" invisible="1" /> @@ -1960,7 +2041,9 @@ required="1" widget="radio" options="{'horizontal': true}" + attrs="{'invisible': [('id', '!=', False)]}" /> + <field name="id" invisible="1" /> <field name="parent_id_onchange" invisible="1" /> <field name="parent_id" invisible="1" /> <field name="parent_is_cooperative" invisible="1" /> @@ -2108,15 +2191,93 @@ /> </group> </group> - <field - name="subscription_ids" - attrs="{'invisible': [('type', '!=', 'contact')]}" - > - <tree string="Subscriptions" editable="bottom"> - <field name="newsletter_id" domain="[]" /> - <field name="consent" /> - </tree> - </field> + <notebook> + <page string="Abonnements"> + <field + name="subscription_ids" + attrs="{'invisible': [('type', '!=', 'contact')]}" + > + <tree string="Subscriptions" editable="bottom"> + <field name="newsletter_id" domain="[]" /> + <field name="consent" /> + </tree> + </field> + </page> + <page + string="Adresse" + attrs="{'invisible': ['|',('type', '!=', 'contact'), + ('ur_id','!=',%(cgscop_partner.riga_14234)d)]}" + > + <div + class="alert alert-warning" + role="alert" + > + Attention ces informations sous soumises à la règlementation RGPD. + </div> + <group> + <label for="street" string="Adresse" /> + <div> + <div name="div_address" class="o_address_format"> + <field + name="street" + placeholder="Rue..." + class="o_address_street" + /> + <field + name="street2" + placeholder="Rue 2..." + class="o_address_street" + /> + <field + name="street3" + placeholder="Rue 3..." + class="o_address_street" + /> + <field + name="zip_id" + options="{'create_name_field': 'city', 'no_open': True, 'no_create': True}" + placeholder="CP/Ville autocomplétion" + 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]]}" + /> + <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]]}" + /> + <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}" + /> + <field + name="country_id" + placeholder="Country" + class="o_address_country" + options='{"no_open": True, "no_create": True}' + /> + </div> + </div> + </group> + </page> + </notebook> + <field name="lang" invisible="1" /> <field name="image_128" invisible="1" /> <field name="user_id" invisible="1" />