diff options
| author | Rifakat Haradwala (Open ERP) <rha@tinyerp.com> | 2011-03-18 19:14:19 +0530 |
|---|---|---|
| committer | Rifakat Haradwala (Open ERP) <rha@tinyerp.com> | 2011-03-18 19:14:19 +0530 |
| commit | 455fb2d6b349df99449e1b8655349be8ce2869db (patch) | |
| tree | 5bce8ea907cb9a76713ed8c43134aa430a8b0cfd /addons/fetchmail/fetchmail.py | |
| parent | 7fb869688ce5f87d3a7ad13b247fb9ed4b88da83 (diff) | |
[IMP] email: email cleanup
bzr revid: rha@tinyerp.com-20110318134419-78qmipdipsryqgnz
Diffstat (limited to 'addons/fetchmail/fetchmail.py')
| -rw-r--r-- | addons/fetchmail/fetchmail.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/fetchmail/fetchmail.py b/addons/fetchmail/fetchmail.py index 4b2b44a5414..7e514141fea 100644 --- a/addons/fetchmail/fetchmail.py +++ b/addons/fetchmail/fetchmail.py @@ -161,7 +161,7 @@ class email_server(osv.osv): def fetch_mail(self, cr, uid, ids, context=None): if context is None: context = {} - email_tool = self.pool.get('email.server.tools') + thread_pool = self.pool.get('email.thread') action_pool = self.pool.get('ir.actions.server') context.update({'get_server': True}) for server in self.browse(cr, uid, ids, context=context): @@ -174,7 +174,7 @@ class email_server(osv.osv): result, data = imap_server.search(None, '(UNSEEN)') for num in data[0].split(): result, data = imap_server.fetch(num, '(RFC822)') - res_id = email_tool.process_email(cr, user, server.object_id.model, data[0][1], attach=server.attach, context=context) + res_id = thread_pool.process_email(cr, user, server.object_id.model, data[0][1], attach=server.attach, context=context) if res_id and server.action_id: action_pool.run(cr, user, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id]}) @@ -196,7 +196,7 @@ class email_server(osv.osv): for num in range(1, numMsgs + 1): (header, msges, octets) = pop_server.retr(num) msg = '\n'.join(msges) - res_id = email_tool.process_email(cr, user, server.object_id.model, msg, attach=server.attach, context=context) + res_id = thread_pool.process_email(cr, user, server.object_id.model, msg, attach=server.attach, context=context) if res_id and server.action_id: action_pool.run(cr, user, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id]}) |
