From 37b82523e83851792cbc0dc9f7eb4c0a7983d4da Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Tue, 8 Jul 2014 17:03:00 +0200 Subject: [PATCH] [FIX] fetchmail: add api decorator on method connect() to fix issue #980 The method does not follow naming conventions. Therefore the "guessing" api decorator picks the wrong method wrapper. (Manual rebase of #1003) --- addons/fetchmail/fetchmail.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/fetchmail/fetchmail.py b/addons/fetchmail/fetchmail.py index 55ac185a0cb..b496b8bca76 100644 --- a/addons/fetchmail/fetchmail.py +++ b/addons/fetchmail/fetchmail.py @@ -35,7 +35,7 @@ import base64 from openerp import addons from openerp.osv import fields, osv -from openerp import tools +from openerp import tools, api from openerp.tools.translate import _ _logger = logging.getLogger(__name__) @@ -129,6 +129,7 @@ openerp_mailgate: "|/path/to/openerp-mailgate.py --host=localhost -u %(uid)d -p self.write(cr, uid, ids , {'state':'draft'}) return True + @api.cr_uid_ids_context def connect(self, cr, uid, server_id, context=None): if isinstance(server_id, (list,tuple)): server_id = server_id[0]