[IMP]google import calandar issue fix

bzr revid: pna@tinyerp.com-20120830085728-8svvosxzr2oz97wi
This commit is contained in:
Pinakin Nayi (OpenERP) 2012-08-30 14:27:28 +05:30
parent 1c7213ab41
commit 7ca72b62e9
3 changed files with 13 additions and 9 deletions

View File

@ -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:

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',

View File

@ -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):