[FIX] mail: solved context in schedule_with_attach()
authorRifakat Haradwala (Open ERP) <rha@tinyerp.com>
Tue, 19 Apr 2011 10:07:22 +0000 (15:37 +0530)
committerRifakat Haradwala (Open ERP) <rha@tinyerp.com>
Tue, 19 Apr 2011 10:07:22 +0000 (15:37 +0530)
bzr revid: rha@tinyerp.com-20110419100722-cijh152wl0urg75t

addons/mail/email_message.py

index a32c29f..39d5d8f 100644 (file)
@@ -206,6 +206,8 @@ class email_message(osv.osv):
 
     def schedule_with_attach(self, cr, uid, email_from, email_to, subject, body, model=False, email_cc=None, email_bcc=None, reply_to=False, attach=None,
             message_id=False, references=False, openobject_id=False, debug=False, subtype='plain', x_headers={}, priority='3', smtp_server_id=False, context=None, auto_delete=False):
+        if context is None:
+            context = {}
         attachment_obj = self.pool.get('ir.attachment')
         if email_to and type(email_to) != list:
             email_to = [email_to]