From 7e1369cca827680a37ea83ae32ac772723bb8e7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 8 Nov 2012 17:08:26 +0100 Subject: [PATCH] [FIX] fetchmail: fixed a bug about fetchmail_server_id when sending an email. bzr revid: tde@openerp.com-20121108160826-40dj27zvmqxf4im7 --- addons/fetchmail/fetchmail.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/fetchmail/fetchmail.py b/addons/fetchmail/fetchmail.py index e0023697594..68f05dfeee2 100644 --- a/addons/fetchmail/fetchmail.py +++ b/addons/fetchmail/fetchmail.py @@ -243,20 +243,20 @@ class mail_mail(osv.osv): def create(self, cr, uid, values, context=None): if context is None: - context={} + context = {} fetchmail_server_id = context.get('fetchmail_server_id') if fetchmail_server_id: values['fetchmail_server_id'] = fetchmail_server_id - res = super(mail_mail,self).create(cr, uid, values, context=context) + res = super(mail_mail, self).create(cr, uid, values, context=context) return res def write(self, cr, uid, ids, values, context=None): if context is None: - context={} + context = {} fetchmail_server_id = context.get('fetchmail_server_id') if fetchmail_server_id: - values['fetchmail_server_id'] = server_id - res = super(mail_mail,self).write(cr, uid, ids, values, context=context) + values['fetchmail_server_id'] = fetchmail_server_id + res = super(mail_mail, self).write(cr, uid, ids, values, context=context) return res