tfr (Openerp) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-fix-basecontact into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-fix-basecontact/+merge/88697

This patch fix some usability in base contact : Add domain in location_id field 
and in address nested form into contact : Add the link to the partner


Wait until this bug is fixed https://bugs.launchpad.net/openerp-web/+bug/917180
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-fix-basecontact/+merge/88697
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-fix-basecontact.
=== modified file 'base_contact/base_contact.py'
--- base_contact/base_contact.py	2011-12-27 20:57:42 +0000
+++ base_contact/base_contact.py	2012-01-16 14:12:31 +0000
@@ -120,7 +120,6 @@
         'city': fields.char('City', size=128),
         'state_id': fields.many2one("res.country.state", 'Fed. State', domain="[('country_id','=',country_id)]"),
         'country_id': fields.many2one('res.country', 'Country'),
-        'partner_id': fields.many2one('res.partner', 'Partner Name', ondelete='set null', select=True, help="Keep empty for a private address, not related to partner."),
         'company_id': fields.many2one('res.company', 'Company',select=1),
         'job_ids': fields.one2many('res.partner.address', 'location_id', 'Contacts'),
         'partner_id': fields.related('job_ids', 'partner_id', type='many2one',\

=== modified file 'base_contact/base_contact_view.xml'
--- base_contact/base_contact_view.xml	2011-12-27 20:57:42 +0000
+++ base_contact/base_contact_view.xml	2012-01-16 14:12:31 +0000
@@ -50,7 +50,8 @@
                        </group>
                        <field name="job_ids" colspan="4" nolabel="1" mode="tree,form">
                             <form string="Functions and Addresses">
-                                <field name="location_id"/>
+                                <field name="partner_id" />
+                                <field name="location_id" domain="[('partner_id', '=', partner_id)]"/>
                                 <field name="function" />
                                 <separator string="Professional Info" colspan="4"/>
                                 <field name="phone"/>
@@ -135,7 +136,7 @@
         <field name="type">form</field>
         <field name="arch" type="xml">
             <separator string="Postal Address" position="after">
-                <field name="location_id" on_change="onchange_location_id(location_id)"/>
+                <field name="location_id" on_change="onchange_location_id(location_id)" domain="[('partner_id', '=', parent.id)]"/>
             </separator>
             <xpath expr="//field[@string='Contact Name']" position="replace">
                 <field name="contact_id"/>

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to