You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

137 lines
6.5 KiB

<?xml version="1.0"?>
<odoo>
<record id="act_partner_qualifier" model="ir.actions.act_window">
<field name="name">Qualifiers</field>
<field name="res_model">opendons_qualifier.partnerqualifier</field>
<field name="view_mode">tree,form,graph</field>
<field name="context">{'search_default_partner_id': active_id}</field>
</record>
<record id="act_partner_address" model="ir.actions.act_window">
<field name="name">Addresses</field>
<field name="res_model">opendons.partneraddress</field>
<field name="view_mode">tree,form,graph</field>
<field name="context">{'search_default_partner_id': active_id}</field>
</record>
<record id="act_partner_email" model="ir.actions.act_window">
<field name="name">Emails</field>
<field name="res_model">opendons.partneremail</field>
<field name="view_mode">tree,form,graph</field>
<field name="context">{'search_default_partner_id': active_id}</field>
</record>
<record id="act_partner_phone" model="ir.actions.act_window">
<field name="name">phones</field>
<field name="res_model">opendons.partnerphone</field>
<field name="view_mode">tree,form,graph</field>
<field name="context">{'search_default_partner_id': active_id}</field>
</record>
<record id="act_partner_relationship" model="ir.actions.act_window">
<field name="name">Relationships</field>
<field name="res_model">opendons_relationship.partner</field>
<field name="view_mode">tree,form,graph</field>
<field name="context">{'search_default_partner_id': active_id}</field>
</record>
<record id="view_partner_form" model="ir.ui.view">
<field name="name">opendons.res.partner.form</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form" />
<field name="arch" type="xml">
<xpath expr="/form/sheet/div/h1" position="replace">
<group>
<field id="company" class="o_text_overflow" name="name" default_focus="1" placeholder="e.g. Lumber Inc" attrs="{'required' : [('type', '=', 'contact'),('is_company', '=', True)], 'invisible': [('is_company','=', False)]}"/>
<field id="individual" class="o_text_overflow" name="name" default_focus="1" placeholder="e.g. Brandom Freeman" attrs="{'required' : [('type', '=', 'contact'), ('is_company', '=', False)], 'invisible': [('is_company','=', True)]}"/>
<field name="firstname" attrs="{'invisible':[('is_company','=',True)]}"/>
<field name="key"/>
<field name="parent_id" string="Company Name"
widget="res_partner_many2one"
placeholder="Company Name..."
domain="[('is_company', '=', True)]" context="{'default_is_company': True, 'show_vat': True}"
attrs="{'invisible': ['|', '&amp;', ('is_company','=', True),('parent_id', '=', False),('company_name', '!=', False),('company_name', '!=', '')]}"/>
<field name="company_name" attrs="{'invisible': ['|', '|', ('company_name', '=', False), ('company_name', '=', ''), ('is_company', '=', True)]}"/>
<button name="create_company" icon="fa-plus-square" string="Create company"
type="object" class="oe_edit_only btn-link"
attrs="{'invisible': ['|', '|', ('is_company','=', True), ('company_name', '=', ''), ('company_name', '=', False)]}"/>
</group>
</xpath>
<xpath expr="/form/sheet/div/div" position="replace">
</xpath>
<xpath expr="//label[@for='phone']" position="replace"></xpath>
<xpath expr="//field[@name='phone']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//label[@for='mobile']" position="replace"></xpath>
<xpath expr="//field[@name='mobile']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//label[@for='email']" position="replace"></xpath>
<xpath expr="//field[@name='email']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//page[@name='contact_addresses']" position="replace">
</xpath>
<xpath expr="//span[@name='address_name']" position="before">
<field name="npai_count"/>
</xpath>
<xpath expr="//field[@name='state_id']" position="replace">
</xpath>
<xpath expr="//div[@name='button_box']" position="inside">
<button class="oe_stat_button" type="action"
name="%(act_partner_qualifier)d"
icon="fa-info">
<field string="Qualifiers" name="qualifier_count" widget="statinfo"/>
</button>
<button class="oe_stat_button" type="action"
name="%(act_partner_email)d"
icon="fa-envelope">
<field string="Email" name="email_count" widget="statinfo"/>
</button>
<button class="oe_stat_button" type="action"
name="%(act_partner_phone)d"
icon="fa-phone">
<field string="Phone" name="phone_count" widget="statinfo"/>
</button>
<button class="oe_stat_button" type="action"
name="%(act_partner_relationship)d"
icon="fa-handshake-o">
<field string="Relationship" name="relationshipPartner_count" widget="statinfo"/>
</button>
</xpath>
</field>
</record>
<menuitem id="opendons_qualifier_title_menu" name ="Qualifiers"
parent="contacts.menu_contacts" sequence="21"/>
<menuitem id="opendons_qualifier_menu" action="qualifier_action"
parent="opendons_qualifier_title_menu" sequence="1"/>
<menuitem id="opendons_qualifier_category_menu" action="category_action"
parent="opendons_qualifier_title_menu" sequence="2"/>
<menuitem id="opendons_relationship_title_menu" name ="Relationships"
parent="contacts.menu_contacts" sequence="22"/>
</odoo>