Browse Source
[10.0] Migrate sendgrid modules
[10.0] Migrate sendgrid modules
CO-1192 The mail are now correctly sent to all recipientspull/185/head
Emanuel Cino
8 years ago
35 changed files with 184 additions and 409 deletions
-
1.travis.yml
-
2mail_sendgrid/README.rst
-
13mail_sendgrid/__init__.py
-
25mail_sendgrid/__manifest__.py
-
51mail_sendgrid/__openerp__.py
-
13mail_sendgrid/controllers/__init__.py
-
15mail_sendgrid/controllers/json_request.py
-
17mail_sendgrid/controllers/sendgrid_event_webhook.py
-
13mail_sendgrid/models/__init__.py
-
15mail_sendgrid/models/email_lang_template.py
-
15mail_sendgrid/models/email_template.py
-
15mail_sendgrid/models/email_tracking.py
-
33mail_sendgrid/models/mail_mail.py
-
2mail_sendgrid/models/mail_tracking_event.py
-
20mail_sendgrid/models/sendgrid_template.py
-
15mail_sendgrid/models/substitution.py
-
13mail_sendgrid/tests/__init__.py
-
6mail_sendgrid/tests/test_mail_sendgrid.py
-
4mail_sendgrid/views/sendgrid_template_view.xml
-
13mail_sendgrid/wizards/__init__.py
-
15mail_sendgrid/wizards/email_template_preview.py
-
17mail_sendgrid/wizards/mail_compose_message.py
-
13mail_sendgrid_mass_mailing/__init__.py
-
21mail_sendgrid_mass_mailing/__manifest__.py
-
47mail_sendgrid_mass_mailing/__openerp__.py
-
13mail_sendgrid_mass_mailing/models/__init__.py
-
15mail_sendgrid_mass_mailing/models/email_tracking.py
-
15mail_sendgrid_mass_mailing/models/mail_mail.py
-
21mail_sendgrid_mass_mailing/models/mass_mailing.py
-
13mail_sendgrid_mass_mailing/tests/__init__.py
-
2mail_sendgrid_mass_mailing/tests/test_mass_mailing.py
-
57mail_sendgrid_mass_mailing/views/mass_mailing_view.xml
-
13mail_sendgrid_mass_mailing/wizards/__init__.py
-
15mail_sendgrid_mass_mailing/wizards/mail_compose_message.py
-
15mail_sendgrid_mass_mailing/wizards/test_mailing.py
@ -1,13 +1,6 @@ |
|||||
# -*- encoding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Copyright (C) 2015 Compassion CH (http://www.compassion.ch) |
|
||||
# Releasing children from poverty in Jesus' name |
|
||||
# @author: Roman Zoller |
|
||||
# |
|
||||
# The licence is in the file __openerp__.py |
|
||||
# |
|
||||
############################################################################## |
|
||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright 2015-2017 Compassion CH (http://www.compassion.ch) |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
||||
|
|
||||
from . import models |
from . import models |
||||
from . import wizards |
from . import wizards |
||||
|
@ -0,0 +1,25 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright 2015-2017 Compassion CH (http://www.compassion.ch) |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
||||
|
{ |
||||
|
'name': 'SendGrid', |
||||
|
'version': '10.0.1.0.0', |
||||
|
'category': 'Social Network', |
||||
|
'author': 'Compassion CH, Odoo Community Association (OCA)', |
||||
|
'license': 'AGPL-3', |
||||
|
'website': 'http://www.compassion.ch', |
||||
|
'depends': ['mail_tracking'], |
||||
|
'data': [ |
||||
|
'security/ir.model.access.csv', |
||||
|
'views/sendgrid_email_view.xml', |
||||
|
'views/sendgrid_template_view.xml', |
||||
|
'views/mail_compose_message_view.xml', |
||||
|
'views/email_template_view.xml', |
||||
|
], |
||||
|
'demo': [], |
||||
|
'installable': True, |
||||
|
'auto_install': False, |
||||
|
'external_dependencies': { |
||||
|
'python': ['sendgrid'], |
||||
|
}, |
||||
|
} |
@ -1,51 +0,0 @@ |
|||||
# -*- encoding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# ______ Releasing children from poverty _ |
|
||||
# / ____/___ ____ ___ ____ ____ ___________(_)___ ____ |
|
||||
# / / / __ \/ __ `__ \/ __ \/ __ `/ ___/ ___/ / __ \/ __ \ |
|
||||
# / /___/ /_/ / / / / / / /_/ / /_/ (__ |__ ) / /_/ / / / / |
|
||||
# \____/\____/_/ /_/ /_/ .___/\__,_/____/____/_/\____/_/ /_/ |
|
||||
# /_/ |
|
||||
# in Jesus' name |
|
||||
# |
|
||||
# Copyright (C) 2015-2017 Compassion CH (http://www.compassion.ch) |
|
||||
# @author: Emanuel Cino, Roman Zoller |
|
||||
# |
|
||||
# This program is free software: you can redistribute it and/or modify |
|
||||
# it under the terms of the GNU Affero General Public License as |
|
||||
# published by the Free Software Foundation, either version 3 of the |
|
||||
# License, or (at your option) any later version. |
|
||||
# |
|
||||
# This program is distributed in the hope that it will be useful, |
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
||||
# GNU Affero General Public License for more details. |
|
||||
# |
|
||||
# You should have received a copy of the GNU Affero General Public License |
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
||||
# |
|
||||
############################################################################## |
|
||||
|
|
||||
|
|
||||
{ |
|
||||
'name': 'SendGrid', |
|
||||
'version': '9.0.1.0.0', |
|
||||
'category': 'Social Network', |
|
||||
'author': 'Compassion CH', |
|
||||
'website': 'http://www.compassion.ch', |
|
||||
'depends': ['mail_tracking'], |
|
||||
'data': [ |
|
||||
'security/ir.model.access.csv', |
|
||||
'views/sendgrid_email_view.xml', |
|
||||
'views/sendgrid_template_view.xml', |
|
||||
'views/mail_compose_message_view.xml', |
|
||||
'views/email_template_view.xml', |
|
||||
], |
|
||||
'demo': [], |
|
||||
'installable': True, |
|
||||
'auto_install': False, |
|
||||
'external_dependencies': { |
|
||||
'python': ['sendgrid'], |
|
||||
}, |
|
||||
} |
|
@ -1,13 +1,6 @@ |
|||||
# -*- encoding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Copyright (C) 2016 Compassion CH (http://www.compassion.ch) |
|
||||
# Releasing children from poverty in Jesus' name |
|
||||
# @author: Emanuel Cino <ecino@compassion.ch> |
|
||||
# |
|
||||
# The licence is in the file __openerp__.py |
|
||||
# |
|
||||
############################################################################## |
|
||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright 2016-2017 Compassion CH (http://www.compassion.ch) |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
||||
|
|
||||
from . import json_request |
from . import json_request |
||||
from . import sendgrid_event_webhook |
from . import sendgrid_event_webhook |
@ -1,12 +1,5 @@ |
|||||
# -*- encoding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Copyright (C) 2017 Compassion CH (http://www.compassion.ch) |
|
||||
# Releasing children from poverty in Jesus' name |
|
||||
# @author: Emanuel Cino |
|
||||
# |
|
||||
# The licence is in the file __openerp__.py |
|
||||
# |
|
||||
############################################################################## |
|
||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright 2015-2017 Compassion CH (http://www.compassion.ch) |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
||||
|
|
||||
from . import test_mail_sendgrid |
from . import test_mail_sendgrid |
@ -1,13 +1,6 @@ |
|||||
# -*- encoding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Copyright (C) 2016 Compassion CH (http://www.compassion.ch) |
|
||||
# Releasing children from poverty in Jesus' name |
|
||||
# @author: Emanuel Cino |
|
||||
# |
|
||||
# The licence is in the file __openerp__.py |
|
||||
# |
|
||||
############################################################################## |
|
||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright 2015-2017 Compassion CH (http://www.compassion.ch) |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
||||
|
|
||||
from . import mail_compose_message |
from . import mail_compose_message |
||||
from . import email_template_preview |
from . import email_template_preview |
@ -1,13 +1,6 @@ |
|||||
# -*- encoding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Copyright (C) 2016 Compassion CH (http://www.compassion.ch) |
|
||||
# Releasing children from poverty in Jesus' name |
|
||||
# @author: Emanuel Cino |
|
||||
# |
|
||||
# The licence is in the file __openerp__.py |
|
||||
# |
|
||||
############################################################################## |
|
||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright 2016-2017 Compassion CH (http://www.compassion.ch) |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
||||
|
|
||||
from . import models |
from . import models |
||||
from . import wizards |
from . import wizards |
@ -0,0 +1,21 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright 2016-2017 Compassion CH (http://www.compassion.ch) |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
||||
|
{ |
||||
|
'name': 'Mass Mailing with SendGrid', |
||||
|
'version': '10.0.1.0.0', |
||||
|
'category': 'Social Network', |
||||
|
'author': 'Compassion CH, Odoo Community Association (OCA)', |
||||
|
'license': 'AGPL-3', |
||||
|
'website': 'http://www.compassion.ch', |
||||
|
'depends': ['mail_sendgrid', 'mail_tracking_mass_mailing'], |
||||
|
'data': [ |
||||
|
'views/mass_mailing_view.xml' |
||||
|
], |
||||
|
'demo': [], |
||||
|
'installable': True, |
||||
|
'auto_install': True, |
||||
|
'external_dependencies': { |
||||
|
'python': ['sendgrid'], |
||||
|
}, |
||||
|
} |
@ -1,47 +0,0 @@ |
|||||
# -*- encoding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# ______ Releasing children from poverty _ |
|
||||
# / ____/___ ____ ___ ____ ____ ___________(_)___ ____ |
|
||||
# / / / __ \/ __ `__ \/ __ \/ __ `/ ___/ ___/ / __ \/ __ \ |
|
||||
# / /___/ /_/ / / / / / / /_/ / /_/ (__ |__ ) / /_/ / / / / |
|
||||
# \____/\____/_/ /_/ /_/ .___/\__,_/____/____/_/\____/_/ /_/ |
|
||||
# /_/ |
|
||||
# in Jesus' name |
|
||||
# |
|
||||
# Copyright (C) 2016 Compassion CH (http://www.compassion.ch) |
|
||||
# @author: Emanuel Cino <ecino@compassion.ch> |
|
||||
# |
|
||||
# This program is free software: you can redistribute it and/or modify |
|
||||
# it under the terms of the GNU Affero General Public License as |
|
||||
# published by the Free Software Foundation, either version 3 of the |
|
||||
# License, or (at your option) any later version. |
|
||||
# |
|
||||
# This program is distributed in the hope that it will be useful, |
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
||||
# GNU Affero General Public License for more details. |
|
||||
# |
|
||||
# You should have received a copy of the GNU Affero General Public License |
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
||||
# |
|
||||
############################################################################## |
|
||||
|
|
||||
|
|
||||
{ |
|
||||
'name': 'Mass Mailing with SendGrid', |
|
||||
'version': '9.0.1.0.0', |
|
||||
'category': 'Social Network', |
|
||||
'author': 'Compassion CH', |
|
||||
'website': 'http://www.compassion.ch', |
|
||||
'depends': ['mail_sendgrid', 'mail_tracking_mass_mailing'], |
|
||||
'data': [ |
|
||||
'views/mass_mailing_view.xml' |
|
||||
], |
|
||||
'demo': [], |
|
||||
'installable': True, |
|
||||
'auto_install': True, |
|
||||
'external_dependencies': { |
|
||||
'python': ['sendgrid'], |
|
||||
}, |
|
||||
} |
|
@ -1,13 +1,6 @@ |
|||||
# -*- encoding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Copyright (C) 2016 Compassion CH (http://www.compassion.ch) |
|
||||
# Releasing children from poverty in Jesus' name |
|
||||
# @author: Emanuel Cino |
|
||||
# |
|
||||
# The licence is in the file __openerp__.py |
|
||||
# |
|
||||
############################################################################## |
|
||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright 2016-2017 Compassion CH (http://www.compassion.ch) |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
||||
|
|
||||
from . import mass_mailing |
from . import mass_mailing |
||||
from . import mail_mail |
from . import mail_mail |
||||
|
@ -1,12 +1,5 @@ |
|||||
# -*- encoding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Copyright (C) 2017 Compassion CH (http://www.compassion.ch) |
|
||||
# Releasing children from poverty in Jesus' name |
|
||||
# @author: Emanuel Cino |
|
||||
# |
|
||||
# The licence is in the file __openerp__.py |
|
||||
# |
|
||||
############################################################################## |
|
||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright 2016-2017 Compassion CH (http://www.compassion.ch) |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
||||
|
|
||||
from . import test_mass_mailing |
from . import test_mass_mailing |
@ -1,31 +1,28 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
<?xml version="1.0" encoding="utf-8"?> |
||||
<openerp> |
|
||||
<data> |
|
||||
<!-- Form view --> |
|
||||
<record id="view_email_template_sendgrid_form" model="ir.ui.view"> |
|
||||
<field name="name">mass.mailing.sendgrid.form</field> |
|
||||
<field name="model">mail.mass_mailing</field> |
|
||||
<field name="inherit_id" ref="mass_mailing.view_mail_mass_mailing_form"/> |
|
||||
<field name="arch" type="xml"> |
|
||||
<xpath expr="//field[@name='mailing_model']/.." position="after"> |
|
||||
<field name="email_template_id" domain="[('model', '=', mailing_model), ('sendgrid_template_ids', '!=', False)]"/> |
|
||||
<field name="lang" attrs="{'invisible': [('email_template_id', '=', False)]}"/> |
|
||||
</xpath> |
|
||||
<xpath expr="//notebook/page[1]" position="after"> |
|
||||
<page string="Sendgrid Preview" attrs="{'invisible': [('email_template_id', '=', False)]}"> |
|
||||
<field name="html_copy" invisible="1"/> |
|
||||
<field name="body_sendgrid" widget="html"/> |
|
||||
</page> |
|
||||
</xpath> |
|
||||
<xpath expr="//notebook/page/group[1]"> |
|
||||
<group string="Sendgrid Unsubscribe"> |
|
||||
<field name="enable_unsubscribe"/> |
|
||||
<field name="unsubscribe_text" attrs="{'invisible': [('enable_unsubscribe', '=', False)]}"/> |
|
||||
<field name="unsubscribe_tag" attrs="{'invisible': [('enable_unsubscribe', '=', False)]}"/> |
|
||||
</group> |
|
||||
</xpath> |
|
||||
</field> |
|
||||
</record> |
|
||||
|
|
||||
</data> |
|
||||
</openerp> |
|
||||
|
<odoo> |
||||
|
<!-- Form view --> |
||||
|
<record id="view_email_template_sendgrid_form" model="ir.ui.view"> |
||||
|
<field name="name">mass.mailing.sendgrid.form</field> |
||||
|
<field name="model">mail.mass_mailing</field> |
||||
|
<field name="inherit_id" ref="mass_mailing.view_mail_mass_mailing_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//field[@name='mailing_model']/.." position="after"> |
||||
|
<field name="email_template_id" domain="[('model', '=', mailing_model), ('sendgrid_template_ids', '!=', False)]"/> |
||||
|
<field name="lang" attrs="{'invisible': [('email_template_id', '=', False)]}"/> |
||||
|
</xpath> |
||||
|
<xpath expr="//notebook/page[1]" position="after"> |
||||
|
<page string="Sendgrid Preview" attrs="{'invisible': [('email_template_id', '=', False)]}"> |
||||
|
<field name="html_copy" invisible="1"/> |
||||
|
<field name="body_sendgrid" widget="html"/> |
||||
|
</page> |
||||
|
</xpath> |
||||
|
<xpath expr="//notebook/page/group[1]"> |
||||
|
<group string="Sendgrid Unsubscribe"> |
||||
|
<field name="enable_unsubscribe"/> |
||||
|
<field name="unsubscribe_text" attrs="{'invisible': [('enable_unsubscribe', '=', False)]}"/> |
||||
|
<field name="unsubscribe_tag" attrs="{'invisible': [('enable_unsubscribe', '=', False)]}"/> |
||||
|
</group> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
</odoo> |
@ -1,13 +1,6 @@ |
|||||
# -*- encoding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Copyright (C) 2016 Compassion CH (http://www.compassion.ch) |
|
||||
# Releasing children from poverty in Jesus' name |
|
||||
# @author: Emanuel Cino |
|
||||
# |
|
||||
# The licence is in the file __openerp__.py |
|
||||
# |
|
||||
############################################################################## |
|
||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright 2016-2017 Compassion CH (http://www.compassion.ch) |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
||||
|
|
||||
from . import mail_compose_message |
from . import mail_compose_message |
||||
from . import test_mailing |
from . import test_mailing |
Write
Preview
Loading…
Cancel
Save
Reference in new issue