159 lines
9.7 KiB
XML
159 lines
9.7 KiB
XML
<?xml version="1.0"?>
|
|
<odoo>
|
|
<data>
|
|
<record id="partner_profiles_form_view" model="ir.ui.view">
|
|
<field name="name">Partner Profiles Form View</field>
|
|
<field name="model">res.partner</field>
|
|
<field name="inherit_id" ref="base.view_partner_form" />
|
|
<field name="sequence">99</field>
|
|
<field name="arch" type="xml">
|
|
<!-- ################### -->
|
|
<!-- MAIN DISPLAY UPDATE -->
|
|
<!-- ################### -->
|
|
<xpath expr="//field[@name='name']" position="after">
|
|
<p class="oe_read_only" style="font-size:small; font-style:italic"
|
|
attrs="{'invisible': [('is_main_profile','=',False)]}">Main Profile</p>
|
|
<p class="oe_read_only" style="font-size:small; font-style:italic"
|
|
attrs="{'invisible': [('is_public_profile','=',False)]}">Public Profile</p>
|
|
<p class="oe_read_only" style="font-size:small; font-style:italic"
|
|
attrs="{'invisible': [('is_position_profile','=',False)]}">Position Profile</p>
|
|
</xpath>
|
|
<xpath expr="//field[@name='parent_id']" position="replace" />
|
|
<xpath expr="//field[@name='is_company']/.." position="after">
|
|
<group name="profile_data" class="bg-200">
|
|
<field name="partner_profile" readonly="1" invisible="1" />
|
|
<field name="is_main_profile" readonly="1" invisible="1" />
|
|
<field name="is_public_profile" readonly="1" invisible="1" />
|
|
<field name="is_position_profile" readonly="1" invisible="1" />
|
|
<group name="profile_status">
|
|
<field name="contact_id" widget="res_partner_many2one"
|
|
string="Main Profile" readonly="1"
|
|
attrs="{'invisible': [('is_main_profile','=',True)]}" />
|
|
<field name="parent_id" widget="res_partner_many2one"
|
|
placeholder="Company" domain="[('is_company', '=', True)]"
|
|
context="{'default_is_company': True, 'show_vat': True}"
|
|
attrs="{'invisible': ['|',('is_company', '=', True),'|',('contact_type','=','standalone'),('is_public_profile','=',True)]}"
|
|
readonly="1" />
|
|
<label for="public_profile_id"
|
|
attrs="{'invisible': [('is_main_profile','=',False)]}" />
|
|
<div class="o_row"
|
|
attrs="{'invisible': [('is_main_profile','=',False)]}">
|
|
<field name="public_profile_id" readonly="1" />
|
|
<button type="object" name="create_public_profile"
|
|
string="Create Public Profile"
|
|
attrs="{'invisible': [('public_profile_id','!=',False)]}" />
|
|
</div>
|
|
</group>
|
|
</group>
|
|
</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>
|
|
|
|
<!-- 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']/field[@name='other_contact_ids']/form"
|
|
position="replace" />
|
|
<xpath expr="//field[@name='other_contact_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>
|
|
|
|
<!-- #################################### -->
|
|
<!-- PUBLIC AND POSITION PROFILES DISPLAY -->
|
|
<!-- #################################### -->
|
|
<xpath expr="//div[@name='button_box']" position="attributes">
|
|
<attribute name="attrs">{'invisible': ['|', ('is_public_profile','=', True),
|
|
('is_position_profile','=', True)]}</attribute>
|
|
</xpath>
|
|
<xpath expr="//field[@name='company_type']" position="attributes">
|
|
<attribute name="attrs">{'invisible': ['|', ('is_public_profile','=', True),
|
|
('is_position_profile','=', True)]}</attribute>
|
|
</xpath>
|
|
<xpath expr="//field[@name='image']" position="attributes">
|
|
<attribute name="attrs">{'invisible': ['|', ('is_public_profile','=', True),
|
|
('is_position_profile','=', True)]}</attribute>
|
|
</xpath>
|
|
<xpath expr="//notebook" position="attributes">
|
|
<attribute name="attrs">{'invisible': ['|', ('is_public_profile','=', True),
|
|
('is_position_profile','=', True)]}</attribute>
|
|
</xpath>
|
|
<xpath expr="//field[@name='type']/../.." position="attributes">
|
|
<attribute name="attrs">{'invisible': ['|', ('is_public_profile','=', True),
|
|
('is_position_profile','=', True)]}</attribute>
|
|
</xpath>
|
|
<!-- ###################### -->
|
|
<!-- PUBLIC PROFILE DISPLAY -->
|
|
<!-- ###################### -->
|
|
<xpath expr="//field[@name='type']/../.." position="after">
|
|
<group attrs="{'invisible': [('is_public_profile','=',False)]}">
|
|
<group>
|
|
<label for="street" string="Address" />
|
|
<div class="o_address_format">
|
|
<field name="street" placeholder="Street..."
|
|
class="o_address_street"
|
|
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}" />
|
|
<field name="street2" placeholder="Street 2..."
|
|
class="o_address_street"
|
|
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}" />
|
|
<field name="city" placeholder="City" class="o_address_city"
|
|
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}" />
|
|
<field name="state_id" class="o_address_state" placeholder="State"
|
|
options='{"no_open": True}'
|
|
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"
|
|
context="{'country_id': country_id, 'zip': zip}" />
|
|
<field name="zip" placeholder="ZIP" class="o_address_zip"
|
|
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}" />
|
|
<field name="country_id" placeholder="Country"
|
|
class="o_address_country"
|
|
options='{"no_open": True, "no_create": True}'
|
|
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}" />
|
|
</div>
|
|
</group>
|
|
<group>
|
|
<field name="phone" widget="phone" />
|
|
<field name="mobile" widget="phone" />
|
|
<field name="email" widget="email" context="{'gravatar_image': True}" />
|
|
<field name="website" widget="url"
|
|
placeholder="e.g. https://www.odoo.com" />
|
|
</group>
|
|
</group>
|
|
</xpath>
|
|
<!-- ######################## -->
|
|
<!-- POSITION PROFILE DISPLAY -->
|
|
<!-- ######################## -->
|
|
<xpath expr="//field[@name='type']/../.." position="after">
|
|
<group attrs="{'invisible': [('is_position_profile','=',False)]}">
|
|
<group>
|
|
<field name="function" />
|
|
</group>
|
|
<group>
|
|
<field name="phone" widget="phone" />
|
|
<field name="email" widget="email" context="{'gravatar_image': True}" />
|
|
</group>
|
|
<group>
|
|
<field name="comment" />
|
|
</group>
|
|
</group>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
</data>
|
|
</odoo> |