Files
odoo-usability/base_usability/partner_view.xml
2018-12-24 20:24:08 -02:00

49 lines
1.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2014-2015 Akretion (http://www.akretion.com/)
@author: Alexis de Lattre <alexis.delattre@akretion.com>
The licence is in the file __openerp__.py
-->
<openerp>
<data>
<record id="view_partner_form" model="ir.ui.view">
<field name="name">base_usability.title.on.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="//field[@name='child_ids']/form//field[@name='function']" position="before">
<field name="title"/>
</xpath>
<!-- is_company option is readonly when the partner is a contact -->
<xpath expr="//div[@class='oe_edit_only']/field[@name='is_company']" position="attributes">
<attribute name="attrs">{'readonly': [('parent_id', '!=', False)]}</attribute>
</xpath>
<!-- Wider 'name' field -->
<xpath expr="//sheet/div[@class='oe_title oe_left']" position="attributes">
<attribute name="style">width: 650px;</attribute>
</xpath>
<xpath expr="//field[@name='child_ids']/form/sheet/div[@class='oe_title']" position="attributes">
<attribute name="style">width: 600px;</attribute>
</xpath>
</field>
</record>
<record id="view_partner_simple_form" model="ir.ui.view">
<field name="name">base_usability.title.on.partner.simplified.form</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_simple_form"/>
<field name="arch" type="xml">
<field name="function" position="before">
<field name="title"/>
</field>
<xpath expr="//div[@class='oe_edit_only']/field[@name='is_company']" position="attributes">
<attribute name="attrs">{'readonly': [('parent_id', '!=', False)]}</attribute>
</xpath>
</field>
</record>
</data>
</openerp>