[MERGE] Merged PNA's branch to improve import_google module

bzr revid: pso@tinyerp.com-20120830113341-fyr0qew8yb3m4o10
This commit is contained in:
pso (OpenERP)
2012-08-30 17:03:41 +05:30
3 changed files with 13 additions and 9 deletions
@@ -37,14 +37,16 @@ class google_login(osv.osv_memory):
}
def google_login(self, user, password, type='', context=None):
if type == 'group':
gd_client = gdata.contacts.client.ContactsClient(source='OpenERP')
if type == 'contact':
gd_client = gdata.contacts.service.ContactsService()
if type == 'calendar':
gd_client = gdata.calendar.service.CalendarService()
if type =='docs_client':
gd_client = gdata.docs.client.DocsClient()
if type == 'group' or type == 'contact' or type == 'calendar' or type == 'docs_client':
if type == 'group' :
gd_client = gdata.contacts.client.ContactsClient(source='OpenERP')
gd_client = gdata.contacts.service.ContactsService()
if type == 'contact':
gd_client = gdata.contacts.service.ContactsService()
if type == 'calendar':
gd_client = gdata.calendar.service.CalendarService()
if type =='docs_client':
gd_client = gdata.docs.client.DocsClient()
else:
gd_client = gdata.contacts.service.ContactsService()
try:
+1 -1
View File
@@ -255,7 +255,7 @@ class google_import(import_framework):
'email_from': 'Email',
'date': 'DateStart',
'date_deadline': 'DateEnd',
'categ_id/id': call(self.get_event_category, value('Category')),
'categ_ids/id': call(self.get_event_category, value('Category')),
'recurrency': self.get_rec,
'end_date' : 'end_date',
'end_type' : 'end_type',
@@ -110,6 +110,8 @@ class synchronize_google(osv.osv_memory):
_defaults = {
'group_name': 'all',
'customer': True,
'supplier': True,
}
def import_google(self, cr, uid, ids, context=None):