From e344a401fbb5522d22575c15f0376972f2144412 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Wed, 21 Jan 2015 13:33:40 +0200 Subject: [PATCH 1/9] upload mail_outgoing --- __init__.py | 1 + __openerp__.py | 19 +++++++++++++++++++ mail_outgoing_models.py | 22 ++++++++++++++++++++++ mail_outgoing_views.xml | 29 +++++++++++++++++++++++++++++ security/ir.model.access.csv | 3 +++ security/mail_outgoing.xml | 33 +++++++++++++++++++++++++++++++++ 6 files changed, 107 insertions(+) create mode 100644 __init__.py create mode 100644 __openerp__.py create mode 100644 mail_outgoing_models.py create mode 100644 mail_outgoing_views.xml create mode 100644 security/ir.model.access.csv create mode 100644 security/mail_outgoing.xml diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..698570a --- /dev/null +++ b/__init__.py @@ -0,0 +1 @@ +import mail_outgoing_models diff --git a/__openerp__.py b/__openerp__.py new file mode 100644 index 0000000..1ac15ee --- /dev/null +++ b/__openerp__.py @@ -0,0 +1,19 @@ +{ + 'name' : 'Outgoing mails menu', + 'version' : '1.0.0', + 'author' : 'Ivan Yelizariev', + 'category' : 'Sale', + 'website' : 'https://it-projects.info', + 'description': """ +Allows to check outgoing mails, i.e. failed or delayed. + +Tested on Odoo 8.0 ab7b5d7732a7c222a0aea45bd173742acd47242d + """, + 'depends' : ['mail'], + 'data':[ + 'security/mail_outgoing.xml', + 'security/ir.model.access.csv', + 'mail_outgoing_views.xml', + ], + 'installable': True +} diff --git a/mail_outgoing_models.py b/mail_outgoing_models.py new file mode 100644 index 0000000..a823bbc --- /dev/null +++ b/mail_outgoing_models.py @@ -0,0 +1,22 @@ +from openerp.osv import osv + +class mail_message(osv.Model): + _inherit = 'mail.message' + + def check_access_rule(self, cr, uid, ids, operation, context=None): + group_all_emails = self.pool.get('ir.model.data').xmlid_to_object(cr, uid, 'mail_outgoing.group_all_emails', context=context) + + user = self.pool['res.users'].browse(cr, uid, uid, context) + user_groups = set(user.groups_id) + if user_groups.issuperset(group_all_emails): + return + + return super(mail_message, self).check_access_rule(cr, uid, ids, operation, context) + +class mail_mail(osv.Model): + _name = 'mail.mail' + _inherit = ['mail.mail', 'ir.needaction_mixin'] + _needaction = True + + def _needaction_domain_get(self, cr, uid, context=None): + return [('state','in', ['outgoing', 'exception'])] diff --git a/mail_outgoing_views.xml b/mail_outgoing_views.xml new file mode 100644 index 0000000..9667288 --- /dev/null +++ b/mail_outgoing_views.xml @@ -0,0 +1,29 @@ + + + + + + Outgoing + mail.mail + form + tree,form + {} + + + + + + + + Open Outgoing Menu + reload + + + + + open + + + + + diff --git a/security/ir.model.access.csv b/security/ir.model.access.csv new file mode 100644 index 0000000..9ae9ee1 --- /dev/null +++ b/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_mail_mail_system,mail.mail.system,model_mail_mail,mail_outgoing.group_all_emails,1,1,1,1 + diff --git a/security/mail_outgoing.xml b/security/mail_outgoing.xml new file mode 100644 index 0000000..b394494 --- /dev/null +++ b/security/mail_outgoing.xml @@ -0,0 +1,33 @@ + + + + + all_emails + Gets access to all emails. For example to check outgoing emails. + + + + mail.mail: user + + [('author_id', '=', user.partner_id.id)] + + + + + + + + + + mail.mail: system + + [(1, '=', 1)] + + + + + + + + + From e3605f22cd624b584ccdb921d354a27f77f722a2 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Thu, 22 Jan 2015 13:24:56 +0200 Subject: [PATCH 2/9] [IMP] add help text --- mail_outgoing_views.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mail_outgoing_views.xml b/mail_outgoing_views.xml index 9667288..9bc5d86 100644 --- a/mail_outgoing_views.xml +++ b/mail_outgoing_views.xml @@ -9,6 +9,11 @@ tree,form {} + +

+ Failed or delayed emails will be shown here. You will be able to retry failed emails and send delayed emails manually. +

+
From af10a30c15a6ac62dd0a1f69f29a9ee5a1ca879c Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Thu, 19 Feb 2015 19:36:02 +0200 Subject: [PATCH 3/9] new website https://yelizariev.github.io/ --- __openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__openerp__.py b/__openerp__.py index 1ac15ee..c50fef1 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -3,7 +3,7 @@ 'version' : '1.0.0', 'author' : 'Ivan Yelizariev', 'category' : 'Sale', - 'website' : 'https://it-projects.info', + 'website' : 'https://yelizariev.github.io', 'description': """ Allows to check outgoing mails, i.e. failed or delayed. From 5f8323033cbc22b086cd6ab3bc00533a7a63a60f Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Thu, 2 Jul 2015 16:35:12 +0500 Subject: [PATCH 4/9] [DOC] add icon --- static/description/icon.png | Bin 0 -> 2140 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 static/description/icon.png diff --git a/static/description/icon.png b/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..79f7d8fe294f838cf2996940c40dc08dde60642f GIT binary patch literal 2140 zcmV-i2&4CjP)=D+Wys1fe}G$Q#Z2832St25n<}h#$%L7sUBHn zgVlR~4gtNOs+KA#@5q|?_&of{fCW3h;+eI-@is^))^C>Ap=O06Yq-$?c7APo?&VKv z))(zizAhAwtYInZ&irDhM>SGBFM>?d${LzoxNVMo=er+dj|dVX82(itvPy&nJI7R} zxal|{b!VXeY~=?NW24HG!g#W&q%^mz9C_k)O~vB$l!nR>c7Azkc41B0?h`G%re>$6 zR3XK_wP$L$`wA`+vfQ*It2kJ&bC8N#=Y*z`?T#poH4<6rMKBSth@G$Anh#P6geeX3 z66#s7^ZuFn%%U9v!&L5`a;i`|jy4C6tV1;wvTsBRf(1LrR7N-{7FL;Ru=vP|@loCg zW(jHMC_PwJ+DqF+1@u$zm8o8m$Y1m0V>0T?5;C37EIq_^W|6qn&f)G(Em&B}uDzZf z*)+}sw{t=Y4awlQ*0UI=qn@0G^f!D}&U?lzXXnrqYS25*U`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0500 Subject: [PATCH 5/9] [DOC] fix modules categories --- __openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__openerp__.py b/__openerp__.py index c50fef1..55a16c9 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -2,7 +2,7 @@ 'name' : 'Outgoing mails menu', 'version' : '1.0.0', 'author' : 'Ivan Yelizariev', - 'category' : 'Sale', + 'category' : 'Social Network', 'website' : 'https://yelizariev.github.io', 'description': """ Allows to check outgoing mails, i.e. failed or delayed. From 94aed9edb4488afaf6fd0fb45fba2497105e1d2c Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Sun, 27 Sep 2015 10:22:56 +0500 Subject: [PATCH 6/9] [DOC] add IT-Projects LLC to authors --- __openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__openerp__.py b/__openerp__.py index 55a16c9..28e5882 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -1,7 +1,7 @@ { 'name' : 'Outgoing mails menu', 'version' : '1.0.0', - 'author' : 'Ivan Yelizariev', + 'author' : 'IT-Projects LLC, Ivan Yelizariev', 'category' : 'Social Network', 'website' : 'https://yelizariev.github.io', 'description': """ From 3089ff436a6a8544dd524576d447d10991084032 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Tue, 3 Nov 2015 10:22:20 +0500 Subject: [PATCH 7/9] [DOC] add license tag --- __openerp__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/__openerp__.py b/__openerp__.py index 28e5882..b116497 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -2,6 +2,7 @@ 'name' : 'Outgoing mails menu', 'version' : '1.0.0', 'author' : 'IT-Projects LLC, Ivan Yelizariev', + 'license': 'LGPL-3', 'category' : 'Social Network', 'website' : 'https://yelizariev.github.io', 'description': """ From 6ffa43b47389f850aebdffca4d1c9213171a42d6 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Mon, 9 Nov 2015 11:26:31 +0500 Subject: [PATCH 8/9] update license to GPL-3 --- __openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__openerp__.py b/__openerp__.py index b116497..f79a3b4 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -2,7 +2,7 @@ 'name' : 'Outgoing mails menu', 'version' : '1.0.0', 'author' : 'IT-Projects LLC, Ivan Yelizariev', - 'license': 'LGPL-3', + 'license': 'GPL-3', 'category' : 'Social Network', 'website' : 'https://yelizariev.github.io', 'description': """ From de11967526dd0d6483b1dad72f5960e60ebb13d9 Mon Sep 17 00:00:00 2001 From: Ildar Nasyrov Date: Sun, 27 Mar 2016 16:21:37 +0500 Subject: [PATCH 9/9] [MOV] module -- mail_outgoing --- __init__.py => mail_outgoing/__init__.py | 0 __openerp__.py => mail_outgoing/__openerp__.py | 0 .../mail_outgoing_models.py | 0 .../mail_outgoing_views.xml | 0 .../security}/ir.model.access.csv | 0 .../security}/mail_outgoing.xml | 0 .../static}/description/icon.png | Bin 7 files changed, 0 insertions(+), 0 deletions(-) rename __init__.py => mail_outgoing/__init__.py (100%) rename __openerp__.py => mail_outgoing/__openerp__.py (100%) rename mail_outgoing_models.py => mail_outgoing/mail_outgoing_models.py (100%) rename mail_outgoing_views.xml => mail_outgoing/mail_outgoing_views.xml (100%) rename {security => mail_outgoing/security}/ir.model.access.csv (100%) rename {security => mail_outgoing/security}/mail_outgoing.xml (100%) rename {static => mail_outgoing/static}/description/icon.png (100%) diff --git a/__init__.py b/mail_outgoing/__init__.py similarity index 100% rename from __init__.py rename to mail_outgoing/__init__.py diff --git a/__openerp__.py b/mail_outgoing/__openerp__.py similarity index 100% rename from __openerp__.py rename to mail_outgoing/__openerp__.py diff --git a/mail_outgoing_models.py b/mail_outgoing/mail_outgoing_models.py similarity index 100% rename from mail_outgoing_models.py rename to mail_outgoing/mail_outgoing_models.py diff --git a/mail_outgoing_views.xml b/mail_outgoing/mail_outgoing_views.xml similarity index 100% rename from mail_outgoing_views.xml rename to mail_outgoing/mail_outgoing_views.xml diff --git a/security/ir.model.access.csv b/mail_outgoing/security/ir.model.access.csv similarity index 100% rename from security/ir.model.access.csv rename to mail_outgoing/security/ir.model.access.csv diff --git a/security/mail_outgoing.xml b/mail_outgoing/security/mail_outgoing.xml similarity index 100% rename from security/mail_outgoing.xml rename to mail_outgoing/security/mail_outgoing.xml diff --git a/static/description/icon.png b/mail_outgoing/static/description/icon.png similarity index 100% rename from static/description/icon.png rename to mail_outgoing/static/description/icon.png