Browse Source

[FIX] partner_contact_in_several_companies: Fix problem in view (#541)

12.0
Franco Tampieri 7 years ago
committed by kongrattapong
parent
commit
1f80ee376e
  1. 1
      partner_contact_in_several_companies/README.rst
  2. 2
      partner_contact_in_several_companies/__manifest__.py
  3. 19
      partner_contact_in_several_companies/views/res_partner.xml

1
partner_contact_in_several_companies/README.rst

@ -68,6 +68,7 @@ Contributors
* Jairo Llopis <j.llopis@grupoesoc.es>
* Richard deMeester <richard@willowit.com.au>
* Nicolas JEUDY <https://github.com/njeudy>
* Franco Tampieri <franco@tampieri.info>
Maintainer
----------

2
partner_contact_in_several_companies/__manifest__.py

@ -4,7 +4,7 @@
{
"name": "Contacts in several partners",
"summary": "Allow to have one contact in several partners",
"version": "11.0.1.0.0",
"version": "11.0.1.0.1",
"category": "Customer Relationship Management",
"website": "https://github.com/OCA/partner-contact",
"author": "Nicolas JEUDY,Odoo Community Association (OCA),Odoo SA",

19
partner_contact_in_several_companies/views/res_partner.xml

@ -34,6 +34,17 @@
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="type">form</field>
<field name="arch" type="xml">
<field name="parent_id" position="after">
<field name="contact_id" invisible="1"/>
</field>
<xpath expr="//field[@name='child_ids']/form//field[@name='name']" position="before">
<field name='contact_type' readonly='0'/>
<field name="contact_id" string="Contact"
attrs="{'invisible': [('contact_type','!=','attached')], 'required': [('contact_type','=','attached')]}"/>
</xpath>
<xpath expr="//field[@name='child_ids']/form//field[@name='name']" position="attributes">
<attribute name="attrs">{'invisible': [('contact_type','=','attached')]}</attribute>
</xpath>
<field name="is_company" position="after">
<field name="contact_type" invisible="1"/>
</field>
@ -119,14 +130,6 @@
</field>
</page>
</page>
<xpath expr="//field[@name='child_ids']/form//field[@name='name']" position="before">
<field name='contact_type' readonly='0'/>
<field name="contact_id" string="Contact"
attrs="{'invisible': [('contact_type','!=','attached')], 'required': [('contact_type','=','attached')]}"/>
</xpath>
<xpath expr="//field[@name='child_ids']/form//field[@name='name']" position="attributes">
<attribute name="attrs">{'invisible': [('contact_type','=','attached')]}</attribute>
</xpath>
</field>
</record>

Loading…
Cancel
Save