Tejas Tank (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-bug-1010476-tta into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #1010476 in OpenERP Addons: "Import Google is not importing properly
meetings and contacts"
https://bugs.launchpad.net/openobject-addons/+bug/1010476
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1010476-tta/+merge/125116
Hello,
Fix the issue of importing google contacts.
Thanks,
Tejas - TTA
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1010476-tta/+merge/125116
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-1010476-tta.
=== modified file 'import_google/wizard/import_google.py'
--- import_google/wizard/import_google.py 2012-08-30 08:57:28 +0000
+++ import_google/wizard/import_google.py 2012-09-19 07:37:18 +0000
@@ -27,6 +27,7 @@
from pytz import timezone
from datetime import datetime
import time
+import base64
from osv import *
from tools.translate import _
@@ -282,7 +283,7 @@
self.contact = self.gd_client.GetContactsFeed()
while self.contact:
for entry in self.contact.entry:
- data = {}
+ data = {}
data['id'] = entry.id.text
name = tools.ustr(entry.title.text)
if name == "None":
@@ -290,6 +291,8 @@
data['name'] = name or _('Unknown')
emails = ','.join(email.address for email in entry.email)
data['email'] = emails
+ if self.gd_client.GetPhoto(entry):
+ data['image'] = base64.encodestring(self.gd_client.GetPhoto(entry))
if table == 'Contact':
data.update({'customer': str(self.context.get('customer')),
'supplier': str(self.context.get('supplier'))})
@@ -322,6 +325,12 @@
'name': value('company', fallback='name'),
'customer': 'customer',
'supplier': 'supplier',
+ 'city': 'city',
+ 'phone': 'phone',
+ 'mobile': 'mobile',
+ 'email': 'email',
+ 'image': 'image',
+ 'fax': 'fax',
'child_ids/id': ref(self.TABLE_ADDRESS, '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