[MERGE] google import
bzr revid: fp@openerp.com-20120916151322-dccd8q6bsn70amj2
This commit is contained in:
commit
7a7ab27c25
|
@ -38,12 +38,12 @@ 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':
|
||||
elif type == 'contact':
|
||||
gd_client = gdata.contacts.service.ContactsService()
|
||||
elif type == 'calendar':
|
||||
gd_client = gdata.calendar.service.CalendarService()
|
||||
if type =='docs_client':
|
||||
elif type =='docs_client':
|
||||
gd_client = gdata.docs.client.DocsClient()
|
||||
else:
|
||||
gd_client = gdata.contacts.service.ContactsService()
|
||||
|
|
|
@ -421,11 +421,11 @@ class import_framework(Thread):
|
|||
def _send_notification_email(self, result, error):
|
||||
if not self.email:
|
||||
return False
|
||||
email_obj = self.obj.pool.get('mail.message')
|
||||
email_obj = self.obj.pool.get('mail.mail')
|
||||
email_id = email_obj.create(self.cr, self.uid, {
|
||||
'email_from' : 'import@module.openerp',
|
||||
'email_to' : self.email,
|
||||
'body' : self.get_email_body(result, error),
|
||||
'body_html' : self.get_email_body(result, error),
|
||||
'subject' : self.get_email_subject(result, error),
|
||||
'auto_delete' : True})
|
||||
email_obj.send(self.cr, self.uid, [email_id])
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue