From eeb4a028db496561be279da4eee075ea570c4519 Mon Sep 17 00:00:00 2001 From: "Sbh (OpenERP)" Date: Thu, 10 Feb 2011 15:36:12 +0530 Subject: [PATCH] [Fix] google_contact: Featch all contact detail bzr revid: sbh@tinyerp.com-20110210100612-xsmv0458vzaz57v4 --- addons/google_contact/google_contact.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/addons/google_contact/google_contact.py b/addons/google_contact/google_contact.py index 05e22bd09a1..687e05dd402 100644 --- a/addons/google_contact/google_contact.py +++ b/addons/google_contact/google_contact.py @@ -71,8 +71,14 @@ class google_contact(osv.osv): for obj in self.browse(cr, uid, ids, context=context): google_obj=google_lib(obj.user,obj.password) contact=google_obj._get_contact() - for i, entry in enumerate(contact.entry): - print entry.title.text + while contact: + for i, contact in enumerate(contact.entry): + if contact.title.text: + print contact.title.text + next = contact.GetNextLink() + contact=None + if next: + contact = google_obj.GetContactsFeed(next.href) return {} google_contact()