diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 49272c97576..216a898bc88 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -748,10 +748,11 @@ class crm_lead(crm_case, osv.osv): self.write(cr, uid, [res_id], vals, context) return res_id - def message_update(self, cr, uid, ids, msg, vals={}, default_act='pending', context=None): + def message_update(self, cr, uid, ids, msg, vals=None, default_act='pending', context=None): if isinstance(ids, (str, int, long)): ids = [ids] - + if vals == None: + vals = {} super(crm_lead, self).message_update(cr, uid, ids, msg, context=context) if msg.get('priority') in dict(crm.AVAILABLE_PRIORITIES): diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index dbf0930c6bd..f81a2a8cd52 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -365,10 +365,11 @@ class hr_applicant(crm.crm_case, osv.osv): self.write(cr, uid, [res_id], vals, context) return res_id - def message_update(self, cr, uid, ids, msg, vals={}, default_act='pending', context=None): + def message_update(self, cr, uid, ids, msg, vals=None, default_act='pending', context=None): if isinstance(ids, (str, int, long)): ids = [ids] - + if vals is None: + vals = {} msg_from = msg['from'] vals.update({ 'description': msg['body_text'] 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/outlook/README b/addons/outlook/README deleted file mode 100644 index 93f735ac1f8..00000000000 --- a/addons/outlook/README +++ /dev/null @@ -1,29 +0,0 @@ -OpenERP Outlook PLUG-IN Installation Guide - -Pre requirements : -====================================================================================== - 1.Python 2.6+ . python can be downloaded from http://www.python.org/download/releases/ . - 2.Python for Windows extensions - PyWin32 this module for python must be installed for appropriate version of the Python. It can be downloaded from - http://sourceforge.net/projects/pywin32/ or - http://starship.python.net/crew/mhammond/win32/ - 3.If you are using MS Outlook 2007 than you are required to install "Microsoft Exchange Server MAPI Client and Collaboration Data Objects 1.2.1 (CDO 1.21)". It can be downloaded from - http://www.microsoft.com/downloads/en/details.aspx?FamilyID=2714320D-C997-4DE1-986F-24F081725D36&displaylang=en - and With MS Outlook2003 Install inbuilt Collaboration Data Objects(CDO) while installing Outlook. - To read more regarding Collaboration Data Objects(CDO) click following link: - + http://support.microsoft.com/kb/171440 - -How to install openerp-outlook plug-in? -====================================================================================== - 1. Save the executable plug-in file. - 2. Close Outlook Application if Running. - 3. Run executable plug-in file and the folllow the instruction. - -How to uninstall openerp-outlook plug-in? -===================================================================================== - 1. Go to Control Panel Click "Add/Remove Programmes" - 2. You will entry, you will find entry named 'OpenERP Outlook Addin 1.0' select it and click Uninstall. - -Note : Plug In has been successfully tested with MS Office 2003 and MS Offcie 2007. - -Enjoy Archiving your Outlook E-mails to OpenERP. - diff --git a/addons/outlook/__openerp__.py b/addons/outlook/__openerp__.py index beab5aca648..9d1c5a554f4 100644 --- a/addons/outlook/__openerp__.py +++ b/addons/outlook/__openerp__.py @@ -25,7 +25,7 @@ 'version' : '1.0', 'author' : 'OpenERP SA', 'website' : 'http://www.openerp.com/', - 'depends' : ['base', 'mail'], + 'depends' : ['base', 'mail','plugin'], 'category' : 'Customer Relationship Management', 'description': ''' This module provides the Outlook Plug-in. @@ -33,7 +33,7 @@ This module provides the Outlook Plug-in. Outlook plug-in allows you to select an object that you’d like to add to your email and its attachments from MS Outlook. You can select a partner, a task, a project, an analytical account, or any other object and archive selected -mail into email.messages with attachments. +mail into mail.message with attachments. ''', 'init_xml' : [], 'demo_xml' : [], diff --git a/addons/outlook/installer.py b/addons/outlook/installer.py index 061c27da5e5..602afe0845d 100644 --- a/addons/outlook/installer.py +++ b/addons/outlook/installer.py @@ -32,7 +32,7 @@ class outlook_installer(osv.osv_memory): def default_get(self, cr, uid, fields, context=None): data = super(outlook_installer, self).default_get(cr, uid, fields, context=context) data['doc_file'] = 'http://doc.openerp.com/book/2/2_6_Comms/2_6_Comms_outlook.html' - file = open(addons.get_module_resource('outlook','plugin','openerp-outlook-addin.exe'), 'r') + file = open(addons.get_module_resource('outlook','plugin','openerp-outlook-plugin_v2.0','OpenERPOutlookPluginSetup','Release','OpenERPOutlookPluginSetup.msi'), 'r') data['plugin_file'] = base64.encodestring(file.read()) return data @@ -47,21 +47,18 @@ class outlook_installer(osv.osv_memory): _defaults = { 'outlook' : True, - 'name' : 'Openerp-Outlook-Addin.exe', + 'name' : 'OpenERPOutlookPlugin.msi', 'doc_name' : 'Installation Guide to OpenERP Outlook Plug-in.doc', 'description' : """ System requirements: - 1. Python 2.6+. - 2. Python for Windows extensions (PyWin32); this module must be installed for the appropriate version of Python. - 3.1 With MS Outlook 2007, install the package Collaboration Data Objects, version 1.2.1, http://www.microsoft.com/downloads/en/details.aspx?FamilyID=2714320D-C997-4DE1-986F-24F081725D36 - 3.2 With MS Outlook 2003, install the builtin Collaboration Data Objects(CDO) while installing Outlook. + 1. MS Outlook 2005 or above. + 2. MS .Net Framework 3.5 . + Plugin installation: - 1. Save the executable plug-in file. + 1. Save the msi plug-in file. 2. Close the Outlook application if it is open. - 3. Run the executable plug-in file, and follow the given instructions. - -Please refer to the README file for dependencies (external link: openobject-addons/outlook/README). + 3. Run the executable plug-in file (OpenERPOutlookPlugin.msi). """ } outlook_installer() diff --git a/addons/outlook/outlook_installer.xml b/addons/outlook/outlook_installer.xml index 7e2b7cd6d58..4cdb0127631 100644 --- a/addons/outlook/outlook_installer.xml +++ b/addons/outlook/outlook_installer.xml @@ -14,7 +14,9 @@ Install Outlook Plug-In - This plug-in allows you to link your e-mail to OpenERP's documents. You can attach it to any existing one in OpenERP or create a new one. + This plug-in allows you to create new contact or link contact to an existing partner. +Also allows to link your e-mail to OpenERP's documents. +You can attach it to any existing one in OpenERP or create a new one.