is_company is now readonly when the partner is a contact
This commit is contained in:
committed by
Raphaël Valyi
parent
0c6e8ac3d8
commit
8d3097de2a
@@ -16,6 +16,10 @@
|
|||||||
<xpath expr="//field[@name='child_ids']/form//field[@name='function']" position="before">
|
<xpath expr="//field[@name='child_ids']/form//field[@name='function']" position="before">
|
||||||
<field name="title"/>
|
<field name="title"/>
|
||||||
</xpath>
|
</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>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
@@ -27,6 +31,9 @@
|
|||||||
<field name="function" position="before">
|
<field name="function" position="before">
|
||||||
<field name="title"/>
|
<field name="title"/>
|
||||||
</field>
|
</field>
|
||||||
|
<xpath expr="//div[@class='oe_edit_only']/field[@name='is_company']" position="attributes">
|
||||||
|
<attribute name="attrs">{'readonly': [('parent_id', '!=', False)]}</attribute>
|
||||||
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user