[IMP] res.partner different address types

When using the Settings->Configuration->Sales "Allow a different address for
delivery and invoicing". It's not clear how to setup the different addresses
with their type as the kanban view uses a simplified form view.

This commit add an action "Contact Details" that appears in the more menu when
the option is checked. That action shows the list of contacts with their types
and the full contact form.

bzr revid: al@openerp.com-20130223005635-r1t02nmpj7qmktf7
This commit is contained in:
Antony Lesuisse 2013-02-23 01:56:35 +01:00
parent 237d3d8500
commit 7674c1f6d6
1 changed files with 26 additions and 0 deletions

View File

@ -105,5 +105,31 @@
</field>
</record>
<record id="view_res_partner_tree_type" model="ir.ui.view">
<field name="name">res.partner.tree.inherit.type</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_tree"/>
<field name="arch" type="xml">
<field name="parent_id" position="after">
<field name="type" invisible="context.get('hide_type', 1)"/>
</field>
</field>
</record>
<!-- On the customer/supplier form if "Allow a different address for
delivery and invoicing" is set add "Contact Details" in the more menu
showing the list of contact with their types -->
<act_window
id="res_partner_rule_children"
name="Contact Details"
context="{'default_parent_id': active_id, 'hide_type': 0}"
domain="[('parent_id','=',active_id)]"
res_model="res.partner"
src_model="res.partner"
view_mode="tree,form,kanban"
view_type="form"
groups="sale.group_delivery_invoice_address"
/>
</data>
</openerp>