[IMP] partner_profiles: clarify position profiles display
separates the notebook pages of the child_ids and the position profiles in both company and individual partner form views.
This commit is contained in:
committed by
Stéphan Sainléger
parent
9438f19140
commit
019019aa93
@@ -48,28 +48,98 @@
|
||||
</xpath>
|
||||
|
||||
<!-- page Contacts & Adresses -->
|
||||
<xpath expr="//field[@name='child_ids']/.." position="attributes">
|
||||
<attribute name="attrs">{'invisible': [('is_company','=', False)]}</attribute>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="//field[@name='child_ids']/form/sheet/group/group/field[@name='contact_type']"
|
||||
position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='child_ids']" position="before">
|
||||
<button name="%(action_create_position_profile_wizard)d"
|
||||
string="Create New Position"
|
||||
class="oe_highlight" type="action"
|
||||
attrs="{'invisible': [('is_main_profile','=',False)]}" />
|
||||
<xpath
|
||||
expr="//field[@name='child_ids']" position="before">
|
||||
<div class="alert alert-info" role="alert" style="margin-bottom:0px;"
|
||||
attrs="{'invisible': [('is_company','=', False)]}">
|
||||
<span>Please find here <strong>all</strong> the profiles/addresses/contacts
|
||||
linked to this main profile. Contact creation from this tab <strong>only
|
||||
generates new main profiles</strong>.</span>
|
||||
</div>
|
||||
<div class="alert alert-info" role="alert" style="margin-bottom:0px;"
|
||||
attrs="{'invisible': [('is_company','=', True)]}">
|
||||
<span>Please find here <strong>all</strong> the addresses linked with this
|
||||
main profile. Adress creation from this tab <strong>only
|
||||
generates new main profiles</strong>.</span>
|
||||
</div>
|
||||
</xpath>
|
||||
|
||||
<!-- page Structure's position -->
|
||||
<xpath expr="//page[@name='other_position']" position="after">
|
||||
<page name="strecture_positions" string="Positions"
|
||||
attrs="{'invisible': [('is_company','=', False)]}">
|
||||
<div class="alert alert-info" role="alert" style="margin-bottom:0px;">
|
||||
<span>Please find here <strong>all the position profiles</strong> linked
|
||||
to this main profile.</span>
|
||||
</div>
|
||||
<field name="structure_position_ids" mode="kanban"
|
||||
domain="[('is_position_profile', '=', True)]">
|
||||
<kanban create="false">
|
||||
<field name="id" />
|
||||
<field name="color" />
|
||||
<field name="name" />
|
||||
<field name="title" />
|
||||
<field name="email" />
|
||||
<field name="function" />
|
||||
<field name="phone" />
|
||||
<field name="mobile" />
|
||||
<field name="image_small" />
|
||||
<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'">
|
||||
<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)" />
|
||||
</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.phone.raw_value">Phone: <field
|
||||
name="phone" widget="phone" /></div>
|
||||
<div t-if="record.mobile.raw_value">Mobile: <field
|
||||
name="mobile" widget="phone" /></div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
<button name="%(action_create_position_profile_wizard)d"
|
||||
string="Create New Position"
|
||||
class="oe_highlight" type="action"
|
||||
attrs="{'invisible': [('is_main_profile','=',False)]}" />
|
||||
</page>
|
||||
</xpath>
|
||||
|
||||
<!-- page Other Positions -->
|
||||
<xpath expr="//page[@name='other_position']" position="attributes">
|
||||
<attribute name="attrs">{'invisible': [('is_company','=',True)]}</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//page[@name='other_position']" position="attributes">
|
||||
<attribute name="string">Positions</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//page[@name='other_position']/field[@name='other_contact_ids']/form"
|
||||
position="replace" />
|
||||
<xpath expr="//field[@name='other_contact_ids']" position="before">
|
||||
<div class="alert alert-info" role="alert" style="margin-bottom:0px;">
|
||||
<span>Please find here <strong>all the position profiles</strong> linked to
|
||||
this main profile.</span>
|
||||
</div>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='other_contact_ids']" position="after">
|
||||
<button name="%(action_create_position_profile_wizard)d"
|
||||
string="Create New Position"
|
||||
class="oe_highlight" type="action"
|
||||
|
Reference in New Issue
Block a user