openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #04640
lp:~openerp-dev/openobject-addons/trunk-contact-google-sync-backlog_validation-uco into lp:~openerp-dev/openobject-addons/trunk-contact-google-sync
Ujjvala Collins (OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-contact-google-sync-backlog_validation-uco into lp:~openerp-dev/openobject-addons/trunk-contact-google-sync.
Requested reviews:
OpenERP R&D Addons Team 1 (openerp-dev-addons1)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-contact-google-sync-backlog_validation-uco/+merge/54853
Backlog Validation 1
------------------------------
[FIX]: sync_google_contact
BUG : don't work with python gdata 1.2.4 only with 2.0.8
we have to get rid of this import :import gdata.contacts.client
because it's not compatible with old gdata version
that's means that we have to replace this line :
query = gdata.contacts.client.ContactsQuery(feed='/m8/feeds/groups/default/full')
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-contact-google-sync-backlog_validation-uco/+merge/54853
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-contact-google-sync.
=== modified file 'google_base_account/wizard/google_login.py'
--- google_base_account/wizard/google_login.py 2011-03-18 13:21:25 +0000
+++ google_base_account/wizard/google_login.py 2011-03-25 12:23:29 +0000
@@ -35,11 +35,7 @@
}
def google_login(self, user, password, type='group', context=None):
- gd_client=False
- if type=='group':
- gd_client=gdata.contacts.client.ContactsClient(source='OpenERP')
- if type=='contact' :
- gd_client = gdata.contacts.service.ContactsService()
+ gd_client = gdata.contacts.service.ContactsService()
try:
gd_client.ClientLogin(user, password,gd_client.source)
except Exception:
=== modified file 'sync_google_contact/wizard/google_contact_import.py'
--- sync_google_contact/wizard/google_contact_import.py 2011-03-23 04:47:25 +0000
+++ sync_google_contact/wizard/google_contact_import.py 2011-03-25 12:23:29 +0000
@@ -26,7 +26,6 @@
import gdata
import gdata.contacts.service
import gdata.contacts
- import gdata.contacts.client
except ImportError:
raise osv.except_osv(_('Google Contacts Import Error!'), _('Please install gdata-python-client from http://code.google.com/p/gdata-python-client/downloads/list'))
@@ -66,10 +65,10 @@
if not gd_client:
raise osv.except_osv(_('Error'), _("Authentication fail check the user and password !"))
- query = gdata.contacts.client.ContactsQuery(feed='/m8/feeds/groups/default/full')
res = []
+ query = gdata.contacts.service.GroupsQuery(feed='/m8/feeds/groups/default/full')
if gd_client:
- groups = gd_client.GetGroups(q=query)
+ groups = gd_client.GetFeed(query.ToUri())
for grp in groups.entry:
res.append((grp.id.text, grp.title.text))
res.append(('all','All Groups'))
Follow ups