From 63ad78c0e8da2349c4615f3d32600a9631fa424b Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Mon, 24 Nov 2014 15:53:26 +0200 Subject: [PATCH 01/11] upload mass_mailing_extra --- __init__.py | 1 + __openerp__.py | 20 ++++++++++++++++++++ models.py | 16 ++++++++++++++++ views.xml | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 69 insertions(+) create mode 100644 __init__.py create mode 100644 __openerp__.py create mode 100644 models.py create mode 100644 views.xml diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..bff786c --- /dev/null +++ b/__init__.py @@ -0,0 +1 @@ +import models diff --git a/__openerp__.py b/__openerp__.py new file mode 100644 index 0000000..a372310 --- /dev/null +++ b/__openerp__.py @@ -0,0 +1,20 @@ +{ + 'name' : 'Improvements for mass mailing', + 'version' : '1.0.0', + 'author' : 'Ivan Yelizariev', + 'category' : 'Mail', + 'website' : 'https://it-projects.info', + 'description': """ +Modules adds: + +* partners info in mail.mail.statistics tree +* partners info in mail.mail.statistics form + +Tested on 8.0 f8d5a6727d3e8d428d9bef93da7ba6b11f344284 + """, + 'depends' : ['mass_mailing'], + 'data':[ + 'views.xml', + ], + 'installable': True +} diff --git a/models.py b/models.py new file mode 100644 index 0000000..0d8c4d6 --- /dev/null +++ b/models.py @@ -0,0 +1,16 @@ +from openerp import api,models,fields + +class MailMailStats(models.Model): + + _inherit = 'mail.mail.statistics' + + partner_ids = fields.Many2many('res.partner', related='mail_mail_id.recipient_ids', string='Partners') + + @api.one + def _get_partner_ids_text(self): + res = [] + for p in self.partner_ids: + res.append('%s <%s>' % (p.name, p.email)) + self.partner_ids_text = ', '.join(res) + + partner_ids_text = fields.Char('Partners', compute=_get_partner_ids_text) diff --git a/views.xml b/views.xml new file mode 100644 index 0000000..34a67a8 --- /dev/null +++ b/views.xml @@ -0,0 +1,32 @@ + + + + + + mail.mail.statistics.form + mail.mail.statistics + + + + + + + + + + + + + + mail.mail.statistics.tree + mail.mail.statistics + + + + + + + + + + From 4bd3f0502e072a7aa90822819be74da63ef513d9 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Tue, 25 Nov 2014 12:34:35 +0200 Subject: [PATCH 02/11] [IMP] get partner from Document ID --- models.py | 24 ++++++++++++++++++------ views.xml | 8 +++++++- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/models.py b/models.py index 0d8c4d6..1fc804f 100644 --- a/models.py +++ b/models.py @@ -4,13 +4,25 @@ class MailMailStats(models.Model): _inherit = 'mail.mail.statistics' - partner_ids = fields.Many2many('res.partner', related='mail_mail_id.recipient_ids', string='Partners') + partner_ids = fields.Many2many('res.partner', related='mail_mail_id.recipient_ids', string='Partners (Mail)') @api.one - def _get_partner_ids_text(self): - res = [] + def _get_partner_id(self): + if self.model=='res.partner': + self.partner_id = self.res_id + else: + self.partner_id = None + + partner_id = fields.Many2one('res.partner', compute=_get_partner_id, string='Partner (Document ID)') + + @api.one + def _get_partners(self): + res = {} for p in self.partner_ids: - res.append('%s <%s>' % (p.name, p.email)) - self.partner_ids_text = ', '.join(res) + res[p.id] = p + if self.partner_id and self.partner_id.id not in res: + res[self.partner_id.id] = self.partner_id + self.partners = ', '.join([('%s <%s>' % (p.name, p.email)) for id,p in res.items()]) + - partner_ids_text = fields.Char('Partners', compute=_get_partner_ids_text) + partners = fields.Char('Partners', compute=_get_partners) diff --git a/views.xml b/views.xml index 34a67a8..19362b4 100644 --- a/views.xml +++ b/views.xml @@ -10,6 +10,12 @@ + + + @@ -23,7 +29,7 @@ - + From 02a356fb3995193324a86326fed4909565c4773e Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Thu, 19 Feb 2015 19:36:02 +0200 Subject: [PATCH 03/11] 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 a372310..63584f5 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -3,7 +3,7 @@ 'version' : '1.0.0', 'author' : 'Ivan Yelizariev', 'category' : 'Mail', - 'website' : 'https://it-projects.info', + 'website' : 'https://yelizariev.github.io', 'description': """ Modules adds: From 4e6fa119dc76ccde17a3662255e1c78a3c6d1a06 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Thu, 2 Jul 2015 16:35:12 +0500 Subject: [PATCH 04/11] [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`_+Qpa)L`slkiwNPnpt zbLhf?onzn&_-r^=Y+@25re#c%ToI(Yb5h;e6h}ke&V&2_vM3~m`<859t@^AmkXN#4 zp3=nL641^=Hb@NJ0y10#e8NYUd#FM=yd}$j-ZOZiJuPn=y})eY?Y#H?ythe(9+=(P z=pO{n_Ag1zK#!ilNhilfXs;Am_;fC9#?QGvtNfjZ8h);==7&rFJ5QsnusaH>>SjHY zMC`QRjtOGt!fz}(jiG1vi5A$ZVuAvl9f!Vzpm3p#doq~Eg#RkU_3sSy1kxiU%8{*-oYZcOz=#QLgi{iP%6NR;q2W-(ziFHtAxczhQ%>g55VsxmVxu{OgA(z8>)V_eL6l3DJe$G5=tJp1|FDThBVI=FE7j=3tSDuEI+K+>VJ0yjG=W@S`oh zY;UN?#paSycm6BhAH$yR>Hg=JAHz8+5-u#Cw5f387dA))IagN=LE)YiRtGqa4{&&- z?Akk2Q!(?$O{HOxfl1vpCei`ivon?ZK`rFDC~Jz{*?3agX(WqeLDAmP6g%rA0{0<> zeqtzKYj)#fyZMfN2OiuS5UVdK(E;HAX;YO|@Z}oGtA&1=LO(l>HnWdoj~#w9CnQPu zz$YVGP~7xI^+ijcUcstRfTEHe{7dZ7Q=w&u@tA}I)g3C3b#`)vCi?y*=jMs3M4_;7 z>sC2k0T-cEZ{)}r0)&rGk$e2;VuY_meg`{ogL|Bk!JluaKhH%NZ8kn?5uft;?gWym z*MCY|fYs06&r)EvXweNU2#O3lwsaSN3LjB|<)5GbI&(^F8Ja$Saf5Dn zfe8N*NS_HTjLe(YbWiuKO3@!C&=suZc=@z@*Skh)DrGicOE-M=A%!7Zj9>aSC(&v#nWVj-o?-d4Br_8Z zDP85P;LTw*XT(K^Ln=~W$+dIA7^DnX@{`gzERF6PYOuNDqSwU8{M+dh76b)Z$^Np8 zK`L@#(IcfdSX4>r$FmU4GvlLe(Pp~uq7PD-^kM2p`;8cbRHVRCk`&s%0t^5+Kg1eL SSUIi$0000 Date: Sun, 27 Sep 2015 10:20:30 +0500 Subject: [PATCH 05/11] [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 63584f5..df7bbb2 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -1,7 +1,7 @@ { 'name' : 'Improvements for mass mailing', 'version' : '1.0.0', - 'author' : 'Ivan Yelizariev', + 'author' : 'IT-Projects LLC, Ivan Yelizariev', 'category' : 'Mail', 'website' : 'https://yelizariev.github.io', 'description': """ From cf77fdbcff144086346ac8eb0513f6ac088ed452 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Sun, 27 Sep 2015 10:22:56 +0500 Subject: [PATCH 06/11] [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 63584f5..df7bbb2 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -1,7 +1,7 @@ { 'name' : 'Improvements for mass mailing', 'version' : '1.0.0', - 'author' : 'Ivan Yelizariev', + 'author' : 'IT-Projects LLC, Ivan Yelizariev', 'category' : 'Mail', 'website' : 'https://yelizariev.github.io', 'description': """ From ab2a1c3fd698bf9c82044562038c9c4f2c5cf314 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Fri, 16 Oct 2015 13:07:01 +0500 Subject: [PATCH 07/11] mark unported modules as non-installable --- __openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__openerp__.py b/__openerp__.py index df7bbb2..8d14e29 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -16,5 +16,5 @@ Tested on 8.0 f8d5a6727d3e8d428d9bef93da7ba6b11f344284 'data':[ 'views.xml', ], - 'installable': True + 'installable': False } From 286df115f9d85283a4dbf3d692b879fe7ce4b9b9 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Tue, 3 Nov 2015 10:22:20 +0500 Subject: [PATCH 08/11] [DOC] add license tag --- __openerp__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/__openerp__.py b/__openerp__.py index df7bbb2..6790f58 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -2,6 +2,7 @@ 'name' : 'Improvements for mass mailing', 'version' : '1.0.0', 'author' : 'IT-Projects LLC, Ivan Yelizariev', + 'license': 'LGPL-3', 'category' : 'Mail', 'website' : 'https://yelizariev.github.io', 'description': """ From f4b607d60fa6a34d0b729f914cd4fece06a66373 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Mon, 9 Nov 2015 11:26:31 +0500 Subject: [PATCH 09/11] update license to GPL-3 --- __openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__openerp__.py b/__openerp__.py index 6790f58..f26db7a 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -2,7 +2,7 @@ 'name' : 'Improvements for mass mailing', 'version' : '1.0.0', 'author' : 'IT-Projects LLC, Ivan Yelizariev', - 'license': 'LGPL-3', + 'license': 'GPL-3', 'category' : 'Mail', 'website' : 'https://yelizariev.github.io', 'description': """ From ba49ecca58a222cabd13b774e65b8bfb120e6a5d Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Mon, 9 Nov 2015 11:36:05 +0500 Subject: [PATCH 10/11] Revert "update license to GPL-3" This reverts commit 6157ee932163b56a3a0ad3a64cefb93e190c5c1d. Conflicts: _web_last_viewed_records/__openerp__.py itprojects_sale/__openerp__.py itprojects_website/__openerp__.py mail_delete_access_link/__openerp__.py mail_delete_sent_by_footer/__openerp__.py money_for/__openerp__.py --- __openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__openerp__.py b/__openerp__.py index ed6b398..cc2207f 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -2,7 +2,7 @@ 'name' : 'Improvements for mass mailing', 'version' : '1.0.0', 'author' : 'IT-Projects LLC, Ivan Yelizariev', - 'license': 'GPL-3', + 'license': 'LGPL-3', 'category' : 'Mail', 'website' : 'https://yelizariev.github.io', 'description': """ From 2fcbec41272fbe4ff10fa7ffbc0c26250fe560b0 Mon Sep 17 00:00:00 2001 From: Ildar Nasyrov Date: Sun, 27 Mar 2016 16:30:14 +0500 Subject: [PATCH 11/11] [MOV] module -- mass_mailing_extra --- __init__.py => mass_mailing_extra/__init__.py | 0 __openerp__.py => mass_mailing_extra/__openerp__.py | 0 models.py => mass_mailing_extra/models.py | 0 .../static}/description/icon.png | Bin views.xml => mass_mailing_extra/views.xml | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename __init__.py => mass_mailing_extra/__init__.py (100%) rename __openerp__.py => mass_mailing_extra/__openerp__.py (100%) rename models.py => mass_mailing_extra/models.py (100%) rename {static => mass_mailing_extra/static}/description/icon.png (100%) rename views.xml => mass_mailing_extra/views.xml (100%) diff --git a/__init__.py b/mass_mailing_extra/__init__.py similarity index 100% rename from __init__.py rename to mass_mailing_extra/__init__.py diff --git a/__openerp__.py b/mass_mailing_extra/__openerp__.py similarity index 100% rename from __openerp__.py rename to mass_mailing_extra/__openerp__.py diff --git a/models.py b/mass_mailing_extra/models.py similarity index 100% rename from models.py rename to mass_mailing_extra/models.py diff --git a/static/description/icon.png b/mass_mailing_extra/static/description/icon.png similarity index 100% rename from static/description/icon.png rename to mass_mailing_extra/static/description/icon.png diff --git a/views.xml b/mass_mailing_extra/views.xml similarity index 100% rename from views.xml rename to mass_mailing_extra/views.xml