[IMP] crm : when selecting a customer, his adress appears in the lead view but not the phone & email.

bzr revid: mdi@tinyerp.com-20120918083535-ul2dp0h6rbbj5scv
This commit is contained in:
Divyesh Makwana (Open ERP) 2012-09-18 14:05:35 +05:30
parent 34935043bc
commit e88e7b3f2c
2 changed files with 5 additions and 0 deletions

View File

@ -92,6 +92,7 @@ class base_stage(object):
if part:
addr = self.pool.get('res.partner').address_get(cr, uid, [part], ['contact'])
data.update(self.onchange_partner_address_id(cr, uid, ids, addr['contact'])['value'])
print "----------data---------------------",data
return {'value': data}
def _get_default_section_id(self, cr, uid, context=None):

View File

@ -300,6 +300,10 @@ class crm_lead(base_stage, format_address, osv.osv):
'city' : partner.city,
'state_id' : partner.state_id and partner.state_id.id or False,
'country_id' : partner.country_id and partner.country_id.id or False,
'email_from' : partner.email,
'phone' : partner.phone,
'mobile' : partner.mobile,
'fax' : partner.fax,
}
return {'value' : values}