summaryrefslogtreecommitdiff
path: root/addons/fetchmail/fetchmail.py
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2012-11-14 16:05:00 +0100
committerThibault Delavallée <tde@openerp.com>2012-11-14 16:05:00 +0100
commit4e2609f35fc9c7a31567312f63fd53285695f78d (patch)
tree89e26da0b4d6743505e67bca58448068f60a0f71 /addons/fetchmail/fetchmail.py
parentf0569f7133227fc07e9798e451b757205b5429e7 (diff)
parent3b31bdd2951c9a43efd8e320de5bee5f3563af82 (diff)
[MERGE] Mail: improve incoming/outgoing emails behavior
Main: - updated overall code to match the new mail openerp tools - message_route: after checking the headers to find if the incoming email is a reply in an existing discussion, it checks whether the email is a reply to a private discussion (without model, res_id), based on the message_id of the mail; it then relies on the aliases then fetchmail, as before - incoming emails and quick posting through Chatter now calls message_post_user_api (based on old message_post_api), that performs some things the composer do on its side (adding recipients of a replied message, cleaning the content) Misc: - general: updated modules according to the new tools mail functions - general: message related to a new app installation now have a comment subtype, meaning they will effectively be pushed - mail: improved set_message_read, fixed a bug with message_id - fetchmail: fixed a bug in fetchmail module about non-existing variable - portal: updated demo data bzr revid: tde@openerp.com-20121114150500-pzj8zhyt5e29aekb
Diffstat (limited to 'addons/fetchmail/fetchmail.py')
-rw-r--r--addons/fetchmail/fetchmail.py10
1 files 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