one2many_phone: Workaround a bug "Record does not exist or has been deleted."
This commit is contained in:
@@ -85,14 +85,24 @@
|
||||
<field name="email" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</field>
|
||||
<!-- I can't display phone_ids in the Contacts
|
||||
because there is a very strange thing in the web client: if
|
||||
you have a res.partner.phone on one of the fields,
|
||||
it will send to write {'child_ids': [1, ID_child, {'phone_ids': [[5], [4, id_phone_child]]}]}
|
||||
=> it will delete res.partner.phone and then try to re-create it,
|
||||
which triggers the message 'Record does not exist or has been deleted.'
|
||||
<xpath expr="//field[@name='child_ids']/form//field[@name='phone']" position="after">
|
||||
<field name="phone_ids" nolabel="1" colspan="2"/>
|
||||
<field name="phone_ids" nolabel="1" colspan="2" widget="many2many_tags"/>
|
||||
</xpath>
|
||||
-->
|
||||
<xpath expr="//field[@name='child_ids']/form//field[@name='phone']" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
<attribute name="readonly">1</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='child_ids']/form//field[@name='mobile']" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
<attribute name="readonly">1</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='child_ids']/form//field[@name='email']" position="attributes">
|
||||
<attribute name="readonly">1</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user