is_company is now readonly when the partner is a contact

This commit is contained in:
Alexis de Lattre
2015-09-16 10:17:00 +02:00
committed by Raphaël Valyi
parent 0c6e8ac3d8
commit 8d3097de2a

View File

@@ -16,6 +16,10 @@
<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>
</field>
</record>
@@ -27,6 +31,9 @@
<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>