98 lines
5.9 KiB
XML
98 lines
5.9 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>
|
|
|
|
<!-- ################ -->
|
|
<!-- NOTEBOOK UPDATES -->
|
|
<!-- ################ -->
|
|
|
|
<!-- 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']/form/sheet/group/group/field[@name='name']"
|
|
position="before">
|
|
<field name="is_position_profile" readonly="1" invisible="1" />
|
|
<field name="partner_profile" string="Partner profile" invisible="1" />
|
|
</xpath>
|
|
|
|
<!-- page Other Positions -->
|
|
<xpath expr="//page[@name='other_position']" position="attributes">
|
|
<attribute name="attrs">{'invisible': ['|', ('contact_id','!=',False),
|
|
('is_company','=',True)]}</attribute>
|
|
</xpath>
|
|
<xpath expr="//page[@name='other_position']/field[@name='other_contact_ids']/kanban"
|
|
position="attributes">
|
|
<attribute name="create">true</attribute>
|
|
</xpath>
|
|
<xpath expr="//page[@name='other_position']/field[@name='other_contact_ids']"
|
|
position="attributes">
|
|
<attribute name="context">{'default_partner_profile': 3, 'default_contact_id':
|
|
active_id, 'default_name': name, 'default_street': street,
|
|
'default_street2': street2, 'default_city': city, 'default_state_id':
|
|
state_id, 'default_zip': zip, 'default_country_id': country_id,
|
|
'default_supplier': supplier}</attribute>
|
|
</xpath>
|
|
<xpath
|
|
expr="//field[@name='other_contact_ids']/form/sheet/group/group/field[@name='name']"
|
|
position="after">
|
|
<field name="is_position_profile" readonly="1" invisible="1" />
|
|
<field name="partner_profile" string="Partner profile" />
|
|
<field name="parent_id" widget="res_partner_many2one" placeholder="Company"
|
|
domain="[('is_company', '=', True),('is_main_profile','=', True)]"
|
|
context="{'default_partner_profile': 1, 'default_is_company': True, 'show_vat': True}" />
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
</data>
|
|
</odoo> |