From f2c41053ea4d5216897d115df81662aad1d7d9b4 Mon Sep 17 00:00:00 2001 From: "Bhumika (OpenERP)" Date: Thu, 16 Jun 2011 18:04:36 +0530 Subject: [PATCH 01/15] [Fix]: mail_gateway : Fix fetch attachement even if the check box add attachement is not checked bzr revid: sbh@tinyerp.com-20110616123436-tclirmg6vju75i1j --- addons/mail_gateway/mail_gateway.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail_gateway/mail_gateway.py b/addons/mail_gateway/mail_gateway.py index c67a2668192..e891c081279 100644 --- a/addons/mail_gateway/mail_gateway.py +++ b/addons/mail_gateway/mail_gateway.py @@ -519,7 +519,7 @@ class mailgate_tool(osv.osv_memory): body = content has_plain_text = True elif part.get_content_maintype() in ('application', 'image'): - if filename : + if filename and attach: attachments[filename] = part.get_payload(decode=True) else: res = part.get_payload(decode=True) From ca2598f997dbea98d9d9bad5f890cf3e872e129e Mon Sep 17 00:00:00 2001 From: "Bhumika (OpenERP)" Date: Fri, 17 Jun 2011 12:09:14 +0530 Subject: [PATCH 02/15] [IMP]: fetchmail: improve the log message bzr revid: sbh@tinyerp.com-20110617063914-lue87brktmevt9a8 --- addons/fetchmail/fetchmail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/fetchmail/fetchmail.py b/addons/fetchmail/fetchmail.py index 41f84cfdedd..58a580d79c3 100644 --- a/addons/fetchmail/fetchmail.py +++ b/addons/fetchmail/fetchmail.py @@ -199,7 +199,7 @@ class email_server(osv.osv): pop_server.quit() - logger.notifyChannel('imap', netsvc.LOG_INFO, 'fetchmail fetch %s email(s) from %s' % (numMsgs, server.name)) + logger.notifyChannel(server.type, netsvc.LOG_INFO, 'fetchmail fetch %s email(s) from %s' % (numMsgs, server.name)) except Exception, e: logger.notifyChannel(server.type, netsvc.LOG_WARNING, '%s' % (tools.ustr(e))) From 6df880e9a4a092b1614154a68ef5f5eb31e1bf67 Mon Sep 17 00:00:00 2001 From: "Bhumika (OpenERP)" Date: Fri, 17 Jun 2011 13:57:38 +0530 Subject: [PATCH 03/15] [IMP]: fetchmail: improve the log message bzr revid: sbh@tinyerp.com-20110617082738-i0umdo9cptek6l4j --- addons/fetchmail/fetchmail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/fetchmail/fetchmail.py b/addons/fetchmail/fetchmail.py index 58a580d79c3..386b48f1546 100644 --- a/addons/fetchmail/fetchmail.py +++ b/addons/fetchmail/fetchmail.py @@ -116,7 +116,7 @@ class email_server(osv.osv): if context is None: context = {} for server in self.browse(cr, uid, ids, context=context): - logger.notifyChannel('imap', netsvc.LOG_INFO, 'fetchmail start checking for new emails on %s' % (server.name)) + logger.notifyChannel(server.type, netsvc.LOG_INFO, 'fetchmail start checking for new emails on %s' % (server.name)) context.update({'server_id': server.id, 'server_type': server.type}) try: if server.type == 'imap': From c89947c8fb60a3b2ae247a2a4d22f34c95a0de5c Mon Sep 17 00:00:00 2001 From: "DBR (OpenERP)" Date: Mon, 20 Jun 2011 10:42:42 +0530 Subject: [PATCH 04/15] [FIX] Fix the new step in the configuration for host name lp bug: https://launchpad.net/bugs/785673 fixed bzr revid: dbr@tinyerp.com-20110620051242-irs0jljjfpbkdbaq --- addons/caldav/wizard/caldav_browse.py | 24 ++++++++++++++++++--- addons/caldav/wizard/caldav_browse_view.xml | 22 +++++++++++++++++++ addons/crm_caldav/crm_caldav_view.xml | 2 +- 3 files changed, 44 insertions(+), 4 deletions(-) diff --git a/addons/caldav/wizard/caldav_browse.py b/addons/caldav/wizard/caldav_browse.py index 9e67f972216..134454627c1 100644 --- a/addons/caldav/wizard/caldav_browse.py +++ b/addons/caldav/wizard/caldav_browse.py @@ -197,8 +197,9 @@ configuration host = config.get('xmlrpc_interface', None) port = config.get('xmlrpc_port',8069) if host == '' or None: - host = 'localhost' - port = 8069 + obj = self.pool.get('user.preference').browse(cr,uid,uid,context) + host = obj.host_name + port = 8069 if not config.get_misc('webdav','enable',True): raise Exception("WebDAV is disabled, cannot continue") user_pool = self.pool.get('res.users') @@ -238,6 +239,7 @@ class user_preference(osv.osv_memory): 'calendar' :fields.many2one('basic.calendar', 'Calendar', required=True), 'service': fields.selection([('webdav','CalDAV')], "Services"), 'device' : fields.selection([('other', 'Other'), ('iphone', 'iPhone'), ('android', 'Android based device'),('thunderbird', 'Sunbird/Thunderbird'), ('evolution','Evolution')], "Software/Devices"), + 'host_name': fields.char('Host Name', size=64, required=True), } def _get_default_calendar(self, cr, uid, context): @@ -278,6 +280,22 @@ class user_preference(osv.osv_memory): 'target': 'new', 'context': context, } - + + def next_window(self, cr, uid, ids, context=None): + obj_model = self.pool.get('ir.model.data') + model_data_ids = obj_model.search(cr,uid,[('model','=','ir.ui.view'),('name','=','user_prefernce_form')]) + resource_id = obj_model.read(cr, uid, model_data_ids, fields=['res_id']) + context.update({'res_id': ids}) + resource_id = obj_model.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id'] + + return { + 'view_type': 'form', + 'view_mode': 'form', + 'res_model': 'user.preference', + 'views': [(resource_id,'form')], + 'type': 'ir.actions.act_window', + 'target': 'new', + 'context': context, + } user_preference() diff --git a/addons/caldav/wizard/caldav_browse_view.xml b/addons/caldav/wizard/caldav_browse_view.xml index 53af6029883..18429232de0 100644 --- a/addons/caldav/wizard/caldav_browse_view.xml +++ b/addons/caldav/wizard/caldav_browse_view.xml @@ -24,6 +24,28 @@ + + host_preference + user.preference + form + +
+ + +