diff --git a/views/res_partner.xml b/views/res_partner.xml index a3783ec304a704248ef5a1e543b9bff6cf9ff05f..546ef3f9f9ab2f3df55a60b2e5ec2df05d7f78ed 100644 --- a/views/res_partner.xml +++ b/views/res_partner.xml @@ -89,9 +89,13 @@ </field> <field name="parent_id" position="attributes"> <attribute name="options">{'no_create': True}</attribute> - <attribute name="domain">[('is_company', '=', True), ('ur_id', '=', ur_id)]</attribute> + <attribute + name="domain" + >[('is_company', '=', True), ('ur_id', '=', ur_id)]</attribute> <attribute name="placeholder">Société</attribute> - <attribute name="attrs" >{'invisible': [('is_company','=', True)]}</attribute> + <attribute + name="attrs" + >{'invisible': [('is_company','=', True)]}</attribute> </field> <xpath expr="//div[hasclass('oe_title')]" position="attributes"> <attribute name="class">oe_title oe_title_cgscop</attribute> @@ -126,7 +130,9 @@ <attribute name="placeholder">Rue 3</attribute> </field> <field name="zip_id" position="attributes"> - <attribute name="placeholder">CP / Ville autocomplétion...</attribute> + <attribute + name="placeholder" + >CP / Ville autocomplétion...</attribute> </field> <field name="zip" position="replace" /> <field name="city" position="before"> @@ -180,7 +186,8 @@ <xpath expr='//form/sheet/group/group[2]' position="replace"> <group col="1" name="partner_legal_info"> - <group string="Informations juridiques" + <group + string="Informations juridiques" attrs="{'invisible': [('is_company', '=', False)]}" > <label @@ -216,7 +223,8 @@ <field name="registration_date" /> </group> - <group string="Informations contact" + <group + string="Informations contact" name="contact_legal_info" attrs="{'invisible': ['|', ('is_company', '=', True), ('type', '!=', 'contact')]}" > @@ -231,7 +239,7 @@ name="birthyear" attrs="{'invisible': ['|',('is_company','=', True),('parent_is_cooperative','=', False)]}" /> - <br/> + <br /> <field name="mandate_id" options='{"no_create": True, "no_open": True}' @@ -323,7 +331,7 @@ name="staff_last" attrs="{'invisible': [('organization_subtype_id','!=', %(cgscop_partner.riga_11528)d)]}" /> - <br/> + <br /> <field name="ur_id" options='{"no_open": True, "no_create": True}' @@ -340,7 +348,8 @@ attrs="{'invisible': ['|', ('is_company','=', False), ('type', '!=', 'contact')]}" /> </group> - <group string="Féd. communication" + <group + string="Féd. communication" groups="cgscop_partner.group_federation_com" > <field name="copadev_member" widget="boolean_toggle" /> @@ -351,7 +360,8 @@ /> </group> </group> - <group string="Informations mouvement" + <group + string="Informations mouvement" name="contact_segment_info" attrs="{'invisible': ['|', ('is_company', '=', True), ('type', '!=', 'contact')]}" > @@ -367,7 +377,7 @@ readonly="True" attrs="{'invisible': [('is_company','=', True)]}" /> - <br/> + <br /> <field name="ur_id" options='{"no_open": True, "no_create": True}' @@ -381,7 +391,7 @@ options="{'no_open': True, 'no_create': True, 'mailto_field': 'email'}" domain="[('active', '=', True),('ur_id', '=', ur_id)]" /> - <br/> + <br /> <field name="category_id" options='{"no_open": True, "no_create": True}' @@ -403,10 +413,6 @@ </field> </xpath> - <xpath expr="//page[@name='contact_addresses']" position="attributes"> - <attribute name="attrs">{'invisible': [('is_company','=', False)]}</attribute> - </xpath> - <xpath expr="//field[@name='child_ids']" position="replace"> <p> <button @@ -417,7 +423,12 @@ /> </p> - <field name="child_ids" mode="kanban" readonly="1" style="pointer-events: none;"> + <field + name="child_ids" + mode="kanban" + readonly="1" + style="pointer-events: none;" + > <kanban> <field name="id" /> <field name="color" /> @@ -451,97 +462,94 @@ <templates> <t t-name="kanban-box"> <t - t-set="color" - t-value="kanban_color(record.color.raw_value)" - /> + 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'" - > + 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" - title="Modifier" - style="pointer-events: visible;" - /> + name="edit_contact" + type="object" + class="fa fa-2x fa-edit text-info pull-right" + title="Modifier" + style="pointer-events: visible;" + /> <a - t-if="!read_only_mode" - name="partner_archive" - type="object" - class="fa fa-times pull-right" - title="Archiver" - /> + t-if="!read_only_mode" + name="partner_archive" + type="object" + class="fa fa-times pull-right" + title="Archiver" + /> <div class="o_kanban_image"> <img - alt="Contact image" - t-if="record.image_128.raw_value" - t-att-src="kanban_image('res.partner', 'image_128', record.id.raw_value)" - /> + alt="Contact image" + t-if="record.image_128.raw_value" + t-att-src="kanban_image('res.partner', 'image_128', record.id.raw_value)" + /> <t t-if="!record.image_128.raw_value"> <img - alt="Delivery" - t-if="record.type.raw_value === 'delivery'" - t-att-src='_s + "/base/static/img/truck.png"' - /> + alt="Delivery" + t-if="record.type.raw_value === 'delivery'" + t-att-src='_s + "/base/static/img/truck.png"' + /> <img - id="cgscop_partner_invoice_img" - alt="Invoice" - t-if="record.type.raw_value === 'invoice'" - t-att-src='_s + "/base/static/img/money.png"' - /> + id="cgscop_partner_invoice_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'" - > + 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'" - /> + 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_grey.png"' - /> + alt="Avatar" + t-if="record.is_company.raw_value === false" + t-att-src='_s + "/base/static/img/avatar_grey.png"' + /> </t> </t> </div> <div class="oe_kanban_details"> <field name="name" /> <div - t-if="record.function_lst_id.raw_value" - ><field name="function_lst_id" /></div> + t-if="record.function_lst_id.raw_value" + ><field name="function_lst_id" /></div> <div - t-if="record.email.raw_value" - ><field - name="email" - widget="email" - /></div> + t-if="record.email.raw_value" + ><field name="email" widget="email" /></div> <div - t-if="record.type.raw_value != 'contact'" - > + 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" - /> + 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> + t-if="record.phone.raw_value" + >Phone: <field name="phone" /></div> <div - t-if="record.mobile.raw_value" - >Mobile: <field name="mobile" /></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> + t-if="record.category_id.raw_value" + ><field + name="category_id" + widget="many2many_tags" + /></div> </div> </div> </t> @@ -550,11 +558,13 @@ </field> </xpath> - - <xpath expr="//notebook/page" position="attributes"> + <xpath + expr="//notebook/page[@name='contact_addresses']" + position="attributes" + > <attribute name="attrs" - >{'invisible': [('is_cooperative','=', True)]}</attribute> + >{'invisible': ['|', ('is_cooperative','=', True), ('is_company','!=', True)]}</attribute> </xpath> <xpath @@ -1208,7 +1218,11 @@ string="Ajouter un dirigeant" /> </p> - <field name="director_ids" readonly="1" style="pointer-events:none;"> + <field + name="director_ids" + readonly="1" + style="pointer-events:none;" + > <kanban> <field name="id" /> <field name="color" /> @@ -1325,7 +1339,12 @@ string="Ajouter un contact" /> </p> - <field name="other_child_ids" mode="kanban" readonly="1" style="pointer-events: none;"> + <field + name="other_child_ids" + mode="kanban" + readonly="1" + style="pointer-events: none;" + > <kanban> <field name="id" /> <field name="color" /> @@ -1840,17 +1859,17 @@ required="1" /> <field name="birthyear" /> - <br/> + <br /> <field name="email" /> <field name="phone" widget="phone" /> <field name="mobile" widget="phone" /> - <br/> + <br /> <field name="contact_origin_id" options="{'no_open': True, 'no_create': True}" /> <field name="contact_legality" readonly="1" /> - <br/> + <br /> <field name="ur_id" readonly="1" /> <field name="followup_delegate_id" @@ -1868,7 +1887,7 @@ <field name="function" /> <field name="employee" /> <field name="associate" /> - <br/> + <br /> <field name="category_id" widget="many2many_tags" @@ -1933,11 +1952,7 @@ <hr /> <group> <group attrs="{'invisible': [('type', '=', 'contact')]}"> - <field - name="name" - string="Nom" - required="1" - /> + <field name="name" string="Nom" required="1" /> <label for="street" string="Adresse" /> <div> <div name="div_address" class="o_address_format"> @@ -2019,17 +2034,17 @@ name="birthyear" attrs="{'invisible': [('parent_is_cooperative','=', False)]}" /> - <br/> + <br /> <field name="email" /> <field name="phone" widget="phone" /> <field name="mobile" widget="phone" /> - <br/> + <br /> <field name="contact_origin_id" options="{'no_open': True, 'no_create': True}" /> <field name="contact_legality" readonly="1" /> - <br/> + <br /> <field name="ur_id" readonly="1" /> <field name="followup_delegate_id" @@ -2061,7 +2076,7 @@ name="associate" attrs="{'invisible': [('parent_is_cooperative','=', False)]}" /> - <br/> + <br /> <field name="category_id" widget="many2many_tags"