Port base_usability, sale_usability, sale_stock_usability to v10

This commit is contained in:
Alexis de Lattre
2016-10-27 09:33:15 +02:00
parent 9e37c6e1ae
commit 42233bc0ce
23 changed files with 164 additions and 474 deletions

View File

@@ -1,32 +1,21 @@
<?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
© 2014-2016 Akretion (http://www.akretion.com/)
@author: Alexis de Lattre <alexis.delattre@akretion.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<openerp>
<data>
<odoo>
<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">
<xpath expr="//sheet/div[@class='oe_title']" 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>
@@ -38,11 +27,7 @@
<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>
</odoo>