diff options
| author | Harry (OpenERP) <hmo@tinyerp.com> | 2011-12-14 17:59:24 +0530 |
|---|---|---|
| committer | Harry (OpenERP) <hmo@tinyerp.com> | 2011-12-14 17:59:24 +0530 |
| commit | 092f97b32b35af6a40b9d2ae70c3159da2fb235f (patch) | |
| tree | 2974d3719af9338cd0b1814da900d7e9ca8d4779 /addons/mail | |
| parent | 593f5f571bbc49673975afc405e9345ef3457b92 (diff) | |
| parent | e36dc8c5e3ca3da1474747bae5ec87fea19b23b8 (diff) | |
[MERGE] merged with trunk-development-branch
bzr revid: hmo@tinyerp.com-20111214122924-izzibrz1yz67rt7g
Diffstat (limited to 'addons/mail')
| -rw-r--r-- | addons/mail/__openerp__.py | 4 | ||||
| -rw-r--r-- | addons/mail/mail_message.py | 5 | ||||
| -rw-r--r-- | addons/mail/mail_thread.py | 8 | ||||
| -rw-r--r-- | addons/mail/mail_thread_view.xml | 21 | ||||
| -rw-r--r-- | addons/mail/security/ir.model.access.csv | 6 | ||||
| -rw-r--r-- | addons/mail/wizard/mail_compose_message.py | 2 |
6 files changed, 20 insertions, 26 deletions
diff --git a/addons/mail/__openerp__.py b/addons/mail/__openerp__.py index 1cb97ce182e..8f4833c294f 100644 --- a/addons/mail/__openerp__.py +++ b/addons/mail/__openerp__.py @@ -20,9 +20,9 @@ ############################################################################## { - 'name': 'Email Subsystem', + 'name': 'Emails Management', 'version': '1.0', - 'category': 'Hidden', + 'category': 'Hidden/Dependency', 'complexity': "easy", 'description': """ A generic email subsystem with message storage and queuing diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py index 159259f151d..fd00135816e 100644 --- a/addons/mail/mail_message.py +++ b/addons/mail/mail_message.py @@ -380,12 +380,16 @@ class mail_message(osv.osv): if 'To' in fields: msg['to'] = decode(msg_txt.get('To')) + if 'Delivered-To' in fields: msg['to'] = decode(msg_txt.get('Delivered-To')) if 'CC' in fields: msg['cc'] = decode(msg_txt.get('CC')) + if 'Cc' in fields: + msg['cc'] = decode(msg_txt.get('Cc')) + if 'Reply-To' in fields: msg['reply'] = decode(msg_txt.get('Reply-To')) @@ -455,6 +459,7 @@ class mail_message(osv.osv): msg['sub_type'] = msg['subtype'] or 'plain' return msg + def send(self, cr, uid, ids, auto_commit=False, context=None): """Sends the selected emails immediately, ignoring their current state (mails that have already been sent should not be passed diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index c8f7da9a5bb..70b536296bf 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -58,6 +58,14 @@ class mail_thread(osv.osv): 'message_ids': fields.one2many('mail.message', 'res_id', 'Messages', readonly=True), } + def message_capable_models(self, cr, uid, context=None): + ret_dict = {} + for model_name in self.pool.obj_list(): + model = self.pool.get(model_name) + if 'mail.thread' in getattr(model, '_inherit', []): + ret_dict[model_name] = model._description + return ret_dict + def message_thread_followers(self, cr, uid, ids, context=None): """Returns a list of email addresses of the people following this thread, including the sender of each mail, and the diff --git a/addons/mail/mail_thread_view.xml b/addons/mail/mail_thread_view.xml index bd10a72faf2..3a7ed8f46fe 100644 --- a/addons/mail/mail_thread_view.xml +++ b/addons/mail/mail_thread_view.xml @@ -8,29 +8,10 @@ <field name="arch" type="xml"> <form string="Email Thread"> <separator string="Communication History" colspan="4"/> - <field name="message_ids" nolabel="1" colspan="4" mode="tree,form"> + <field name="message_ids" nolabel="1" colspan="4" mode="tree"> <tree string="Communication History"> <field name="display_text"/> </tree> - <form string="Message"> - <field name="subject" widget="char"/> - <field name="date"/> - <field name="user_id"/> - <notebook colspan="4"> - <page string="Email Details"> - <group col="4" colspan="4"> - <separator string="Email Details" colspan="4"/> - <field name="email_from"/> - <field name="email_to"/> - <field name="email_cc"/> - <field name="email_bcc"/> - </group> - </page> - <page string="Attachments"> - <field name="attachment_ids" nolabel="1" colspan="4" /> - </page> - </notebook> - </form> </field> </form> </field> diff --git a/addons/mail/security/ir.model.access.csv b/addons/mail/security/ir.model.access.csv index b508cd68d83..42c70da9f19 100644 --- a/addons/mail/security/ir.model.access.csv +++ b/addons/mail/security/ir.model.access.csv @@ -1,3 +1,3 @@ -"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_mail_message","mail.message","model_mail_message",,1,0,0,0 -"access_mail_thread","mail.thread","model_mail_thread",,1,0,0,0 +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+access_mail_message,mail.message,model_mail_message,,1,0,0,0
+access_mail_thread,mail.thread,model_mail_thread,,1,0,0,0
diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index 93bf0b004d8..f5906d2b186 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -236,7 +236,7 @@ class mail_compose_message(osv.osv_memory): attachments=attachment, references=references, res_id=int(mail.res_id), subtype=mail.subtype, headers=headers, context=context) # in normal mode, we send the email immediately, as the user expects us to (delay should be sufficiently small) - mail_message.send(cr, uid, [msg_id], context) + mail_message.send(cr, uid, [msg_id], context=context) return {'type': 'ir.actions.act_window_close'} |
