From 7d9d3c5611a1e926730d054ffb57769bdec071bd Mon Sep 17 00:00:00 2001 From: "Yogesh (OpenERP)" Date: Fri, 4 Feb 2011 12:26:27 +0530 Subject: [IMP] replace mail_gateway to email_gateway module in dependancy of module. bzr revid: ysa@tinyerp.com-20110204065627-sfir225ag1bzwgay --- addons/project_mailgate/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/project_mailgate') diff --git a/addons/project_mailgate/__openerp__.py b/addons/project_mailgate/__openerp__.py index 6221f781fa7..065538a826a 100644 --- a/addons/project_mailgate/__openerp__.py +++ b/addons/project_mailgate/__openerp__.py @@ -26,7 +26,7 @@ "author": "OpenERP SA", "website": "http://www.openerp.com", "category": "Generic Modules/Projects & Services", - "depends": ["project", "mail_gateway"], + "depends": ["project", "email_gateway"], "description": """This module is an interface that synchronises mails with OpenERP Project Task. It allows creating tasks as soon as a new mail arrives in our configured mail server. -- cgit v1.2.3 From 0c7876ac291b720b787f97834ded983b21c30025 Mon Sep 17 00:00:00 2001 From: "Yogesh (OpenERP)" Date: Mon, 7 Feb 2011 11:21:57 +0530 Subject: [IMP] replace mailgate.message to email.message in addons module. bzr revid: ysa@tinyerp.com-20110207055157-yr9co24w84kv0yvy --- addons/project_mailgate/project_mailgate.py | 36 ++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'addons/project_mailgate') diff --git a/addons/project_mailgate/project_mailgate.py b/addons/project_mailgate/project_mailgate.py index 64bb8c2dc69..18ef28a7f00 100644 --- a/addons/project_mailgate/project_mailgate.py +++ b/addons/project_mailgate/project_mailgate.py @@ -26,9 +26,9 @@ import binascii class project_tasks(osv.osv): _name = "project.task" _inherit = ['mailgate.thread','project.task'] - + _columns={ - 'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('model','=',_name)], readonly=True), + 'message_ids': fields.one2many('email.message', 'res_id', 'Messages', domain=[('model','=',_name)], readonly=True), } def message_new(self, cr, uid, msg, context=None): # """ @@ -44,7 +44,7 @@ class project_tasks(osv.osv): msg_from = msg.get('from') priority = msg.get('priority') - data = { + data = { 'name': subject, 'description': body, 'planned_hours' : 0.0, @@ -52,8 +52,8 @@ class project_tasks(osv.osv): res = mailgate_obj.get_partner(cr, uid, msg_from) if res: data.update(res) - res = self.create(cr, uid, data) - + res = self.create(cr, uid, data) + attachments = msg.get('attachments', []) for attachment in attachments or []: data_attach = { @@ -66,19 +66,19 @@ class project_tasks(osv.osv): } self.pool.get('ir.attachment').create(cr, uid, data_attach) - return res - - def message_update(self, cr, uid, id, msg, data={}, default_act='pending'): + return res + + def message_update(self, cr, uid, id, msg, data={}, default_act='pending'): mailgate_obj = self.pool.get('email.server.tools') - msg_actions, body_data = mailgate_obj.msg_act_get(msg) + msg_actions, body_data = mailgate_obj.msg_act_get(msg) data.update({ - 'description': body_data, + 'description': body_data, }) act = 'do_'+default_act if 'state' in msg_actions: if msg_actions['state'] in ['draft','close','cancel','open','pending']: act = 'do_' + msg_actions['state'] - + for k1,k2 in [('cost','planned_hours')]: try: data[k2] = float(msg_actions[k1]) @@ -88,7 +88,7 @@ class project_tasks(osv.osv): if 'priority' in msg_actions: if msg_actions['priority'] in ('1','2','3','4','5'): data['priority'] = msg_actions['priority'] - + self.write(cr, uid, [id], data) getattr(self,act)(cr, uid, [id]) return True @@ -108,7 +108,7 @@ class project_tasks(osv.osv): def msg_send(self, cr, uid, id, *args, **argv): return True - + def _history(self, cr, uid, cases, keyword, history=False, subject=None, email=False, details=None, email_from=False, message_id=False, attach=[], context=None): mailgate_pool = self.pool.get('mailgate.thread') return mailgate_pool.history(cr, uid, cases, keyword, history=history,\ @@ -116,25 +116,25 @@ class project_tasks(osv.osv): details=details, email_from=email_from,\ message_id=message_id, attach=attach, \ context=context) - + def do_draft(self, cr, uid, ids, *args, **kwargs): res = super(project_tasks, self).do_draft(cr, uid, ids, *args, **kwargs) tasks = self.browse(cr, uid, ids) self._history(cr, uid, tasks, _('Draft')) return res - + def do_open(self, cr, uid, ids, *args, **kwargs): res = super(project_tasks, self).do_open(cr, uid, ids, *args, **kwargs) tasks = self.browse(cr, uid, ids) self._history(cr, uid, tasks, _('Open')) return res - + def do_pending(self, cr, uid, ids, *args, **kwargs): res = super(project_tasks, self).do_pending(cr, uid, ids, *args, **kwargs) tasks = self.browse(cr, uid, ids) self._history(cr, uid, tasks, _('Pending')) return res - + def do_close(self, cr, uid, ids, *args, **kwargs): res = super(project_tasks, self).do_close(cr, uid, ids, *args, **kwargs) tasks = self.browse(cr, uid, ids) @@ -142,7 +142,7 @@ class project_tasks(osv.osv): if task.state == 'done': self._history(cr, uid, tasks, _('Done')) return res - + def do_cancel(self, cr, uid, ids, *args, **kwargs): res = super(project_tasks, self).do_cancel(cr, uid, ids, *args, **kwargs) tasks = self.browse(cr, uid, ids) -- cgit v1.2.3 From 93f54b8f038f370e8325429f7f0f017ad49475b1 Mon Sep 17 00:00:00 2001 From: "Yogesh (OpenERP)" Date: Mon, 7 Feb 2011 12:59:06 +0530 Subject: [IMP] email, email_template and email_gateway related changes done in addons module.. bzr revid: ysa@tinyerp.com-20110207072906-knh218shj8ufyxu7 --- addons/project_mailgate/security/ir.model.access.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'addons/project_mailgate') diff --git a/addons/project_mailgate/security/ir.model.access.csv b/addons/project_mailgate/security/ir.model.access.csv index 1a840d89e9a..72a4763c18f 100644 --- a/addons/project_mailgate/security/ir.model.access.csv +++ b/addons/project_mailgate/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_mailgate_message_project_manager","project.mailgate.message.manager","mail_gateway.model_mailgate_message","project.group_project_manager",1,1,1,0 -"access_mailgate_message_project_user","project.mailgate.message.user","mail_gateway.model_mailgate_message","project.group_project_user",1,1,1,0 +"access_email_message_project_manager","project.mailgate.message.manager","email.model_email_message","project.group_project_manager",1,1,1,0 +"access_email_message_project_user","project.mailgate.message.user","email.model_email_message","project.group_project_user",1,1,1,0 -- cgit v1.2.3 From 05336df19f1761c67ba2aac4e192a10663846148 Mon Sep 17 00:00:00 2001 From: "Yogesh (OpenERP)" Date: Tue, 8 Feb 2011 15:10:16 +0530 Subject: [IMP] change module name email to emails. bzr revid: ysa@tinyerp.com-20110208094016-7svkud5dzdf8a2uc --- addons/project_mailgate/security/ir.model.access.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'addons/project_mailgate') diff --git a/addons/project_mailgate/security/ir.model.access.csv b/addons/project_mailgate/security/ir.model.access.csv index 72a4763c18f..b19b82e84a2 100644 --- a/addons/project_mailgate/security/ir.model.access.csv +++ b/addons/project_mailgate/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_email_message_project_manager","project.mailgate.message.manager","email.model_email_message","project.group_project_manager",1,1,1,0 -"access_email_message_project_user","project.mailgate.message.user","email.model_email_message","project.group_project_user",1,1,1,0 +"access_email_message_project_manager","project.mailgate.message.manager","emails.model_email_message","project.group_project_manager",1,1,1,0 +"access_email_message_project_user","project.mailgate.message.user","emails.model_email_message","project.group_project_user",1,1,1,0 -- cgit v1.2.3 From e1afe5828aa5bc65a61ee6143a2dabd2fa6c0e33 Mon Sep 17 00:00:00 2001 From: "Yogesh (OpenERP)" Date: Thu, 10 Mar 2011 13:09:00 +0530 Subject: [IMP] change module name emails to email and related to changes in addons all module. move email_gateway module file in email module and also related changes in related module.. bzr revid: ysa@tinyerp.com-20110310073900-ivesygpb7cdwpp43 --- addons/project_mailgate/__openerp__.py | 2 +- addons/project_mailgate/security/ir.model.access.csv | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'addons/project_mailgate') diff --git a/addons/project_mailgate/__openerp__.py b/addons/project_mailgate/__openerp__.py index 065538a826a..33bf9bb162d 100644 --- a/addons/project_mailgate/__openerp__.py +++ b/addons/project_mailgate/__openerp__.py @@ -26,7 +26,7 @@ "author": "OpenERP SA", "website": "http://www.openerp.com", "category": "Generic Modules/Projects & Services", - "depends": ["project", "email_gateway"], + "depends": ["project", "email"], "description": """This module is an interface that synchronises mails with OpenERP Project Task. It allows creating tasks as soon as a new mail arrives in our configured mail server. diff --git a/addons/project_mailgate/security/ir.model.access.csv b/addons/project_mailgate/security/ir.model.access.csv index b19b82e84a2..72a4763c18f 100644 --- a/addons/project_mailgate/security/ir.model.access.csv +++ b/addons/project_mailgate/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_email_message_project_manager","project.mailgate.message.manager","emails.model_email_message","project.group_project_manager",1,1,1,0 -"access_email_message_project_user","project.mailgate.message.user","emails.model_email_message","project.group_project_user",1,1,1,0 +"access_email_message_project_manager","project.mailgate.message.manager","email.model_email_message","project.group_project_manager",1,1,1,0 +"access_email_message_project_user","project.mailgate.message.user","email.model_email_message","project.group_project_user",1,1,1,0 -- cgit v1.2.3 From 455fb2d6b349df99449e1b8655349be8ce2869db Mon Sep 17 00:00:00 2001 From: "Rifakat Haradwala (Open ERP)" Date: Fri, 18 Mar 2011 19:14:19 +0530 Subject: [IMP] email: email cleanup bzr revid: rha@tinyerp.com-20110318134419-78qmipdipsryqgnz --- addons/project_mailgate/project_mailgate.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'addons/project_mailgate') diff --git a/addons/project_mailgate/project_mailgate.py b/addons/project_mailgate/project_mailgate.py index 18ef28a7f00..557726352ec 100644 --- a/addons/project_mailgate/project_mailgate.py +++ b/addons/project_mailgate/project_mailgate.py @@ -25,7 +25,7 @@ import binascii class project_tasks(osv.osv): _name = "project.task" - _inherit = ['mailgate.thread','project.task'] + _inherit = ['email.thread','project.task'] _columns={ 'message_ids': fields.one2many('email.message', 'res_id', 'Messages', domain=[('model','=',_name)], readonly=True), @@ -38,7 +38,7 @@ class project_tasks(osv.osv): # @param cr: the current row, from the database cursor, # @param uid: the current user’s ID for security checks # """ - mailgate_obj = self.pool.get('email.server.tools') + thread_obj = self.pool.get('email.thread') subject = msg.get('subject') body = msg.get('body') msg_from = msg.get('from') @@ -49,7 +49,7 @@ class project_tasks(osv.osv): 'description': body, 'planned_hours' : 0.0, } - res = mailgate_obj.get_partner(cr, uid, msg_from) + res = thread_obj.get_partner(cr, uid, msg_from) if res: data.update(res) res = self.create(cr, uid, data) @@ -69,8 +69,8 @@ class project_tasks(osv.osv): return res def message_update(self, cr, uid, id, msg, data={}, default_act='pending'): - mailgate_obj = self.pool.get('email.server.tools') - msg_actions, body_data = mailgate_obj.msg_act_get(msg) + thread_obj = self.pool.get('email.thread') + msg_actions, body_data = thread_obj.msg_act_get(msg) data.update({ 'description': body_data, }) @@ -93,7 +93,7 @@ class project_tasks(osv.osv): getattr(self,act)(cr, uid, [id]) return True - def message_followers(self, cr, uid, ids, context=None): + def thread_followers(self, cr, uid, ids, context=None): res = [] if isinstance(ids, (str, int, long)): select = [ids] @@ -110,7 +110,7 @@ class project_tasks(osv.osv): return True def _history(self, cr, uid, cases, keyword, history=False, subject=None, email=False, details=None, email_from=False, message_id=False, attach=[], context=None): - mailgate_pool = self.pool.get('mailgate.thread') + mailgate_pool = self.pool.get('email.thread') return mailgate_pool.history(cr, uid, cases, keyword, history=history,\ subject=subject, email=email, \ details=details, email_from=email_from,\ -- cgit v1.2.3 From 2fe7c51e361ade79eef9af67f11a96a5fc24b035 Mon Sep 17 00:00:00 2001 From: "Rifakat Haradwala (Open ERP)" Date: Mon, 21 Mar 2011 19:01:56 +0530 Subject: [REM] email.smtp_server: removed email.smtp_server and did changes in email module bzr revid: rha@tinyerp.com-20110321133156-y57yw6sekshnw9ns --- addons/project_mailgate/project_mailgate.py | 3 --- 1 file changed, 3 deletions(-) (limited to 'addons/project_mailgate') diff --git a/addons/project_mailgate/project_mailgate.py b/addons/project_mailgate/project_mailgate.py index 557726352ec..23a97af7fc5 100644 --- a/addons/project_mailgate/project_mailgate.py +++ b/addons/project_mailgate/project_mailgate.py @@ -106,9 +106,6 @@ class project_tasks(osv.osv): return len(res) and res[0] or False return res - def msg_send(self, cr, uid, id, *args, **argv): - return True - def _history(self, cr, uid, cases, keyword, history=False, subject=None, email=False, details=None, email_from=False, message_id=False, attach=[], context=None): mailgate_pool = self.pool.get('email.thread') return mailgate_pool.history(cr, uid, cases, keyword, history=history,\ -- cgit v1.2.3 From dfb7539e9866817721728a09704ebf06c2b9106e Mon Sep 17 00:00:00 2001 From: "Rifakat Haradwala (Open ERP)" Date: Thu, 31 Mar 2011 14:33:50 +0530 Subject: [IMP]: improvements bzr revid: rha@tinyerp.com-20110331090350-uud2kept28bs1xv0 --- addons/project_mailgate/project_mailgate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'addons/project_mailgate') diff --git a/addons/project_mailgate/project_mailgate.py b/addons/project_mailgate/project_mailgate.py index 23a97af7fc5..a50b15bd9e5 100644 --- a/addons/project_mailgate/project_mailgate.py +++ b/addons/project_mailgate/project_mailgate.py @@ -107,8 +107,8 @@ class project_tasks(osv.osv): return res def _history(self, cr, uid, cases, keyword, history=False, subject=None, email=False, details=None, email_from=False, message_id=False, attach=[], context=None): - mailgate_pool = self.pool.get('email.thread') - return mailgate_pool.history(cr, uid, cases, keyword, history=history,\ + thread_pool = self.pool.get('email.thread') + return thread_pool.history(cr, uid, cases, keyword, history=history,\ subject=subject, email=email, \ details=details, email_from=email_from,\ message_id=message_id, attach=attach, \ -- cgit v1.2.3 From 47a85e9f8f0fadf16d679a2f1fdbef0ef1c59440 Mon Sep 17 00:00:00 2001 From: "Rifakat Haradwala (Open ERP)" Date: Mon, 4 Apr 2011 15:15:52 +0530 Subject: [IMP] mail: rename module email to mail because of parsing error bzr revid: rha@tinyerp.com-20110404094552-j2rdq2sbeqrbffgn --- addons/project_mailgate/__openerp__.py | 2 +- addons/project_mailgate/security/ir.model.access.csv | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'addons/project_mailgate') diff --git a/addons/project_mailgate/__openerp__.py b/addons/project_mailgate/__openerp__.py index 6030293c4f8..e85285bc8f9 100644 --- a/addons/project_mailgate/__openerp__.py +++ b/addons/project_mailgate/__openerp__.py @@ -27,7 +27,7 @@ "website": "http://www.openerp.com", "category": "Project Management", "images": ["images/project_mailgate_task.jpeg"], - "depends": ["project", "email"], + "depends": ["project", "mail"], "description": """ This module is an interface that synchronises mails with OpenERP Project Task. ============================================================================== diff --git a/addons/project_mailgate/security/ir.model.access.csv b/addons/project_mailgate/security/ir.model.access.csv index 72a4763c18f..de32de28875 100644 --- a/addons/project_mailgate/security/ir.model.access.csv +++ b/addons/project_mailgate/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_email_message_project_manager","project.mailgate.message.manager","email.model_email_message","project.group_project_manager",1,1,1,0 -"access_email_message_project_user","project.mailgate.message.user","email.model_email_message","project.group_project_user",1,1,1,0 +"id";"name";"model_id:id";"group_id:id";"perm_read";"perm_write";"perm_create";"perm_unlink" +"access_email_message_project_manager";"project.email.message.manager";"mail.model_email_message";"project.group_project_manager";1;1;1;0 +"access_email_message_project_user";"project.email.message.user";"mail.model_email_message";"project.group_project_user";1;1;1;0 -- cgit v1.2.3 From 63de8740bceb5f73471c9e1c1cb0f76400d8f7cd Mon Sep 17 00:00:00 2001 From: "Rifakat Haradwala (Open ERP)" Date: Tue, 5 Apr 2011 11:47:13 +0530 Subject: [FIX] csv file semicolon error bzr revid: rha@tinyerp.com-20110405061713-b9qmkeqqg64er6lf --- addons/project_mailgate/security/ir.model.access.csv | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'addons/project_mailgate') diff --git a/addons/project_mailgate/security/ir.model.access.csv b/addons/project_mailgate/security/ir.model.access.csv index de32de28875..ddbbb436cf4 100644 --- a/addons/project_mailgate/security/ir.model.access.csv +++ b/addons/project_mailgate/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_email_message_project_manager";"project.email.message.manager";"mail.model_email_message";"project.group_project_manager";1;1;1;0 -"access_email_message_project_user";"project.email.message.user";"mail.model_email_message";"project.group_project_user";1;1;1;0 +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +"access_email_message_project_manager","project.email.message.manager","mail.model_email_message","project.group_project_manager",1,1,1,0 +"access_email_message_project_user","project.email.message.user","mail.model_email_message","project.group_project_user",1,1,1,0 -- cgit v1.2.3 From 4fe15ff183e883ad6f8f8dfe83213f3f34bfc67b Mon Sep 17 00:00:00 2001 From: "Rifakat Haradwala (Open ERP)" Date: Wed, 6 Apr 2011 16:46:47 +0530 Subject: [FIX] crm, crm_claim, crm_helpdesk, hr_recruitent, project_issue, project_mailgate: fix double attachment creation error as removing attachment from message_new() bzr revid: rha@tinyerp.com-20110406111647-8xcyc2ershxj6q1a --- addons/project_mailgate/project_mailgate.py | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'addons/project_mailgate') diff --git a/addons/project_mailgate/project_mailgate.py b/addons/project_mailgate/project_mailgate.py index a50b15bd9e5..29c813b5d8a 100644 --- a/addons/project_mailgate/project_mailgate.py +++ b/addons/project_mailgate/project_mailgate.py @@ -52,21 +52,7 @@ class project_tasks(osv.osv): res = thread_obj.get_partner(cr, uid, msg_from) if res: data.update(res) - res = self.create(cr, uid, data) - - attachments = msg.get('attachments', []) - for attachment in attachments or []: - data_attach = { - 'name': attachment, - 'datas':binascii.b2a_base64(str(attachments.get(attachment))), - 'datas_fname': attachment, - 'description': 'Mail attachment', - 'res_model': self._name, - 'res_id': res, - } - self.pool.get('ir.attachment').create(cr, uid, data_attach) - - return res + return self.create(cr, uid, data) def message_update(self, cr, uid, id, msg, data={}, default_act='pending'): thread_obj = self.pool.get('email.thread') -- cgit v1.2.3 From 7ed0659f6e25f387f041f4d6f91cfb76459462cf Mon Sep 17 00:00:00 2001 From: "Rifakat Haradwala (Open ERP)" Date: Wed, 20 Apr 2011 11:36:05 +0530 Subject: [IMP] mail: improvement for message_new() and related modules bzr revid: rha@tinyerp.com-20110420060605-7q1z5917g1b7wapw --- addons/project_mailgate/project_mailgate.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'addons/project_mailgate') diff --git a/addons/project_mailgate/project_mailgate.py b/addons/project_mailgate/project_mailgate.py index 29c813b5d8a..212fe161094 100644 --- a/addons/project_mailgate/project_mailgate.py +++ b/addons/project_mailgate/project_mailgate.py @@ -52,7 +52,22 @@ class project_tasks(osv.osv): res = thread_obj.get_partner(cr, uid, msg_from) if res: data.update(res) - return self.create(cr, uid, data) + res_id = self.create(cr, uid, vals, context) + + attachments = msg.get('attachments', []) + self.history(cr, uid, [res_id], _('receive'), history=True, + subject = msg.get('subject'), + email = msg.get('to'), + details = msg.get('body'), + email_from = msg.get('from'), + email_cc = msg.get('cc'), + message_id = msg.get('message-id'), + references = msg.get('references', False) or msg.get('in-reply-to', False), + attach = attachments, + email_date = msg.get('date'), + context = context) + + return res_id def message_update(self, cr, uid, id, msg, data={}, default_act='pending'): thread_obj = self.pool.get('email.thread') -- cgit v1.2.3 From 280e446ceffeae725249a2687db203e9f97d8abe Mon Sep 17 00:00:00 2001 From: "Rifakat Haradwala (Open ERP)" Date: Wed, 20 Apr 2011 11:56:46 +0530 Subject: [FIX]: attachment type as dictionary bzr revid: rha@tinyerp.com-20110420062646-ngijwvt2395cihuw --- addons/project_mailgate/project_mailgate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/project_mailgate') diff --git a/addons/project_mailgate/project_mailgate.py b/addons/project_mailgate/project_mailgate.py index 212fe161094..7610f35d648 100644 --- a/addons/project_mailgate/project_mailgate.py +++ b/addons/project_mailgate/project_mailgate.py @@ -54,7 +54,7 @@ class project_tasks(osv.osv): data.update(res) res_id = self.create(cr, uid, vals, context) - attachments = msg.get('attachments', []) + attachments = msg.get('attachments', {}) self.history(cr, uid, [res_id], _('receive'), history=True, subject = msg.get('subject'), email = msg.get('to'), -- cgit v1.2.3 From 190148f759d9134a2ecae103342cdba19cec5dec Mon Sep 17 00:00:00 2001 From: "Rifakat Haradwala (Open ERP)" Date: Wed, 20 Apr 2011 13:41:41 +0530 Subject: [FIX]: changes in message_update() bzr revid: rha@tinyerp.com-20110420081141-4w1wi70e290m2a69 --- addons/project_mailgate/project_mailgate.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'addons/project_mailgate') diff --git a/addons/project_mailgate/project_mailgate.py b/addons/project_mailgate/project_mailgate.py index 7610f35d648..dc0f04aeddf 100644 --- a/addons/project_mailgate/project_mailgate.py +++ b/addons/project_mailgate/project_mailgate.py @@ -69,7 +69,7 @@ class project_tasks(osv.osv): return res_id - def message_update(self, cr, uid, id, msg, data={}, default_act='pending'): + def message_update(self, cr, uid, ids, msg, data={}, default_act='pending'): thread_obj = self.pool.get('email.thread') msg_actions, body_data = thread_obj.msg_act_get(msg) data.update({ @@ -90,8 +90,21 @@ class project_tasks(osv.osv): if msg_actions['priority'] in ('1','2','3','4','5'): data['priority'] = msg_actions['priority'] - self.write(cr, uid, [id], data) - getattr(self,act)(cr, uid, [id]) + self.write(cr, uid, ids, data) + getattr(self,act)(cr, uid, ids) + + attachments = msg.get('attachments', {}) + self.history(cr, uid, ids, _('receive'), history=True, + subject = msg.get('subject'), + email = msg.get('to'), + details = msg.get('body'), + email_from = msg.get('from'), + email_cc = msg.get('cc'), + message_id = msg.get('message-id'), + references = msg.get('references', False) or msg.get('in-reply-to', False), + attach = attachments, + email_date = msg.get('date'), + context = context) return True def thread_followers(self, cr, uid, ids, context=None): -- cgit v1.2.3 From 4b2f93cb343874fb828a62694a09a858f7cc45c0 Mon Sep 17 00:00:00 2001 From: "Rifakat Haradwala (Open ERP)" Date: Thu, 21 Apr 2011 14:49:15 +0530 Subject: [FIX]: removed method _history() and called history() instead bzr revid: rha@tinyerp.com-20110421091915-fw1sr549av69mm4b --- addons/project_mailgate/project_mailgate.py | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'addons/project_mailgate') diff --git a/addons/project_mailgate/project_mailgate.py b/addons/project_mailgate/project_mailgate.py index dc0f04aeddf..cea05b3fa44 100644 --- a/addons/project_mailgate/project_mailgate.py +++ b/addons/project_mailgate/project_mailgate.py @@ -120,30 +120,22 @@ class project_tasks(osv.osv): return len(res) and res[0] or False return res - def _history(self, cr, uid, cases, keyword, history=False, subject=None, email=False, details=None, email_from=False, message_id=False, attach=[], context=None): - thread_pool = self.pool.get('email.thread') - return thread_pool.history(cr, uid, cases, keyword, history=history,\ - subject=subject, email=email, \ - details=details, email_from=email_from,\ - message_id=message_id, attach=attach, \ - context=context) - def do_draft(self, cr, uid, ids, *args, **kwargs): res = super(project_tasks, self).do_draft(cr, uid, ids, *args, **kwargs) tasks = self.browse(cr, uid, ids) - self._history(cr, uid, tasks, _('Draft')) + self.history(cr, uid, tasks, _('Draft')) return res def do_open(self, cr, uid, ids, *args, **kwargs): res = super(project_tasks, self).do_open(cr, uid, ids, *args, **kwargs) tasks = self.browse(cr, uid, ids) - self._history(cr, uid, tasks, _('Open')) + self.history(cr, uid, tasks, _('Open')) return res def do_pending(self, cr, uid, ids, *args, **kwargs): res = super(project_tasks, self).do_pending(cr, uid, ids, *args, **kwargs) tasks = self.browse(cr, uid, ids) - self._history(cr, uid, tasks, _('Pending')) + self.history(cr, uid, tasks, _('Pending')) return res def do_close(self, cr, uid, ids, *args, **kwargs): @@ -151,13 +143,13 @@ class project_tasks(osv.osv): tasks = self.browse(cr, uid, ids) for task in tasks: if task.state == 'done': - self._history(cr, uid, tasks, _('Done')) + self.history(cr, uid, tasks, _('Done')) return res def do_cancel(self, cr, uid, ids, *args, **kwargs): res = super(project_tasks, self).do_cancel(cr, uid, ids, *args, **kwargs) tasks = self.browse(cr, uid, ids) - self._history(cr, uid, tasks, _('Cancel')) + self.history(cr, uid, tasks, _('Cancel')) return res project_tasks() -- cgit v1.2.3 From 96a33521da4a5a01440a31b95ec34aba3394999b Mon Sep 17 00:00:00 2001 From: "Rifakat Haradwala (Open ERP)" Date: Mon, 2 May 2011 12:28:49 +0530 Subject: [IMP] crm,crm_claim,crm_helpdesk,hr_recruitment,project_issue,project_mailgate: improvement in message_new() bzr revid: rha@tinyerp.com-20110502065849-19nilmvniw28n8ts --- addons/project_mailgate/project_mailgate.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'addons/project_mailgate') diff --git a/addons/project_mailgate/project_mailgate.py b/addons/project_mailgate/project_mailgate.py index cea05b3fa44..c4698540053 100644 --- a/addons/project_mailgate/project_mailgate.py +++ b/addons/project_mailgate/project_mailgate.py @@ -65,6 +65,10 @@ class project_tasks(osv.osv): references = msg.get('references', False) or msg.get('in-reply-to', False), attach = attachments, email_date = msg.get('date'), + body_html= msg.get('body_html'), + sub_type = msg.get('sub_type'), + headers = msg.get('headers'), + priority = msg.get('priority', False), context = context) return res_id -- cgit v1.2.3 From 3a904e407b6b1a7122bac98470e3b9330926ffab Mon Sep 17 00:00:00 2001 From: "Rifakat Haradwala (Open ERP)" Date: Tue, 3 May 2011 12:08:44 +0530 Subject: [IMP] mail: able to retrive priority of an email message and related changes in message_new() and message_update() bzr revid: rha@tinyerp.com-20110503063844-yhlhlnpvciveh219 --- addons/project_mailgate/project_mailgate.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'addons/project_mailgate') diff --git a/addons/project_mailgate/project_mailgate.py b/addons/project_mailgate/project_mailgate.py index c4698540053..a7768fc862d 100644 --- a/addons/project_mailgate/project_mailgate.py +++ b/addons/project_mailgate/project_mailgate.py @@ -68,7 +68,7 @@ class project_tasks(osv.osv): body_html= msg.get('body_html'), sub_type = msg.get('sub_type'), headers = msg.get('headers'), - priority = msg.get('priority', False), + priority = msg.get('priority'), context = context) return res_id @@ -108,6 +108,10 @@ class project_tasks(osv.osv): references = msg.get('references', False) or msg.get('in-reply-to', False), attach = attachments, email_date = msg.get('date'), + body_html= msg.get('body_html'), + sub_type = msg.get('sub_type'), + headers = msg.get('headers'), + priority = msg.get('priority'), context = context) return True -- cgit v1.2.3 From 8f9f45ea948d1ffecb79601e860d522fc6686c2d Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Mon, 22 Aug 2011 19:16:59 +0200 Subject: [IMP] all: next pass of review/renaming for new mail API bzr revid: odo@openerp.com-20110822171659-zxho36a6n628i10q --- addons/project_mailgate/project_mailgate.py | 66 ++++------------------- addons/project_mailgate/project_mailgate_view.xml | 9 ++-- 2 files changed, 13 insertions(+), 62 deletions(-) (limited to 'addons/project_mailgate') diff --git a/addons/project_mailgate/project_mailgate.py b/addons/project_mailgate/project_mailgate.py index 808eede3b3c..7e794c7f75b 100644 --- a/addons/project_mailgate/project_mailgate.py +++ b/addons/project_mailgate/project_mailgate.py @@ -33,20 +33,11 @@ class project_tasks(osv.osv): 'message_ids': fields.one2many('mail.message', 'res_id', 'Messages', domain=[('model','=',_name)], readonly=True), } - def message_new(self, cr, uid, msg, context=None): -# """ -# Automatically calls when new email message arrives -# -# @param self: The object pointer -# @param cr: the current row, from the database cursor, -# @param uid: the current user’s ID for security checks -# """ - thread_obj = self.pool.get('email.thread') + def message_new(self, cr, uid, msg, custom_values=None, context=None): + thread_obj = self.pool.get('mail.thread') subject = msg.get('subject') - body = msg.get('body') + body = msg.get('body_text') msg_from = msg.get('from') - #TODO map email priority with openerp task priority - priority = msg.get('priority') data = { 'name': subject, @@ -56,34 +47,11 @@ class project_tasks(osv.osv): res = thread_obj.get_partner(cr, uid, msg_from) if res: data.update(res) - res_id = self.create(cr, uid, data, context) - attachments = msg.get('attachments', {}) - for attachment in attachments: - data_attach = { - 'name': attachment, - 'datas': binascii.b2a_base64(str(attachments.get(attachment))), - 'datas_fname': attachment, - 'description': 'Mail attachment', - 'res_model': self._name, - 'res_id': res, - } - self.pool.get('ir.attachment').create(cr, uid, data_attach, context) - self.history(cr, uid, [res_id], _('receive'), history=True, - subject = msg.get('subject'), - email = msg.get('to'), - details = msg.get('body'), - email_from = msg.get('from'), - email_cc = msg.get('cc'), - message_id = msg.get('message-id'), - references = msg.get('references', False) or msg.get('in-reply-to', False), - attach = attachments, - email_date = msg.get('date'), - body_html= msg.get('body_html'), - sub_type = msg.get('sub_type'), - headers = msg.get('headers'), - priority = msg.get('priority'), - context = context) + if custom_values and isinstance(custom_values, dict): + data.update(custom_values) + res_id = self.create(cr, uid, data, context) + self.append_mail(cr, uid, [res_id], msg, context=context) return res_id def message_update(self, cr, uid, ids, msg, data={}, default_act='pending'): @@ -95,7 +63,7 @@ class project_tasks(osv.osv): maps = { 'cost':'planned_hours', } - for line in msg['body'].split('\n'): + for line in msg['body_text'].split('\n'): line = line.strip() res = tools.misc.command_re.match(line) if res: @@ -112,23 +80,7 @@ class project_tasks(osv.osv): self.write(cr, uid, ids, data, context=context) getattr(self,act)(cr, uid, ids, context=context) - - attachments = msg.get('attachments', {}) - self.history(cr, uid, ids, _('receive'), history=True, - subject = msg.get('subject'), - email = msg.get('to'), - details = msg.get('body'), - email_from = msg.get('from'), - email_cc = msg.get('cc'), - message_id = msg.get('message-id'), - references = msg.get('references', False) or msg.get('in-reply-to', False), - attach = attachments, - email_date = msg.get('date'), - body_html= msg.get('body_html'), - sub_type = msg.get('sub_type'), - headers = msg.get('headers'), - priority = msg.get('priority'), - context = context) + self.append_mail(cr, uid, [res_id], msg, context=context) return True def thread_followers(self, cr, uid, ids, context=None): diff --git a/addons/project_mailgate/project_mailgate_view.xml b/addons/project_mailgate/project_mailgate_view.xml index 8c8816ebbd5..f2c8c7006e3 100644 --- a/addons/project_mailgate/project_mailgate_view.xml +++ b/addons/project_mailgate/project_mailgate_view.xml @@ -19,15 +19,14 @@ - - + - - + + - + -- cgit v1.2.3 From b0bed63351956455a23cdc960292e104af53f67a Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Tue, 23 Aug 2011 19:58:09 +0200 Subject: [IMP] mail.thread: renaming methods to avoid collisions with objects that use the mixin bzr revid: odo@openerp.com-20110823175809-hw81fkptg90702vh --- addons/project_mailgate/project_mailgate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/project_mailgate') diff --git a/addons/project_mailgate/project_mailgate.py b/addons/project_mailgate/project_mailgate.py index 7e794c7f75b..da82a22f17a 100644 --- a/addons/project_mailgate/project_mailgate.py +++ b/addons/project_mailgate/project_mailgate.py @@ -83,7 +83,7 @@ class project_tasks(osv.osv): self.append_mail(cr, uid, [res_id], msg, context=context) return True - def thread_followers(self, cr, uid, ids, context=None): + def message_thread_followers(self, cr, uid, ids, context=None): res = [] if isinstance(ids, (str, int, long)): select = [ids] -- cgit v1.2.3 From 2f543db06e952991577ca659f6b9b4dfc57cf828 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 25 Aug 2011 14:27:57 +0200 Subject: [IMP] mail: cleanup/rename API + adapt dependencies (wip) bzr revid: odo@openerp.com-20110825122757-0mqr0gbol25t0n41 --- addons/project_mailgate/project_mailgate.py | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) (limited to 'addons/project_mailgate') diff --git a/addons/project_mailgate/project_mailgate.py b/addons/project_mailgate/project_mailgate.py index da82a22f17a..9ebd12ec206 100644 --- a/addons/project_mailgate/project_mailgate.py +++ b/addons/project_mailgate/project_mailgate.py @@ -34,24 +34,17 @@ class project_tasks(osv.osv): } def message_new(self, cr, uid, msg, custom_values=None, context=None): - thread_obj = self.pool.get('mail.thread') + res_id = super(project_tasks,self).message_new(cr, uid, msg, custom_values=custom_values, context=context) subject = msg.get('subject') body = msg.get('body_text') msg_from = msg.get('from') - data = { 'name': subject, 'description': body, 'planned_hours': 0.0, } - res = thread_obj.get_partner(cr, uid, msg_from) - if res: - data.update(res) - - if custom_values and isinstance(custom_values, dict): - data.update(custom_values) - res_id = self.create(cr, uid, data, context) - self.append_mail(cr, uid, [res_id], msg, context=context) + data.update(self.message_partner_by_email(cr, uid, msg_from)) + self.write(cr, uid, [res_id], data, context) return res_id def message_update(self, cr, uid, ids, msg, data={}, default_act='pending'): @@ -80,7 +73,7 @@ class project_tasks(osv.osv): self.write(cr, uid, ids, data, context=context) getattr(self,act)(cr, uid, ids, context=context) - self.append_mail(cr, uid, [res_id], msg, context=context) + self.message_append_dict(cr, uid, [res_id], msg, context=context) return True def message_thread_followers(self, cr, uid, ids, context=None): @@ -102,19 +95,19 @@ class project_tasks(osv.osv): def do_draft(self, cr, uid, ids, context=None): res = super(project_tasks, self).do_draft(cr, uid, ids, context) tasks = self.browse(cr, uid, ids, context=context) - self.history(cr, uid, tasks, _('Draft'), context=context) + self.message_append(cr, uid, tasks, _('Draft'), context=context) return res def do_open(self, cr, uid, ids, context=None): res = super(project_tasks, self).do_open(cr, uid, ids, context) tasks = self.browse(cr, uid, ids, context=context) - self.history(cr, uid, tasks, _('Open'), context=context) + self.message_append(cr, uid, tasks, _('Open'), context=context) return res def do_pending(self, cr, uid, ids, context=None): res = super(project_tasks, self).do_pending(cr, uid, ids, context) tasks = self.browse(cr, uid, ids, context=context) - self.history(cr, uid, tasks, _('Pending'), context=context) + self.message_append(cr, uid, tasks, _('Pending'), context=context) return res def do_close(self, cr, uid, ids, context=None): @@ -122,13 +115,13 @@ class project_tasks(osv.osv): tasks = self.browse(cr, uid, ids, context=context) for task in tasks: if task.state == 'done': - self.history(cr, uid, tasks, _('Done'), context=context) + self.message_append(cr, uid, tasks, _('Done'), context=context) return res def do_cancel(self, cr, uid, ids, context=None): res = super(project_tasks, self).do_cancel(cr, uid, ids, context=context) tasks = self.browse(cr, uid, ids, context=context) - self.history(cr, uid, tasks, _('Cancel'), context=context) + self.message_append(cr, uid, tasks, _('Cancel'), context=context) return res project_tasks() -- cgit v1.2.3 From 752df5acbdc1507ba7ff942fc5851fd86383e445 Mon Sep 17 00:00:00 2001 From: Launchpad Translations on behalf of openerp <> Date: Tue, 6 Sep 2011 04:40:18 +0000 Subject: Launchpad automatic translations update. bzr revid: launchpad_translations_on_behalf_of_openerp-20110905055933-cld0r3vv3jmiu5bx bzr revid: launchpad_translations_on_behalf_of_openerp-20110906044018-ajk9u7zfqoiatufs --- addons/project_mailgate/i18n/ca.po | 38 +++++++++++++++++++++-------------- addons/project_mailgate/i18n/de.po | 22 ++------------------ addons/project_mailgate/i18n/es.po | 22 ++------------------ addons/project_mailgate/i18n/fi.po | 4 ++-- addons/project_mailgate/i18n/fr.po | 6 +++--- addons/project_mailgate/i18n/gl.po | 4 ++-- addons/project_mailgate/i18n/hu.po | 7 ++++--- addons/project_mailgate/i18n/it.po | 8 ++++---- addons/project_mailgate/i18n/lv.po | 4 ++-- addons/project_mailgate/i18n/mn.po | 4 ++-- addons/project_mailgate/i18n/nl.po | 4 ++-- addons/project_mailgate/i18n/pl.po | 22 ++------------------ addons/project_mailgate/i18n/pt.po | 4 ++-- addons/project_mailgate/i18n/pt_BR.po | 22 ++------------------ addons/project_mailgate/i18n/zh_CN.po | 8 ++++---- 15 files changed, 58 insertions(+), 121 deletions(-) (limited to 'addons/project_mailgate') diff --git a/addons/project_mailgate/i18n/ca.po b/addons/project_mailgate/i18n/ca.po index cadabcba219..2d3b46c1dd2 100644 --- a/addons/project_mailgate/i18n/ca.po +++ b/addons/project_mailgate/i18n/ca.po @@ -14,18 +14,18 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-04-29 05:53+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" #. module: project_mailgate #: view:project.task:0 msgid "History Information" -msgstr "" +msgstr "Informació històrica" #. module: project_mailgate #: model:ir.model,name:project_mailgate.model_project_task msgid "Task" -msgstr "" +msgstr "Tasca" #. module: project_mailgate #: model:ir.module.module,description:project_mailgate.module_meta_information @@ -38,63 +38,71 @@ msgid "" "Moreover, it keeps track of all further communications and task states.\n" " " msgstr "" +"Aquest mòdul proporciona una interfície per sincronitzar correus amb les " +"tasques de projectes d'OpenERP.\n" +"\n" +"Permet crear tasques tan aviat com arriba un nou correu en el nostre " +"servidor de correu prèviament configurat.\n" +"A més realitza un seguiment de totes les comunicacions addicionals i estats " +"de la tasca.\n" +" " #. module: project_mailgate #: view:project.task:0 msgid "Attachments" -msgstr "" +msgstr "Adjunts" #. module: project_mailgate #: model:ir.module.module,shortdesc:project_mailgate.module_meta_information msgid "Project MailGateWay" -msgstr "" +msgstr "Ruta d'enllaç del projecte" #. module: project_mailgate #: constraint:project.task:0 msgid "Error ! You cannot create recursive tasks." -msgstr "" +msgstr "Error! No podeu crear tasques recursives." #. module: project_mailgate #: field:project.task,message_ids:0 msgid "Messages" -msgstr "" +msgstr "Missatges" #. module: project_mailgate #: code:addons/project_mailgate/project_mailgate.py:123 #, python-format msgid "Draft" -msgstr "" +msgstr "Esborrany" #. module: project_mailgate #: view:project.task:0 msgid "Details" -msgstr "" +msgstr "Detalls" #. module: project_mailgate #: code:addons/project_mailgate/project_mailgate.py:149 #, python-format msgid "Cancel" -msgstr "" +msgstr "Canceŀla" #. module: project_mailgate #: code:addons/project_mailgate/project_mailgate.py:143 #, python-format msgid "Done" -msgstr "" +msgstr "Realitzat" #. module: project_mailgate #: code:addons/project_mailgate/project_mailgate.py:129 #, python-format msgid "Open" -msgstr "" +msgstr "Obre" #. module: project_mailgate #: code:addons/project_mailgate/project_mailgate.py:135 #, python-format msgid "Pending" -msgstr "" +msgstr "Pendent" #. module: project_mailgate #: view:project.task:0 msgid "History" -msgstr "" +msgstr "Històric" diff --git a/addons/project_mailgate/i18n/de.po b/addons/project_mailgate/i18n/de.po index fe8300d9b3c..a7b608c68e0 100644 --- a/addons/project_mailgate/i18n/de.po +++ b/addons/project_mailgate/i18n/de.po @@ -15,8 +15,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-04-29 05:53+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" #. module: project_mailgate #: view:project.task:0 @@ -107,21 +107,3 @@ msgstr "Im Wartezustand" #: view:project.task:0 msgid "History" msgstr "Historie" - -#~ msgid "Invalid XML for View Architecture!" -#~ msgstr "Fehlerhafter XML Quellcode für diese Ansicht!" - -#~ msgid "" -#~ "The Object name must start with x_ and not contain any special character !" -#~ msgstr "" -#~ "Das Objekt muss mit einem x_ beginnen und darf keine Sonderzeichen " -#~ "beinhalten !" - -#~ msgid "The certificate ID of the module must be unique !" -#~ msgstr "Die Zertifikat ID des Moduls sollte eindeutig sein !" - -#~ msgid "The name of the module must be unique !" -#~ msgstr "Die Modulbezeichnung sollte eindeutig sein !" - -#~ msgid "Size of the field can never be less than 1 !" -#~ msgstr "Die Größe des Feldes sollte niemals kleiner als 1 sein !" diff --git a/addons/project_mailgate/i18n/es.po b/addons/project_mailgate/i18n/es.po index 57b135eca8a..2736d2572ac 100644 --- a/addons/project_mailgate/i18n/es.po +++ b/addons/project_mailgate/i18n/es.po @@ -15,8 +15,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-04-29 05:53+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" #. module: project_mailgate #: view:project.task:0 @@ -106,21 +106,3 @@ msgstr "Pendiente" #: view:project.task:0 msgid "History" msgstr "Historial" - -#~ msgid "Invalid XML for View Architecture!" -#~ msgstr "¡XML no válido para la definición de la vista!" - -#~ msgid "" -#~ "The Object name must start with x_ and not contain any special character !" -#~ msgstr "" -#~ "¡El nombre del objeto debe empezar con x_ y no contener ningún carácter " -#~ "especial!" - -#~ msgid "The name of the module must be unique !" -#~ msgstr "¡El nombre del módulo debe ser único!" - -#~ msgid "Size of the field can never be less than 1 !" -#~ msgstr "¡El tamaño del campo nunca puede ser menor que 1!" - -#~ msgid "The certificate ID of the module must be unique !" -#~ msgstr "¡El Id del certificado debe ser único!" diff --git a/addons/project_mailgate/i18n/fi.po b/addons/project_mailgate/i18n/fi.po index d7b563f2f4b..561c0b59ba2 100644 --- a/addons/project_mailgate/i18n/fi.po +++ b/addons/project_mailgate/i18n/fi.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-06-23 04:56+0000\n" -"X-Generator: Launchpad (build 13168)\n" +"X-Launchpad-Export-Date: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" #. module: project_mailgate #: view:project.task:0 diff --git a/addons/project_mailgate/i18n/fr.po b/addons/project_mailgate/i18n/fr.po index 14c86daa48d..a605e0eeefb 100644 --- a/addons/project_mailgate/i18n/fr.po +++ b/addons/project_mailgate/i18n/fr.po @@ -9,13 +9,13 @@ msgstr "" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2011-01-11 11:15+0000\n" "PO-Revision-Date: 2011-01-13 23:14+0000\n" -"Last-Translator: lolivier \n" +"Last-Translator: lholivier \n" "Language-Team: French \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-04-29 05:53+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" #. module: project_mailgate #: view:project.task:0 diff --git a/addons/project_mailgate/i18n/gl.po b/addons/project_mailgate/i18n/gl.po index 4bd35afef01..8bc191d773b 100644 --- a/addons/project_mailgate/i18n/gl.po +++ b/addons/project_mailgate/i18n/gl.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-05-11 04:37+0000\n" -"X-Generator: Launchpad (build 12959)\n" +"X-Launchpad-Export-Date: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" #. module: project_mailgate #: view:project.task:0 diff --git a/addons/project_mailgate/i18n/hu.po b/addons/project_mailgate/i18n/hu.po index 625748c2058..952980a1a0a 100644 --- a/addons/project_mailgate/i18n/hu.po +++ b/addons/project_mailgate/i18n/hu.po @@ -8,13 +8,14 @@ msgstr "" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2011-01-11 11:15+0000\n" "PO-Revision-Date: 2011-01-25 13:21+0000\n" -"Last-Translator: NOVOTRADE RENDSZERHÁZ \n" +"Last-Translator: NOVOTRADE RENDSZERHÁZ ( novotrade.hu ) " +"\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-04-29 05:53+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" #. module: project_mailgate #: view:project.task:0 diff --git a/addons/project_mailgate/i18n/it.po b/addons/project_mailgate/i18n/it.po index 2ba0a646ec1..1a31e35d231 100644 --- a/addons/project_mailgate/i18n/it.po +++ b/addons/project_mailgate/i18n/it.po @@ -9,13 +9,13 @@ msgstr "" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2011-01-11 11:15+0000\n" "PO-Revision-Date: 2011-04-22 09:54+0000\n" -"Last-Translator: simone.sandri \n" +"Last-Translator: simone.sandri \n" "Language-Team: Italian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-04-29 05:53+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" #. module: project_mailgate #: view:project.task:0 @@ -54,7 +54,7 @@ msgstr "Allegati" #. module: project_mailgate #: model:ir.module.module,shortdesc:project_mailgate.module_meta_information msgid "Project MailGateWay" -msgstr "" +msgstr "Ingresso Mail di Progetto" #. module: project_mailgate #: constraint:project.task:0 diff --git a/addons/project_mailgate/i18n/lv.po b/addons/project_mailgate/i18n/lv.po index cbed24c309a..c5ae6c07e25 100644 --- a/addons/project_mailgate/i18n/lv.po +++ b/addons/project_mailgate/i18n/lv.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-04-29 05:53+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" #. module: project_mailgate #: view:project.task:0 diff --git a/addons/project_mailgate/i18n/mn.po b/addons/project_mailgate/i18n/mn.po index 19024e2e7b0..fc0991b0c06 100644 --- a/addons/project_mailgate/i18n/mn.po +++ b/addons/project_mailgate/i18n/mn.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-04-29 05:53+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" #. module: project_mailgate #: view:project.task:0 diff --git a/addons/project_mailgate/i18n/nl.po b/addons/project_mailgate/i18n/nl.po index ebff27f3d0b..67c79d1ab41 100644 --- a/addons/project_mailgate/i18n/nl.po +++ b/addons/project_mailgate/i18n/nl.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-04-29 05:53+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" #. module: project_mailgate #: view:project.task:0 diff --git a/addons/project_mailgate/i18n/pl.po b/addons/project_mailgate/i18n/pl.po index 7be83590838..f5c1d8c6a04 100644 --- a/addons/project_mailgate/i18n/pl.po +++ b/addons/project_mailgate/i18n/pl.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-04-29 05:53+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" #. module: project_mailgate #: view:project.task:0 @@ -106,21 +106,3 @@ msgstr "Oczekujące" #: view:project.task:0 msgid "History" msgstr "Historia" - -#~ msgid "Invalid XML for View Architecture!" -#~ msgstr "Niewłaściwy XML dla architektury widoku!" - -#~ msgid "" -#~ "The Object name must start with x_ and not contain any special character !" -#~ msgstr "" -#~ "Nazwa obiektu musi zaczynać się od x_ oraz nie może zawierać znaków " -#~ "specjalnych !" - -#~ msgid "The name of the module must be unique !" -#~ msgstr "Nazwa modułu musi być unikalna !" - -#~ msgid "Size of the field can never be less than 1 !" -#~ msgstr "Rozmiar pola nie może być mniejszy od 1 !" - -#~ msgid "The certificate ID of the module must be unique !" -#~ msgstr "ID certyfikatu modułu musi być unikalne !" diff --git a/addons/project_mailgate/i18n/pt.po b/addons/project_mailgate/i18n/pt.po index 5581d7cc82f..442ec94ab0f 100644 --- a/addons/project_mailgate/i18n/pt.po +++ b/addons/project_mailgate/i18n/pt.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-04-29 05:53+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" #. module: project_mailgate #: view:project.task:0 diff --git a/addons/project_mailgate/i18n/pt_BR.po b/addons/project_mailgate/i18n/pt_BR.po index e27f6b7a1d9..4bb0735a0a9 100644 --- a/addons/project_mailgate/i18n/pt_BR.po +++ b/addons/project_mailgate/i18n/pt_BR.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-04-29 05:53+0000\n" -"X-Generator: Launchpad (build 12758)\n" +"X-Launchpad-Export-Date: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" #. module: project_mailgate #: view:project.task:0 @@ -106,21 +106,3 @@ msgstr "Pendente" #: view:project.task:0 msgid "History" msgstr "Histórico" - -#~ msgid "Invalid XML for View Architecture!" -#~ msgstr "XML inválido para Arquitetura da View" - -#~ msgid "" -#~ "The Object name must start with x_ and not contain any special character !" -#~ msgstr "" -#~ "O nome do objeto precisa iniciar com x_ e não pode conter nenhum caracter " -#~ "especial!" - -#~ msgid "The name of the module must be unique !" -#~ msgstr "O nome do módulo precisa ser único !" - -#~ msgid "Size of the field can never be less than 1 !" -#~ msgstr "O tamanho do campo nunca pode ser menor que 1 !" - -#~ msgid "The certificate ID of the module must be unique !" -#~ msgstr "O ID de certificado do módulo precisa ser único !" diff --git a/addons/project_mailgate/i18n/zh_CN.po b/addons/project_mailgate/i18n/zh_CN.po index 5146601a653..c49c4725f42 100644 --- a/addons/project_mailgate/i18n/zh_CN.po +++ b/addons/project_mailgate/i18n/zh_CN.po @@ -14,13 +14,13 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-06-29 04:43+0000\n" -"X-Generator: Launchpad (build 13168)\n" +"X-Launchpad-Export-Date: 2011-09-05 05:56+0000\n" +"X-Generator: Launchpad (build 13830)\n" #. module: project_mailgate #: view:project.task:0 msgid "History Information" -msgstr "历史信息" +msgstr "日志信息" #. module: project_mailgate #: model:ir.model,name:project_mailgate.model_project_task @@ -101,4 +101,4 @@ msgstr "等待中" #. module: project_mailgate #: view:project.task:0 msgid "History" -msgstr "历史记录" +msgstr "日志" -- cgit v1.2.3 From 90621d90b4656363351bfe2af0b753ce6b383a54 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Wed, 7 Sep 2011 21:27:35 +0200 Subject: [FIX] project*: fix mail.message model name in access rights bzr revid: odo@openerp.com-20110907192735-yn09uo9z2wif241n --- addons/project_mailgate/security/ir.model.access.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'addons/project_mailgate') diff --git a/addons/project_mailgate/security/ir.model.access.csv b/addons/project_mailgate/security/ir.model.access.csv index ddbbb436cf4..cf9a08b958d 100644 --- a/addons/project_mailgate/security/ir.model.access.csv +++ b/addons/project_mailgate/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_email_message_project_manager","project.email.message.manager","mail.model_email_message","project.group_project_manager",1,1,1,0 -"access_email_message_project_user","project.email.message.user","mail.model_email_message","project.group_project_user",1,1,1,0 +"access_mail_message_project_manager","project.mail.message.manager","mail.model_mail_message","project.group_project_manager",1,1,1,0 +"access_mail_message_project_user","project.mail.message.user","mail.model_mail_message","project.group_project_user",1,1,1,0 -- cgit v1.2.3 From 194c8dba3198010e54f55c4851177827d942c6ce Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Wed, 7 Sep 2011 23:17:36 +0200 Subject: [FIX] mail*: mail.message list should be readonly bzr revid: odo@openerp.com-20110907211736-73fnu73xnca14gn9 --- addons/project_mailgate/project_mailgate_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/project_mailgate') diff --git a/addons/project_mailgate/project_mailgate_view.xml b/addons/project_mailgate/project_mailgate_view.xml index f2c8c7006e3..c3cd4bf9db2 100644 --- a/addons/project_mailgate/project_mailgate_view.xml +++ b/addons/project_mailgate/project_mailgate_view.xml @@ -9,7 +9,7 @@ - + -- cgit v1.2.3 From 0b5c73027c2205b78f5b3d1e27967ca11f125750 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Wed, 7 Sep 2011 23:39:49 +0200 Subject: [REM] crm*: remove useless msg_send() method, cleanup bzr revid: odo@openerp.com-20110907213949-pl2jg4fjd1pcvik9 --- addons/project_mailgate/project_mailgate.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'addons/project_mailgate') diff --git a/addons/project_mailgate/project_mailgate.py b/addons/project_mailgate/project_mailgate.py index 9ebd12ec206..293d97c88a7 100644 --- a/addons/project_mailgate/project_mailgate.py +++ b/addons/project_mailgate/project_mailgate.py @@ -29,9 +29,9 @@ class project_tasks(osv.osv): _name = "project.task" _inherit = ['mail.thread','project.task'] - _columns={ - 'message_ids': fields.one2many('mail.message', 'res_id', 'Messages', domain=[('model','=',_name)], readonly=True), - } + _columns = { + 'message_ids': fields.one2many('mail.message', 'res_id', 'Messages', domain=[('model','=',_name)], readonly=True), + } def message_new(self, cr, uid, msg, custom_values=None, context=None): res_id = super(project_tasks,self).message_new(cr, uid, msg, custom_values=custom_values, context=context) @@ -89,9 +89,6 @@ class project_tasks(osv.osv): return len(res) and res[0] or False return res - def msg_send(self, cr, uid, id, *args, **argv): - return True - def do_draft(self, cr, uid, ids, context=None): res = super(project_tasks, self).do_draft(cr, uid, ids, context) tasks = self.browse(cr, uid, ids, context=context) -- cgit v1.2.3 From b066e09042c00080a93442522423f34c33f739c0 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 8 Sep 2011 00:38:59 +0200 Subject: [FIX] project.mailgate: wrong implementation of mail.thread API bzr revid: odo@openerp.com-20110907223859-iywto1y7j08bu0bi --- addons/project_mailgate/project_mailgate.py | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'addons/project_mailgate') diff --git a/addons/project_mailgate/project_mailgate.py b/addons/project_mailgate/project_mailgate.py index 293d97c88a7..9715a32c151 100644 --- a/addons/project_mailgate/project_mailgate.py +++ b/addons/project_mailgate/project_mailgate.py @@ -77,17 +77,12 @@ class project_tasks(osv.osv): return True def message_thread_followers(self, cr, uid, ids, context=None): - res = [] - if isinstance(ids, (str, int, long)): - select = [ids] - else: - select = ids - for task in self.browse(cr, uid, select, context=context): - user_email = (task.user_id and task.user_id.user_email) or False - res += [(user_email, False, False, task.priority)] - if isinstance(ids, (str, int, long)): - return len(res) and res[0] or False - return res + followers = super(project_tasks,self).message_thread_followers(cr, uid, ids, context=context) + for task in self.browse(cr, uid, followers.keys(), context=context): + task_followers = set(followers[task.id]) + task_followers.add(task.user_id.user_email) + followers[task.id] = filter(None, task_followers) + return followers def do_draft(self, cr, uid, ids, context=None): res = super(project_tasks, self).do_draft(cr, uid, ids, context) -- cgit v1.2.3 From eca9d6decf96b7d6e97b67242942bc6f3cf57dde Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 8 Sep 2011 00:49:37 +0200 Subject: [IMP] project_mailgate: updated module description bzr revid: odo@openerp.com-20110907224937-hcebwgh9v77gvhq0 --- addons/project_mailgate/__openerp__.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'addons/project_mailgate') diff --git a/addons/project_mailgate/__openerp__.py b/addons/project_mailgate/__openerp__.py index ec727e530fe..76ff6dbbc47 100644 --- a/addons/project_mailgate/__openerp__.py +++ b/addons/project_mailgate/__openerp__.py @@ -21,7 +21,7 @@ { - "name": "Project MailGateWay", + "name": "Project Tasks - Mail Integration", "version": "1.1", "author": "OpenERP SA", "website": "http://www.openerp.com", @@ -30,11 +30,19 @@ "images": ["images/project_mailgate_task.jpeg"], "depends": ["project", "mail"], "description": """ -This module is an interface that synchronises mails with OpenERP Project Task. -============================================================================== +This module can automatically create Project Tasks based on incoming emails +=========================================================================== + +Allows creating tasks based on new emails arriving at a given mailbox, +similarly to what the CRM application has for Leads/Opportunities. +There are two common alternatives to configure the mailbox integration: + + * Install the ``fetchmail`` module and configure a new mailbox, then select + ``Project Tasks`` as the target for incoming emails. + * Set it up manually on your mail server based on the 'mail gateway' script + provided in the ``mail`` module - and connect it to the `project.task` model. + -It allows creating tasks as soon as a new mail arrives in our configured mail server. -Moreover, it keeps track of all further communications and task states. """, "init_xml": [], "update_xml": ["security/ir.model.access.csv", -- cgit v1.2.3