Browse Source

Making the 'personal contact' informations depentens of the module 'personal_contact_information'

14.0
Denis Leemann 9 years ago
committed by newtratip
parent
commit
2013d58d5e
  1. 2
      partner_contact_nationality/__openerp__.py
  2. 23
      partner_contact_nationality/views/res_partner.xml

2
partner_contact_nationality/__openerp__.py

@ -18,7 +18,7 @@
'installable': True, 'installable': True,
'auto_install': False, 'auto_install': False,
"depends": [ "depends": [
"base",
"partner_contact_personal_information_page",
], ],
"data": [ "data": [
"views/res_partner.xml", "views/res_partner.xml",

23
partner_contact_nationality/views/res_partner.xml

@ -1,30 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo>
<data>
<!-- Declared the same in every module that may need it -->
<record id="view_personal_information_page_nationality" model="ir.ui.view"> <record id="view_personal_information_page_nationality" model="ir.ui.view">
<field name="name">Partner nationality: personal info</field> <field name="name">Partner nationality: personal info</field>
<field name="model">res.partner</field> <field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="priority">2</field>
<field name="arch" type="xml">
<data>
<xpath expr="//page[@name='internal_notes']" position="after">
<page name="personal_information_page"
string="Personal Information"
attrs="{'invisible': [('is_company','=',True)]}">
<group name="personal_information_group"/>
</page>
</xpath>
</data>
</field>
</record>
<record id="personal_contact_information" model="ir.ui.view">
<field name="name">Partner nationality: personal info</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.personal_contact_information"/>
<field name="inherit_id" ref="partner_contact_personal_information_page.personal_information"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<data> <data>
<xpath expr="//page[@name='personal_information_page']/group[@name='personal_information_group']"> <xpath expr="//page[@name='personal_information_page']/group[@name='personal_information_group']">
@ -34,5 +14,4 @@
</field> </field>
</record> </record>
</data>
</odoo> </odoo>
Loading…
Cancel
Save