From fa820e7904532398ed06f21495d22505d4412dea Mon Sep 17 00:00:00 2001 From: "Bhumika (OpenERP)" Date: Wed, 23 Feb 2011 19:04:50 +0530 Subject: [PATCH] [IMP] sync_google_contact: check the parnter is exist bzr revid: sbh@tinyerp.com-20110223133450-604ulvfumymbcnll --- addons/sync_google_contact/wizard/google_contact_import.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/sync_google_contact/wizard/google_contact_import.py b/addons/sync_google_contact/wizard/google_contact_import.py index b6e85bbcd96..bda18d98d9a 100644 --- a/addons/sync_google_contact/wizard/google_contact_import.py +++ b/addons/sync_google_contact/wizard/google_contact_import.py @@ -263,6 +263,7 @@ class synchronize_google_contact(osv.osv_memory): res = {} addr = addresss_obj.browse(cr,uid,contact_ids)[0] name = str((addr.name or addr.partner_id and addr.partner_id.name or '').encode('utf-8')) + addres=addr.partner_id email = addr.email phone = addr.phone mobile = addr.mobile @@ -277,7 +278,7 @@ class synchronize_google_contact(osv.osv_memory): res['phone']=data.get('phone','') if not fax: res['fax']=data.get('fax','') - if data.get('partner_id'): + if data.get('partner_id') and not addres : res['partner_id'] = data.get('partner_id') addresss_obj.write(cr,uid,contact_ids,res,context=context) return {}