Browse Source

[ADD] Initial Commit

pull/200/head
Ajmal Cybro 3 years ago
parent
commit
055303d988
  1. 52
      sendgrid_email/README.rst
  2. 24
      sendgrid_email/__init__.py
  3. 53
      sendgrid_email/__manifest__.py
  4. 7
      sendgrid_email/doc/RELEASE_NOTES.md
  5. 29
      sendgrid_email/models/__init__.py
  6. 32
      sendgrid_email/models/email_send.py
  7. 125
      sendgrid_email/models/email_template.py
  8. 43
      sendgrid_email/models/ir_config_parameter.py
  9. 557
      sendgrid_email/models/mail_mail.py
  10. 139
      sendgrid_email/models/model.py
  11. 39
      sendgrid_email/models/res_config_settings.py
  12. 4
      sendgrid_email/security/ir.model.access.csv
  13. BIN
      sendgrid_email/static/description/assets/icons/check.png
  14. BIN
      sendgrid_email/static/description/assets/icons/chevron.png
  15. BIN
      sendgrid_email/static/description/assets/icons/cogs.png
  16. BIN
      sendgrid_email/static/description/assets/icons/consultation.png
  17. BIN
      sendgrid_email/static/description/assets/icons/ecom-black.png
  18. BIN
      sendgrid_email/static/description/assets/icons/education-black.png
  19. BIN
      sendgrid_email/static/description/assets/icons/hotel-black.png
  20. BIN
      sendgrid_email/static/description/assets/icons/license.png
  21. BIN
      sendgrid_email/static/description/assets/icons/lifebuoy.png
  22. BIN
      sendgrid_email/static/description/assets/icons/logo.png
  23. BIN
      sendgrid_email/static/description/assets/icons/manufacturing-black.png
  24. BIN
      sendgrid_email/static/description/assets/icons/pos-black.png
  25. BIN
      sendgrid_email/static/description/assets/icons/puzzle.png
  26. BIN
      sendgrid_email/static/description/assets/icons/restaurant-black.png
  27. BIN
      sendgrid_email/static/description/assets/icons/service-black.png
  28. BIN
      sendgrid_email/static/description/assets/icons/trading-black.png
  29. BIN
      sendgrid_email/static/description/assets/icons/training.png
  30. BIN
      sendgrid_email/static/description/assets/icons/update.png
  31. BIN
      sendgrid_email/static/description/assets/icons/user.png
  32. BIN
      sendgrid_email/static/description/assets/icons/wrench.png
  33. BIN
      sendgrid_email/static/description/assets/modules/approval_image.png
  34. BIN
      sendgrid_email/static/description/assets/modules/budget_image.png
  35. BIN
      sendgrid_email/static/description/assets/modules/export_image.png
  36. BIN
      sendgrid_email/static/description/assets/modules/magento_image.png
  37. BIN
      sendgrid_email/static/description/assets/modules/pos_image.png
  38. BIN
      sendgrid_email/static/description/assets/modules/shopify_image.png
  39. BIN
      sendgrid_email/static/description/assets/screenshots/bounce-status.png
  40. BIN
      sendgrid_email/static/description/assets/screenshots/configuration-check-box.png
  41. BIN
      sendgrid_email/static/description/assets/screenshots/configuration-template-menu.png
  42. BIN
      sendgrid_email/static/description/assets/screenshots/configuration-text-field.png
  43. BIN
      sendgrid_email/static/description/assets/screenshots/error-resent.png
  44. BIN
      sendgrid_email/static/description/assets/screenshots/error-status.png
  45. BIN
      sendgrid_email/static/description/assets/screenshots/from-email-menu.png
  46. BIN
      sendgrid_email/static/description/assets/screenshots/from-email-page.png
  47. BIN
      sendgrid_email/static/description/assets/screenshots/has_addon.png
  48. BIN
      sendgrid_email/static/description/assets/screenshots/hero.png
  49. BIN
      sendgrid_email/static/description/assets/screenshots/is_addon.png
  50. BIN
      sendgrid_email/static/description/assets/screenshots/mail-test.png
  51. BIN
      sendgrid_email/static/description/assets/screenshots/mailing-confirm.png
  52. BIN
      sendgrid_email/static/description/assets/screenshots/mailing-mail-body.png
  53. BIN
      sendgrid_email/static/description/assets/screenshots/mailing-page-form.png
  54. BIN
      sendgrid_email/static/description/assets/screenshots/mailing-page-kanban.png
  55. BIN
      sendgrid_email/static/description/assets/screenshots/mailing-report-tree.png
  56. BIN
      sendgrid_email/static/description/assets/screenshots/mailing-report.png
  57. BIN
      sendgrid_email/static/description/assets/screenshots/mailing-send-grid.png
  58. BIN
      sendgrid_email/static/description/assets/screenshots/mailing-state-send.png
  59. BIN
      sendgrid_email/static/description/assets/screenshots/mailing-to-email.png
  60. BIN
      sendgrid_email/static/description/assets/screenshots/report-page-form.png
  61. BIN
      sendgrid_email/static/description/assets/screenshots/smart-button-send.png
  62. BIN
      sendgrid_email/static/description/assets/screenshots/template-create-template.png
  63. BIN
      sendgrid_email/static/description/assets/screenshots/template-create-version.png
  64. BIN
      sendgrid_email/static/description/assets/screenshots/template-from-filled.png
  65. BIN
      sendgrid_email/static/description/assets/screenshots/template-page-form.png
  66. BIN
      sendgrid_email/static/description/assets/screenshots/template-page-tree.png
  67. BIN
      sendgrid_email/static/description/banner.png
  68. BIN
      sendgrid_email/static/description/icon.png
  69. 996
      sendgrid_email/static/description/index.html
  70. 18
      sendgrid_email/views/ir_config_view.xml
  71. 98
      sendgrid_email/views/mail_view.xml
  72. 37
      sendgrid_email/views/res_config_view.xml
  73. 218
      sendgrid_email/views/view.xml

52
sendgrid_email/README.rst

@ -0,0 +1,52 @@
SendGrid Email API
==================
This module comes under Odoo Email Marketing.
It will Use for Emailing. It could be use for Bulk
Mailing and Single Mailing . Email Template use for
constructing Email Content.It includes Mail reports
and Bounce Checking Option, here user can Konw the mail status.
Usage
=====
After the installation,in email marketting settings user can see sendgrid api setting field by ticking in check box a new text field will appear here user can set the API key by saving it key will be save in the system ,in email marketting configuration includes a sub menu sendgrid email template details here user can create email templates . in configuration have another menu called sendgrid from emails this menu is used for creating new from emails for using in malling. in mailing menu create a new mail here user can see a new page view called sendgrid emails here we can set the template and another specifications, using sendgrid button on top user can send the mail.
Configuration
=============
For saving the API key configuration have check box field sendgrid api by ticking in check box a new text field will appear here user can set the API key by saving it key will be save in the system.
Company
-------
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__
Credits
-------
* Developer:
Noushid Khan.P
Contacts
--------
* Mail Contact : odoo@cybrosys.com
* Website : https://cybrosys.com
Bug Tracker
-----------
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported.
Maintainer
==========
.. image:: https://cybrosys.com/images/logo.png
:target: https://cybrosys.com
This module is maintained by Cybrosys Technologies.
For support and more information, please visit `Our Website <https://cybrosys.com/>`__
Further information
===================
HTML Description: `<static/description/index.html>`__

24
sendgrid_email/__init__.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2019-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
# Author: Noushid Khan.P (<https://www.cybrosys.com>)
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
from . import models

53
sendgrid_email/__manifest__.py

@ -0,0 +1,53 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2019-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
# Author: Noushid Khan.P (<https://www.cybrosys.com>)
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
{
'name': 'Mass Mailing With SendGrid',
'version': '14.0.1.0.0',
'summary': 'Mass Mailing using SendGrid API',
'description': 'Mass Mailing using SendGrid API',
'category': 'Marketing',
'author': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'website': 'https://www.cybrosys.com',
'depends': [
'crm',
'mass_mailing',
'base',
'hr_recruitment',
'event'
],
'data': [
'security/ir.model.access.csv',
'views/view.xml',
'views/mail_view.xml',
'views/ir_config_view.xml',
'views/res_config_view.xml'
],
'license': 'AGPL-3',
'images': ['static/description/banner.png'],
'installable': True,
'application': False,
'auto_install': False,
}

7
sendgrid_email/doc/RELEASE_NOTES.md

@ -0,0 +1,7 @@
## Module <sendgrid_email>
#### 30.01.2020
#### Version 13.0.1.0.0
##### ADD
- Initial commit for sendgrid_email.

29
sendgrid_email/models/__init__.py

@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2019-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
# Author: Noushid Khan.P (<https://www.cybrosys.com>)
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
from . import model
from . import email_send
from . import email_template
from . import mail_mail
from . import ir_config_parameter
from . import res_config_settings

32
sendgrid_email/models/email_send.py

@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2019-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
# Author: Noushid Khan.P (<https://www.cybrosys.com>)
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
from odoo import models, fields
class EmailDetails(models.Model):
_name = "email.sent"
_description = 'Email From Mails'
name = fields.Char(string="Name", required=True)
email_id = fields.Char(string="Email ID", required=True)

125
sendgrid_email/models/email_template.py

@ -0,0 +1,125 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2019-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
# Author: Noushid Khan.P (<https://www.cybrosys.com>)
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
import json
from odoo import models, fields, _
import http.client
from odoo.exceptions import UserError
class EmailTemplateDetails(models.Model):
_name = "email.template"
_rec_name = "temp_name"
_description = "Template Creation"
temp_name = fields.Char(string="Template Name", required=True)
generation = fields.Char(string="Template Generation", default="Dynamic", readonly=True)
ver_name = fields.Char(string="Version Name")
ver_subject = fields.Char(string="Version Subject", required=True)
ver_editor = fields.Selection([('design', "Design"), ('code', "Code")], string="Version Editor", default="design")
temp_cont = fields.Html(string="Template Content", help="content convert to html code", translate=True,
sanitize=False)
temp_id = fields.Char(string="Template ID")
def create_temp(self):
"""
function is used for creating Mail Template
"""
api_key = ""
company_id = self.env.company
temp_name = self.temp_name
temp_gen = self.generation
api_info = self.env['ir.config_parameter'].search(
[('key', '=', "SendGrid API Key " + company_id.name + "")])
if not api_info:
raise UserError(_("It Needs API Key"))
if api_info.company_id.id == self.env.company.id:
api_key = api_info.value
if not api_key and api_key == "":
raise UserError(_("Your Company Needs an API Key"))
conn = http.client.HTTPSConnection("api.sendgrid.com")
payload = "{\"name\":\"" + temp_name + "\",\"generation\":\"dynamic\"}"
headers = {
'authorization': "Bearer " + api_key + "",
'content-type': "application/json"
}
conn.request("POST", "/v3/templates", payload, headers)
res = conn.getresponse()
print("res", res)
data = res.read()
print("data2", data)
print("json", json)
temp_data = json.loads(data.decode("utf-8"))
print("temp_data", temp_data)
self.temp_id = temp_data['id']
def create_ver(self):
"""
Function is used for creating mail content to the
Created Template.
"""
api_key = ""
if self.temp_cont:
print(self.temp_cont)
company_id = self.env.company
temp_cont = self.temp_cont
temp_id = self.temp_id
print("temp_id", type(temp_id))
ver_name = str(self.ver_name)
print("ver_name", type(ver_name))
ver_sub = self.ver_subject
print("ver_sub", type(ver_sub))
api_info = self.env['ir.config_parameter'].search(
[('key', '=', "SendGrid API Key " + company_id.name + "")])
if not api_info:
raise UserError(_("It Needs API Key"))
if api_info.company_id.id == self.env.company.id:
api_key = api_info.value
if not api_key and api_key == "":
raise UserError(_("Your Company Needs an API Key"))
conn = http.client.HTTPSConnection("api.sendgrid.com")
print("temp_cont", temp_cont)
upt_temp_cnt = (temp_cont.replace('"', ''))
print("upt_temp_cnt", type(upt_temp_cnt))
payload = "{\"template_id\":\"" + temp_id + "\",\"active\":1,\"name\":\"" + ver_name + "\",\"html_content\":\"" + upt_temp_cnt + "\",\"plain_content\":\"<%body%>\",\"subject\":\"" + ver_sub + "\"}"
print("pay", payload)
print("payload", type(payload))
headers = {
'authorization': "Bearer " + api_key + "",
'content-type': "application/json"
}
print("head", headers)
conn.request("POST", "/v3/templates/" + temp_id + "/versions", payload, headers)
res = conn.getresponse()
data = res.read()
print("res1", res)
print("data1", data)

43
sendgrid_email/models/ir_config_parameter.py

@ -0,0 +1,43 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2019-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
# Author: Noushid Khan.P (<https://www.cybrosys.com>)
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
from odoo import models, fields, api
class SendGridAPI(models.Model):
_inherit = "ir.config_parameter"
company_id = fields.Many2one('res.company', string="Company ID")
@api.model
def create(self, vals_list):
"""
function is used for auto filling company
details to company_id
"""
res = super(SendGridAPI, self).create(vals_list)
res.company_id = self.env.company.id
return res

557
sendgrid_email/models/mail_mail.py

@ -0,0 +1,557 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2019-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
# Author: Noushid Khan.P (<https://www.cybrosys.com>)
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
import json
from odoo import models, fields, api, _
from odoo.exceptions import UserError
import http.client
class SendGridEmail(models.Model):
_inherit = 'mailing.mailing'
email_temp = fields.Many2one("email.template", string="Email Template")
temp_id = fields.Char(string="Template ID")
from_email = fields.Many2one("email.sent", string="Sender Email")
to_email_partner = fields.Many2many("res.partner", string="Recipient Emails")
to_email_partner_check = fields.Boolean()
to_email_lead = fields.Many2many("crm.lead", string="Recipient Emails")
to_email_lead_check = fields.Boolean()
to_email_contact = fields.Many2many("mailing.contact", string="Recipient Emails")
to_email_contact_check = fields.Boolean()
to_email_applicant = fields.Many2many("hr.applicant", string="Recipient Emails")
to_email_applicant_check = fields.Boolean()
email_finder = fields.Integer(string="Email finder")
sent_count = fields.Integer(string="Send Count")
send_grid_check = fields.Boolean()
temp_check = fields.Boolean()
def action_send_grid(self):
"""
function used for Sending emails using
SendGrid API using "sendgrid" Button
and creating report based on states.
"""
company_id = self.env.company
api_key = ""
conn = http.client.HTTPSConnection("api.sendgrid.com")
if not self.temp_id:
raise UserError(_("It Needs A Template ID"))
if self.from_email:
from_email = self.from_email.email_id
from_name = self.from_email.name
else:
from_email = "noreply@johndoe.com"
from_name = "JohnDoe"
if self.to_email_partner:
api_info = self.env['ir.config_parameter'].search(
[('key', '=', "SendGrid API Key " + company_id.name + "")])
if not api_info:
raise UserError(_("It Needs API Key"))
if api_info.company_id.id == self.env.company.id:
api_key = api_info.value
if not api_key and api_key == "":
raise UserError(_("Your Company Needs an API Key"))
for data in self.to_email_partner:
to_email = data.email
to_name = data.name
to_company = data.company_name
if not to_company:
to_company = ""
temp_id = self.temp_id
if to_email:
payload = "{\"personalizations\":[{\"to\":[{\"email\":\"" + to_email + "\"}],\"dynamic_template_data\":{\"firstname\":\"" + to_name + "\",\"english\":\"true\",\"company\":\"" + to_company + "\"},\"subject\":\"Official Mail\"}],\"from\":{\"email\":\"" + from_email + "\",\"name\":\"" + from_name + "\"},\"template_id\":\"" + temp_id + "\"}"
headers = {
'authorization': "Bearer " + api_key + "",
'content-type': "application/json"
}
conn.request("POST", "/v3/mail/send", payload, headers)
res = conn.getresponse()
data_msg = res.read()
error_msg = ''
if data_msg.decode("utf-8"):
error_data = json.loads(data_msg.decode("utf-8"))
error_msg = error_data['errors'][0]['message']
if not data_msg.decode("utf-8"):
self.sent_count += 1
self.write({
'state': 'done'
})
self.env['email.api'].create({
'name': self.subject,
'to_email_partner': data.id,
'to_email': to_email,
'recipient_name': to_name,
'company_name': to_company,
'from_email': self.from_email.id,
'temp_type': self.email_temp.id,
'temp_id': self.temp_id,
'to_email_partner_check': True,
'email_finder': self.id
})
elif error_msg:
self.env['email.api'].create({
'name': self.subject,
'to_email_partner': data.id,
'to_email': to_email,
'recipient_name': to_name,
'company_name': to_company,
'from_email': self.from_email.id,
'temp_type': self.email_temp.id,
'temp_id': self.temp_id,
'error_msg': error_msg,
'state': 'error',
'to_email_partner_check': True,
'error_check': True,
'email_finder': self.id
})
self.email_finder = self.id
self.send_grid_check = True
elif self.to_email_lead:
api_info = self.env['ir.config_parameter'].search(
[('key', '=', "SendGrid API Key " + company_id.name + "")])
if not api_info:
raise UserError(_("It Needs API Key"))
if api_info.company_id.id == self.env.company.id:
api_key = api_info.value
if not api_key and api_key == "":
raise UserError(_("Your Company Needs an API Key"))
for data in self.to_email_lead:
to_email = data.email_from
to_name = data.contact_name
if not to_name:
raise UserError(_("Your Lead Needs A Contact Name"))
to_company = data.partner_name
if not to_company:
to_company = ""
temp_id = self.temp_id
payload = ""
if to_email:
payload = "{\"personalizations\":[{\"to\":[{\"email\":\"" + to_email + "\"}],\"dynamic_template_data\":{\"firstname\":\"" + to_name + "\",\"english\":\"true\",\"company\":\"" + to_company + "\"},\"subject\":\"Official Mail\"}],\"from\":{\"email\":\"" + from_email + "\",\"name\":\"" + from_name + "\"},\"template_id\":\"" + temp_id + "\"}"
headers = {
'authorization': "Bearer " + api_key + "",
'content-type': "application/json"
}
conn.request("POST", "/v3/mail/send", payload, headers)
res = conn.getresponse()
data_msg = res.read()
error_msg = ''
if data_msg.decode("utf-8"):
error_data = json.loads(data_msg.decode("utf-8"))
error_msg = error_data['errors'][0]['message']
if not data_msg.decode("utf-8"):
self.sent_count += 1
self.write({
'state': 'done'
})
self.env['email.api'].create({
'name': self.subject,
'to_email_lead': data.id,
'to_email': to_email,
'recipient_name': to_name,
'company_name': to_company,
'from_email': self.from_email.id,
'temp_type': self.email_temp.id,
'temp_id': self.temp_id,
'to_email_lead_check': True,
'email_finder': self.id
})
elif error_msg:
self.env['email.api'].create({
'name': self.subject,
'to_email_lead': data.id,
'to_email': to_email,
'recipient_name': to_name,
'company_name': to_company,
'from_email': self.from_email.id,
'temp_type': self.email_temp.id,
'temp_id': self.temp_id,
'error_msg': error_msg,
'state': 'error',
'to_email_lead_check': True,
'error_check': True,
'email_finder': self.id
})
self.email_finder = self.id
self.send_grid_check = True
elif self.to_email_contact:
api_info = self.env['ir.config_parameter'].search(
[('key', '=', "SendGrid API Key " + company_id.name + "")])
if not api_info:
raise UserError(_("It Needs API Key"))
if api_info.company_id.id == self.env.company.id:
api_key = api_info.value
if not api_key and api_key == "":
raise UserError(_("Your Company Needs an API Key"))
for data in self.to_email_contact:
to_email = data.email
to_name = data.name
to_company = data.company_name
if not to_company:
to_company = ""
temp_id = self.temp_id
payload = ""
if to_email:
payload = "{\"personalizations\":[{\"to\":[{\"email\":\"" + to_email + "\"}],\"dynamic_template_data\":{\"firstname\":\"" + to_name + "\",\"english\":\"true\",\"company\":\"" + to_company + "\"},\"subject\":\"Official Mail\"}],\"from\":{\"email\":\"" + from_email + "\",\"name\":\"" + from_name + "\"},\"template_id\":\"" + temp_id + "\"}"
headers = {
'authorization': "Bearer " + api_key + "",
'content-type': "application/json"
}
conn.request("POST", "/v3/mail/send", payload, headers)
res = conn.getresponse()
data_msg = res.read()
error_msg = ''
if data_msg.decode("utf-8"):
error_data = json.loads(data_msg.decode("utf-8"))
error_msg = error_data['errors'][0]['message']
if not data_msg.decode("utf-8"):
self.sent_count += 1
self.write({
'state': 'done'
})
self.env['email.api'].create({
'name': self.subject,
'to_email_contact': data.id,
'to_email': to_email,
'recipient_name': to_name,
'company_name': to_company,
'from_email': self.from_email.id,
'temp_type': self.email_temp.id,
'temp_id': self.temp_id,
'to_email_contact_check': True,
'email_finder': self.id
})
elif error_msg:
self.env['email.api'].create({
'name': self.subject,
'to_email_contact': data.id,
'to_email': to_email,
'recipient_name': to_name,
'company_name': to_company,
'from_email': self.from_email.id,
'temp_type': self.email_temp.id,
'temp_id': self.temp_id,
'error_msg': error_msg,
'state': 'error',
'to_email_contact_check': True,
'error_check': True,
'email_finder': self.id
})
self.email_finder = self.id
self.send_grid_check = True
elif self.to_email_applicant:
api_info = self.env['ir.config_parameter'].search(
[('key', '=', "SendGrid API Key " + company_id.name + "")])
if not api_info:
raise UserError(_("It Needs API Key"))
if api_info.company_id.id == self.env.company.id:
api_key = api_info.value
if not api_key and api_key == "":
raise UserError(_("Your Company Needs an API Key"))
for data in self.to_email_applicant:
to_email = data.email_from
to_name = data.partner_name
to_company = data.company_id.name
if not to_company:
to_company = ""
temp_id = self.temp_id
payload = ""
if to_email:
payload = "{\"personalizations\":[{\"to\":[{\"email\":\"" + to_email + "\"}],\"dynamic_template_data\":{\"firstname\":\"" + to_name + "\",\"english\":\"true\",\"company\":\"" + to_company + "\"},\"subject\":\"Official Mail\"}],\"from\":{\"email\":\"" + from_email + "\",\"name\":\"" + from_name + "\"},\"template_id\":\"" + temp_id + "\"}"
headers = {
'authorization': "Bearer " + api_key + "",
'content-type': "application/json"
}
conn.request("POST", "/v3/mail/send", payload, headers)
res = conn.getresponse()
data_msg = res.read()
error_msg = ''
if data_msg.decode("utf-8"):
error_data = json.loads(data_msg.decode("utf-8"))
error_msg = error_data['errors'][0]['message']
if not data_msg.decode("utf-8"):
self.sent_count += 1
self.write({
'state': 'done'
})
self.env['email.api'].create({
'name': self.subject,
'to_email_applicant': data.id,
'to_email': to_email,
'recipient_name': to_name,
'company_name': to_company,
'from_email': self.from_email.id,
'temp_type': self.email_temp.id,
'temp_id': self.temp_id,
'to_email_applicant_check': True,
'email_finder': self.id
})
elif error_msg:
self.env['email.api'].create({
'name': self.subject,
'to_email_applicant': data.id,
'to_email': to_email,
'recipient_name': to_name,
'company_name': to_company,
'from_email': self.from_email.id,
'temp_type': self.email_temp.id,
'temp_id': self.temp_id,
'error_msg': error_msg,
'state': 'error',
'email_finder': self.id,
'to_email_applicant_check': True,
'error_check': True
})
self.email_finder = self.id
self.send_grid_check = True
@api.onchange('email_temp', 'mailing_model_id', 'contact_list_ids')
def temp_details(self):
"""
function used for filling subject and recipients emails
based on template and recipient emails
"""
if self.email_temp:
self.temp_check = True
print(self.body_arch)
self.subject = self.email_temp.ver_subject
print("subject", type(self.subject))
self.temp_id = self.email_temp.temp_id
print("temp_id", type(self.temp_id))
print("type", type(self.email_temp.temp_cont))
self.body_html = self.email_temp.temp_cont
print("body_html", self.body_html)
print("body_html", type(self.body_html))
self.body_arch = self.email_temp.temp_cont
print("body_arch", self.body_arch)
print("body_arch", type(self.body_arch))
else:
self.temp_check = False
if self.mailing_model_real == "sale.order" or self.mailing_model_real == "event.registration" or self.mailing_model_real == "event.track":
self.to_email_contact = False
self.to_email_lead = False
self.to_email_applicant = False
self.mailing_domain = "[]"
for mass_mailing in self:
mai_data = mass_mailing.sudo()._get_recipients()
email_ids = self.env[self.mailing_model_real].search([('id', '=', mai_data)])
if email_ids:
self.to_email_partner = email_ids.partner_id
elif self.mailing_model_real == "crm.lead":
self.to_email_contact = False
self.to_email_partner = False
self.to_email_applicant = False
self.mailing_domain = "[]"
for mass_mailing in self:
mai_data = mass_mailing.sudo()._get_recipients()
email_ids = self.env[self.mailing_model_real].search([('id', '=', mai_data)])
if email_ids:
self.to_email_lead = email_ids
elif self.mailing_model_real == "mailing.contact":
self.to_email_partner = False
self.to_email_lead = False
self.to_email_applicant = False
self.mailing_domain = "[]"
for mass_mailing in self:
mai_data = mass_mailing.sudo()._get_recipients()
email_ids = self.env[self.mailing_model_real].search([('id', '=', mai_data)])
if email_ids:
self.to_email_contact = email_ids
if self.contact_list_ids:
email_ids = self.env[self.mailing_model_real].search(
[('id', '=', mai_data), ('list_ids', '=', self.contact_list_ids.ids)])
self.to_email_contact = email_ids
elif self.mailing_model_real == "hr.applicant":
self.to_email_contact = False
self.to_email_lead = False
self.to_email_partner = False
self.mailing_domain = "[]"
for mass_mailing in self:
mai_data = mass_mailing.sudo()._get_recipients()
email_ids = self.env[self.mailing_model_real].search([('id', '=', mai_data)])
if email_ids:
self.to_email_applicant = email_ids
else:
self.to_email_contact = False
self.to_email_lead = False
self.to_email_applicant = False
self.mailing_domain = "[]"
for mass_mailing in self:
mai_data = mass_mailing.sudo()._get_recipients()
email_ids = self.env[self.mailing_model_real].search([('id', '=', mai_data)])
if email_ids:
self.to_email_partner = email_ids
@api.onchange('mailing_domain')
def get_mails_recipients(self):
"""
function used for filtering based on domain
filter
"""
if self.mailing_model_real == "sale.order" or self.mailing_model_real == "event.registration" or self.mailing_model_real == "event.track":
for mass_mailing in self:
mai_data = mass_mailing.sudo()._get_recipients()
email_ids = self.env[self.mailing_model_real].search([('id', '=', mai_data)])
if email_ids:
self.to_email_partner = email_ids.partner_id
elif self.mailing_model_real == "crm.lead":
for mass_mailing in self:
mai_data = mass_mailing.sudo()._get_recipients()
email_ids = self.env[self.mailing_model_real].search([('id', '=', mai_data)])
if email_ids:
self.to_email_lead = email_ids
elif self.mailing_model_real == "mailing.contact":
for mass_mailing in self:
mai_data = mass_mailing.sudo()._get_recipients()
email_ids = self.env[self.mailing_model_real].search([('id', '=', mai_data)])
if email_ids:
self.to_email_contact = email_ids
elif self.mailing_model_real == "hr.applicant":
for mass_mailing in self:
mai_data = mass_mailing.sudo()._get_recipients()
email_ids = self.env[self.mailing_model_real].search([('id', '=', mai_data)])
if email_ids:
self.to_email_applicant = email_ids
else:
for mass_mailing in self:
mai_data = mass_mailing.sudo()._get_recipients()
email_ids = self.env[self.mailing_model_real].search([('id', '=', mai_data)])
if email_ids:
self.to_email_partner = email_ids
@api.onchange('to_email_partner', 'to_email_lead', 'to_email_contact', 'to_email_applicant')
def show_hide_fields(self):
"""
function is used for Enabling Needed
recipient mail fields by changing check box
values.
"""
if self.to_email_partner:
self.to_email_partner_check = True
else:
self.to_email_partner_check = False
if self.to_email_lead:
self.to_email_lead_check = True
else:
self.to_email_lead_check = False
if self.to_email_contact:
self.to_email_contact_check = True
else:
self.to_email_contact_check = False
if self.to_email_applicant:
self.to_email_applicant_check = True
else:
self.to_email_applicant_check = False
def _action_view_documents_filtered(self, view_filter):
"""
function is used for returning send view in
needed recipient tree view
"""
if view_filter == 'sent' and self.temp_id:
res_ids = []
for mass_mailing in self:
mai_data = mass_mailing.sudo()._get_recipients()
res_ids = self.env[self.mailing_model_real].search([('id', '=', mai_data)])
model_name = self.env['ir.model']._get(self.mailing_model_real).display_name
return {
'name': model_name,
'type': 'ir.actions.act_window',
'view_mode': 'tree',
'res_model': self.mailing_model_real,
'domain': [('id', 'in', res_ids.ids)],
'context': dict(self._context, create=False)
}
else:
return super(SendGridEmail, self)._action_view_documents_filtered(view_filter)
def _compute_statistics(self):
"""
function is used for computing Send mails Smart button
count
"""
self.env.cr.execute("""
SELECT
m.id as mailing_id,
COUNT(s.id) AS expected,
COUNT(CASE WHEN s.sent is not null THEN 1 ELSE null END) AS sent,
COUNT(CASE WHEN s.scheduled is not null AND s.sent is null AND s.exception is null AND s.ignored is null AND s.bounced is null THEN 1 ELSE null END) AS scheduled,
COUNT(CASE WHEN s.scheduled is not null AND s.sent is null AND s.exception is null AND s.ignored is not null THEN 1 ELSE null END) AS ignored,
COUNT(CASE WHEN s.sent is not null AND s.exception is null AND s.bounced is null THEN 1 ELSE null END) AS delivered,
COUNT(CASE WHEN s.opened is not null THEN 1 ELSE null END) AS opened,
COUNT(CASE WHEN s.clicked is not null THEN 1 ELSE null END) AS clicked,
COUNT(CASE WHEN s.replied is not null THEN 1 ELSE null END) AS replied,
COUNT(CASE WHEN s.bounced is not null THEN 1 ELSE null END) AS bounced,
COUNT(CASE WHEN s.exception is not null THEN 1 ELSE null END) AS failed
FROM
mailing_trace s
RIGHT JOIN
mailing_mailing m
ON (m.id = s.mass_mailing_id)
WHERE
m.id IN %s
GROUP BY
m.id
""", (tuple(self.ids),))
for row in self.env.cr.dictfetchall():
total = row['expected'] = (row['expected'] - row['ignored']) or 1
row['received_ratio'] = 100.0 * row['delivered'] / total
row['opened_ratio'] = 100.0 * row['opened'] / total
row['clicks_ratio'] = 100.0 * row['clicked'] / total
row['replied_ratio'] = 100.0 * row['replied'] / total
row['bounced_ratio'] = 100.0 * row['bounced'] / total
self.browse(row.pop('mailing_id')).update(row)
for mail in self:
if mail.temp_id:
mail.sent = mail.sent_count
else:
return super(SendGridEmail, self)._compute_statistics()

139
sendgrid_email/models/model.py

@ -0,0 +1,139 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2019-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
# Author: Noushid Khan.P (<https://www.cybrosys.com>)
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
import json
from odoo import models, fields, _
import http.client
from odoo.exceptions import UserError
class SendGridSendEmails(models.Model):
_name = "email.api"
_description = "Email Reports"
name = fields.Char(string="Name")
company_name = fields.Char(string="Company Name")
recipient_name = fields.Char(string="Recipient Name")
to_email = fields.Char(string="Recipient Email ID")
to_email_partner = fields.Many2one("res.partner", string="Recipient Emails")
to_email_partner_check = fields.Boolean()
to_email_lead = fields.Many2one("crm.lead", string="Recipient Emails")
to_email_lead_check = fields.Boolean()
to_email_contact = fields.Many2one("mailing.contact", string="Recipient Emails")
to_email_contact_check = fields.Boolean()
to_email_applicant = fields.Many2one("hr.applicant", string="Recipient Emails")
to_email_applicant_check = fields.Boolean()
from_email = fields.Many2one("email.sent", string="Sender Email")
temp_type = fields.Many2one('email.template', string="Email Template")
temp_id = fields.Char(string="Template_id")
send_date = fields.Datetime(string="Send Date", readonly=True, default=fields.Datetime.now)
error_msg = fields.Text(string="Error Content", readonly=True)
error_check = fields.Boolean()
state = fields.Selection([('send', "Send"), ('error', "Error")], readonly=True, string="State", default='send')
bounce_msg = fields.Text(string="Bounce Message")
email_finder = fields.Integer(string="Email finder")
def bounce_check(self):
"""
function is used for Checking Email Bounce
Status.
"""
conn = http.client.HTTPSConnection("api.sendgrid.com")
payload = "{}"
headers = {'authorization': "Bearer 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"}
conn.request("GET", "/v3/suppression/bounces/" + self.to_email + "", payload, headers)
res = conn.getresponse()
print("res", res)
data = res.read()
print("data1", data)
bounce_msg = json.loads(data.decode("utf-8"))
if bounce_msg:
self.bounce_msg = bounce_msg[0]['reason']
else:
self.bounce_msg = "This Email Is Not Bounced"
def send_error_mails(self):
"""
function is used for Resending Error State
mails.
"""
company_id = self.env.company
api_key = ""
for line in self:
if line.state == 'error':
if not line.temp_id:
raise UserError(_("It Needs A Template ID"))
if line.from_email:
from_email = line.from_email.email_id
else:
from_email = "noreply@johndoe.com"
api_info = self.env['ir.config_parameter'].search(
[('key', '=', "SendGrid API Key " + company_id.name + "")])
if not api_info:
raise UserError(_("It Needs API Key"))
if api_info.company_id.id == self.env.company.id:
api_key = api_info.value
if not api_key and api_key == "":
raise UserError(_("Your Company Needs an API Key"))
conn = http.client.HTTPSConnection("api.sendgrid.com")
to_company = line.company_name
if not to_company:
to_company = ""
temp_id = line.temp_id
payload = ""
if line.to_email and line.recipient_name:
payload = "{\"personalizations\":[{\"to\":[{\"email\":\"" + line.to_email + "\"}],\"dynamic_template_data\":{\"firstname\":\"" + line.recipient_name + "\",\"english\":\"true\",\"company\":\"" + to_company + "\"},\"subject\":\"Official Mail\"}],\"from\":{\"email\":\"" + from_email + "\",},\"template_id\":\"" + temp_id + "\"}"
headers = {
'authorization': "Bearer " + api_key + "",
'content-type': "application/json"
}
conn.request("POST", "/v3/mail/send", payload, headers)
res = conn.getresponse()
data_msg = res.read()
if data_msg.decode("utf-8"):
error_data = json.loads(data_msg.decode("utf-8"))
line.error_msg = error_data['errors'][0]['message']
if not data_msg.decode("utf-8"):
line.state = 'send'
line.error_msg = ""
line.error_check = False
email_id_use = self.env['mailing.mailing'].search([('id', '=', line.email_finder)])
email_id_use.send_grid_check = True
email_id_use.sent_count += 1
email_id_use.write({
'state': 'done'
})

39
sendgrid_email/models/res_config_settings.py

@ -0,0 +1,39 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2019-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
# Author: Noushid Khan.P (<https://www.cybrosys.com>)
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
from odoo import models, fields, api, _
class SendGridApiConfig(models.TransientModel):
_inherit = 'res.config.settings'
send_grid_api_check = fields.Boolean(string="SendGrid API")
send_grid_api_value = fields.Char(string='API key')
def set_values(self):
""" save values in the settings fields """
super(SendGridApiConfig, self).set_values()
company_id = self.env.company
self.env['ir.config_parameter'].sudo().set_param("SendGrid API Key "+company_id.name+"",
self.send_grid_api_value)

4
sendgrid_email/security/ir.model.access.csv

@ -0,0 +1,4 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_email_api,access.email.api,model_email_api,base.group_system,1,1,1,1
access_email_sent,access.email.sent,model_email_sent,base.group_system,1,1,1,1
access_email_template,access.email.template,model_email_template,base.group_system,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_email_api access.email.api model_email_api base.group_system 1 1 1 1
3 access_email_sent access.email.sent model_email_sent base.group_system 1 1 1 1
4 access_email_template access.email.template model_email_template base.group_system 1 1 1 1

BIN
sendgrid_email/static/description/assets/icons/check.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
sendgrid_email/static/description/assets/icons/chevron.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

BIN
sendgrid_email/static/description/assets/icons/cogs.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
sendgrid_email/static/description/assets/icons/consultation.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
sendgrid_email/static/description/assets/icons/ecom-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

BIN
sendgrid_email/static/description/assets/icons/education-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

BIN
sendgrid_email/static/description/assets/icons/hotel-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

BIN
sendgrid_email/static/description/assets/icons/license.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
sendgrid_email/static/description/assets/icons/lifebuoy.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
sendgrid_email/static/description/assets/icons/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
sendgrid_email/static/description/assets/icons/manufacturing-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

BIN
sendgrid_email/static/description/assets/icons/pos-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

BIN
sendgrid_email/static/description/assets/icons/puzzle.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

BIN
sendgrid_email/static/description/assets/icons/restaurant-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

BIN
sendgrid_email/static/description/assets/icons/service-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

BIN
sendgrid_email/static/description/assets/icons/trading-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

BIN
sendgrid_email/static/description/assets/icons/training.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

BIN
sendgrid_email/static/description/assets/icons/update.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
sendgrid_email/static/description/assets/icons/user.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

BIN
sendgrid_email/static/description/assets/icons/wrench.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
sendgrid_email/static/description/assets/modules/approval_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

BIN
sendgrid_email/static/description/assets/modules/budget_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

BIN
sendgrid_email/static/description/assets/modules/export_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
sendgrid_email/static/description/assets/modules/magento_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
sendgrid_email/static/description/assets/modules/pos_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
sendgrid_email/static/description/assets/modules/shopify_image.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
sendgrid_email/static/description/assets/screenshots/bounce-status.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

BIN
sendgrid_email/static/description/assets/screenshots/configuration-check-box.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

BIN
sendgrid_email/static/description/assets/screenshots/configuration-template-menu.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

BIN
sendgrid_email/static/description/assets/screenshots/configuration-text-field.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

BIN
sendgrid_email/static/description/assets/screenshots/error-resent.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
sendgrid_email/static/description/assets/screenshots/error-status.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

BIN
sendgrid_email/static/description/assets/screenshots/from-email-menu.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

BIN
sendgrid_email/static/description/assets/screenshots/from-email-page.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
sendgrid_email/static/description/assets/screenshots/has_addon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

BIN
sendgrid_email/static/description/assets/screenshots/hero.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

BIN
sendgrid_email/static/description/assets/screenshots/is_addon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

BIN
sendgrid_email/static/description/assets/screenshots/mail-test.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

BIN
sendgrid_email/static/description/assets/screenshots/mailing-confirm.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

BIN
sendgrid_email/static/description/assets/screenshots/mailing-mail-body.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

BIN
sendgrid_email/static/description/assets/screenshots/mailing-page-form.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

BIN
sendgrid_email/static/description/assets/screenshots/mailing-page-kanban.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

BIN
sendgrid_email/static/description/assets/screenshots/mailing-report-tree.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

BIN
sendgrid_email/static/description/assets/screenshots/mailing-report.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

BIN
sendgrid_email/static/description/assets/screenshots/mailing-send-grid.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

BIN
sendgrid_email/static/description/assets/screenshots/mailing-state-send.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

BIN
sendgrid_email/static/description/assets/screenshots/mailing-to-email.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

BIN
sendgrid_email/static/description/assets/screenshots/report-page-form.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

BIN
sendgrid_email/static/description/assets/screenshots/smart-button-send.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
sendgrid_email/static/description/assets/screenshots/template-create-template.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

BIN
sendgrid_email/static/description/assets/screenshots/template-create-version.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

BIN
sendgrid_email/static/description/assets/screenshots/template-from-filled.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
sendgrid_email/static/description/assets/screenshots/template-page-form.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

BIN
sendgrid_email/static/description/assets/screenshots/template-page-tree.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
sendgrid_email/static/description/banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
sendgrid_email/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

996
sendgrid_email/static/description/index.html

@ -0,0 +1,996 @@
<div class="container" style="padding: 1rem !important; margin-bottom: 1rem !important;">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12 d-flex justify-content-between"
style="border-bottom: 1px solid #d5d5d5;">
<div class="my-3">
<img src="./assets/icons/logo.png" style="width: auto !important; height: 40px !important;">
</div>
<div class="my-3 d-flex align-items-center">
<div
style="background-color: #7C7BAD !important; color: #fff !important; font-weight: 600 !important; padding: 5px 15px 8px !important; margin: 0 5px !important;">
<i class="fa fa-check mr-1"></i>Community
</div>
<div
style="background-color: #875A7B !important; color: #fff !important; font-weight: 600 !important; padding: 5px 15px 8px !important; margin: 0 5px !important;">
<i class="fa fa-check mr-1"></i>Enterprise
</div>
</div>
</div>
</div>
</div>
<div class="container" style="padding: 0rem 1.5rem 4rem !important">
<div class="row" style="height: 900px !important;">
<div class="col-sm-12 col-md-12 col-lg-12"
style="padding: 4rem 1rem !important; background-color: #714B67 !important; height: 600px !important; border-radius: 20px !important;">
<h1
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #FFFFFF !important; font-size: 3.5rem !important; text-align: center !important;">
Mass Mailing With SendGrid</h1>
<p
style="font-family: 'Montserrat', sans-serif !important; font-weight: 300 !important; color: #FFFFFF !important; font-size: 1.4rem !important; text-align: center !important;">
Mass Mailing using SendGrid API
</p>
<img src="./assets/screenshots/hero.png" class="img-responsive" width="100%" height="auto" />
</div>
</div>
<div class="row">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin-bottom: 2rem !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-compass mr-2"></i>Explore this module
</h2>
</div>
<div class="col-md-6">
<a href="#overview" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Overview</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
Learn more about this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
<div class="col-md-6">
<a href="#features" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Features</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
View features of this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
<div class="col-md-6">
<a href="#screenshots" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Screenshots</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
See key screenshots of this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
<!-- <div class="col-md-6">
<a href="#video" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Video</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
Watch tutorial video on this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div> -->
</div>
<div class="row" id="overview">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-pie-chart mr-2"></i>Overview
</h2>
</div>
<div class="col-mg-12 pl-3">
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important; line-height: 30px !important;">
The module will help send emails through SendGrid Mailing Service. It could be use full for Bulk Mailing. The email templates can create by the user. It work with the API key provided by the user.</p>
</div>
</div>
<div class="row">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-pie-chart mr-2"></i>SendGrid Email Service
</h2>
</div>
<div class="col-mg-12 pl-3">
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important; line-height: 30px !important;">
You need to get a SendGrid API key To use This module</p>
</div>
</div>
<div class="row" id="features">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-star mr-2"></i>Features
</h2>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Configuration</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
It work with using the API Key. It can be set in the configuration</p>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Email Marketing Configuration</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
SendGrid Template Details submenu in Email Marketing configuration using to create email templates.</p>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Storing From Emails</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
SendGrid from emails submenu in email marketing configuration using for storing from emails.</p>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
SendGrid Email</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
In Email Marketing Mailing Form contains a page named SendGrid Email.There we can select the Sending Template.</p>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Sort the Recipient Emails</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
We could Use Recipients field to sort the recipient emails</p>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
SendGrid Button</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Mail can be send by using SendGrid Button in Mailing Form</p>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
SendGrid Send Emails</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
SendGrid Send Emails submenu in Email Marketing Reporting menu can be use for viewing Mail Details</p>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Error Emails</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
In SendGrid Send Emails Will Show the Error Emails and cause of Error in The Record. It also include Mail Bounce Check</p>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Bounce Check</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Bounce Check Button Will show cause of the bounce Email in the page view</p>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Resend Error Emails Button</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Resend Error Emails Button in the action menu can be use for resend the selected error emails</p>
</div>
</div>
</div>
<div class="row" id="screenshots">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important">
<h2
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;">
<i class="fa fa-image mr-2"></i>Screenshots
</h2>
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Email Marketing Configuration</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
In Email Marketing Configuration have a checkbox field SendGrid API by checking it, Will show another Text field
</p>
<img src="assets/screenshots/configuration-check-box.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Once the check box checked It will Show A text field</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Here we can set the API key and click save button. By pressing save button it will save in the system if you
again do the same thing Key will be modify.
</p>
<img src="assets/screenshots/configuration-text-field.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
SendGrid Template Details</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
In Email Marketing Configuration have a sub menu SendGrid Template Details
</p>
<img src="assets/screenshots/configuration-template-menu.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Tree View</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
In Email Template Details show a tree view like below create new template by clicking Create button
</p>
<img src="assets/screenshots/template-page-tree.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Email template form view</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Email template form view is shown in below here you can fill all the fields. You can fill the Email subject and content in the subject field and content box and click the save button.
</p>
<img src="assets/screenshots/template-page-form.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Fill the Form</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
This Form view will be fill like below.
</p>
<img src="assets/screenshots/template-from-filled.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Template create button</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Template create button in using for creating the template.
</p>
<img src="assets/screenshots/template-create-template.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">Create Version button</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
After clicking template create button Template ID will be fill. Using Template ID We can Write the template content by clicking Create Version button.
</p>
<img src="assets/screenshots/template-create-version.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Set the Mail Parameters</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Mailing Page is shown below. Here we can set the mail parameters by clicking Create button
</p>
<img src="assets/screenshots/mailing-page-kanban.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Configure Email Template</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
In mailing form view we can see a page named SendGrid Email, Here we configure email template and other fields. By selecting Email template in the page view, It will be fill Template ID.
</p>
<img src="assets/screenshots/mailing-page-form.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Email Body</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Selecting Email Template field also fill the mail body Of the mailing form.
</p>
<img src="assets/screenshots/mailing-mail-body.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Recipient Field</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Mailing Form View Contains Recipient field it help to select recipient type. Using Domain Filter user can sort needed recipients from the record.
</p>
<img src="assets/screenshots/mailing-to-email.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Send Email</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
After setting Recipients and Template user can send mail by clicking SendGrid button.
</p>
<img src="assets/screenshots/mailing-send-grid.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Confirmation Wizard</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
By clicking SendGrid button it will show a confirmation wizard. In confirmation wizard have two button Ok and Cancel, By clicking Ok button the mail will be sent.
</p>
<img src="assets/screenshots/mailing-confirm.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Draft State to Send State</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
If the mail send to the recipient then the draft state is change to send state. User can see which recipient have send the mails in sent smart button on the mailing form
</p>
<img src="assets/screenshots/mailing-state-send.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
New Mail</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
In mail user can see a new mail like below image.
</p>
<img src="assets/screenshots/mail-test.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Recipient Details</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
By clicking Send smart button it will show a tree view like below, here we can see mailing completed recipient details.
</p>
<img src="assets/screenshots/smart-button-send.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Mailing Details Done by SendGrid Service</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
In Email Marketing Reporting menu have sub menu SendGrid Send Emails, Here user can get the mailing details done by SendGrid Service.
</p>
<img src="assets/screenshots/mailing-report.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
SendGrid Send Emails Tree View</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
By clicking SendGrid Send Emails sub menu, It will show tree view like below. Here the user can see mailing records and it states. </p>
<img src="assets/screenshots/mailing-report-tree.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Send State Record</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Send state record will be look like below. Here we can see a button Bounce Check it can use for checking mail Bounce status.
</p>
<img src="assets/screenshots/report-page-form.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Bounce Status in the Message Page</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
By clicking Bounce Check button it will show bounce status in the Message page in the form view.
</p>
<img src="assets/screenshots/bounce-status.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Error State Record</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Error state record can see below. Here user can see the error cause in the Messages page in the form view.
</p>
<img src="assets/screenshots/error-status.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Resend Mail</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
If any error record occurred it can be resend to that mail. Here action have a button Resend Error Mails , it will be resend mails to the selected error records. If the error record sending completed, The state will be change to Send.
</p>
<img src="assets/screenshots/error-resent.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Storing from Email Records</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">Mailing configuration menu have submenu SendGrid From Email it used form storing from email Records. User can use this from emails on mailing page.
</p>
<img src="assets/screenshots/from-email-menu.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
<div class="col-lg-12 my-3">
<h4 class="mt-3"
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Create New</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
User can create new from email record by clicking on create button on the view.
</p>
<img src="assets/screenshots/from-email-page.png" class="img-responsive img-thumbnail border"
width="100%" height="auto" />
</div>
</div>
<!-- SUGGESTED PRODUCTS -->
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center"
style="text-align: center; padding: 2.5rem 1rem !important;">
<h2 style="color: #212529 !important;">Suggested Products</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
<div id="demo1" class="row carousel slide" data-ride="carousel">
<!-- The slideshow -->
<div class="carousel-inner">
<div class="carousel-item active" style="min-height:0px">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/export_stockinfo_xls/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/export_image.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/dashboard_pos/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/pos_image.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/product_approval_management/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/approval_image.png">
</div>
</a>
</div>
</div>
<div class="carousel-item" style="min-height:0px">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/base_account_budget/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/budget_image.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/shopify_odoo_connector/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/shopify_image.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/14.0/odoo11_magento2/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/magento_image.png">
</div>
</a>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="carousel-control-prev" href="#demo1" data-slide="prev"
style="left:-25px;width: 35px;color: #000;"> <span class="carousel-control-prev-icon"><i
class="fa fa-chevron-left" style="font-size:24px"></i></span> </a> <a
class="carousel-control-next" href="#demo1" data-slide="next"
style="right:-25px;width: 35px;color: #000;">
<span class="carousel-control-next-icon"><i class="fa fa-chevron-right"
style="font-size:24px"></i></span>
</a>
</div>
</div>
</div>
<!-- END OF SUGGESTED PRODUCTS -->
<!-- OUR SERVICES -->
<section class="container" style="margin-top: 6rem !important;">
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Our Services</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/cogs.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Customization</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/wrench.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/lifebuoy.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Support</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/user.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Hire
Odoo
Developer</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #54a0ff !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/puzzle.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Integration</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/update.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Migration</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/consultation.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Consultancy</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/training.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/license.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Licensing Consultancy</h6>
</div>
</div>
</section>
<!-- END OF END OF OUR SERVICES -->
<!-- OUR INDUSTRIES -->
<section class="container" style="margin-top: 6rem !important;">
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Our Industries</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/trading-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Trading
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easily procure
and
sell your products</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/pos-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
POS
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easy
configuration
and convivial experience</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/education-black.png" class="img-responsive mb-3" height="48px"
width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Education
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
A platform for
educational management</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/manufacturing-black.png" class="img-responsive mb-3" height="48px"
width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Manufacturing
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Plan, track and
schedule your operations</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/ecom-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
E-commerce &amp; Website
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Mobile
friendly,
awe-inspiring product pages</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/service-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Service Management
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Keep track of
services and invoice</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/restaurant-black.png" class="img-responsive mb-3" height="48px"
width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Restaurant
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Run your bar or
restaurant methodically</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/hotel-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Hotel Management
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
An
all-inclusive
hotel management application</p>
</div>
</div>
</div>
</section>
<!-- END OF END OF OUR INDUSTRIES -->
<!-- FOOTER -->
<!-- Footer Section -->
<section class="container" style="margin: 5rem auto 2rem;">
<div class="row" style="max-width:1540px;">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Need Help?</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</div>
</div>
<!-- Contact Cards -->
<div class="row d-flex justify-content-center align-items-center"
style="max-width:1540px; margin: 0 auto 2rem auto;">
<div class="col-lg-12" style="padding: 0rem 3rem 2rem; border-radius: 10px; margin-right: 3rem; ">
<div class="row mt-4">
<div class="col-lg-6">
<a href="mailto:odoo@cybrosys.com" target="_blank" class="btn btn-block mb-2 deep_hover"
style="text-decoration: none; background-color: #4d4d4d; color: #FFF; border-radius: 4px;"><i
class="fa fa-envelope mr-2"></i>odoo@cybrosys.com</a>
</div>
<div class="col-lg-6">
<a href="https://api.whatsapp.com/send?phone=918606827707" target="_blank"
class="btn btn-block mb-2 deep_hover"
style="text-decoration: none; background-color: #25D366; color: #FFF; border-radius: 4px;"><i
class="fa fa-whatsapp mr-2"></i>WhatsApp</a>
</div>
</div>
</div>
</div>
<!-- End of Contact Cards -->
</section>
<!-- Footer -->
<section class="oe_container" style="padding: 2rem 3rem 1rem;">
<div class="row" style="max-width:1540px; margin: 0 auto; margin-right: 3rem; ">
<!-- Logo -->
<div class="col-lg-12 d-flex justify-content-center align-items-center" style="margin-top: 3rem;">
<img src="https://www.cybrosys.com/images/logo.png" width="200px" height="auto" />
</div>
<!-- End of Logo -->
<div class="col-lg-12">
<hr
style="margin-top: 3rem;background: linear-gradient(90deg, rgba(2,0,36,0) 0%, rgba(229,229,229,1) 33%, rgba(229,229,229,1) 58%, rgba(0,212,255,0) 100%); height: 2px; border-style: none;">
<!-- End of Footer Section -->
</div>
</div>
</section>
<!-- END OF FOOTER -->
</div>

18
sendgrid_email/views/ir_config_view.xml

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="ir_config_inherit_view" model="ir.ui.view">
<field name="name">company config</field>
<field name="model">ir.config_parameter</field>
<field name="inherit_id" ref="base.view_ir_config_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='value']"
position="after">
<field name="company_id" invisible="1"/>
</xpath>
</field>
</record>
</data>
</odoo>

98
sendgrid_email/views/mail_view.xml

@ -0,0 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="send_mass_mailing_view" model="ir.ui.view">
<field name="name">SendGrid Mass MAil</field>
<field name="model">mailing.mailing</field>
<field name="inherit_id" ref="mass_mailing.view_mail_mass_mailing_form"/>
<field name="arch" type="xml">
<xpath expr="/form/header" position="inside">
<button name="action_send_grid" type="object"
attrs="{'invisible': [('state', 'in', ('in_queue', 'done'))]}" class="oe_highlight"
string="SendGrid"
confirm="This will send the email to all recipients. Do you still want to proceed ?"/>
</xpath>
<xpath expr="/form/sheet/notebook/page[@name='mail_body']"
position="after">
<page string="SendGrid Email" name="send_grid">
<group>
<field name="email_temp"/>
<field name="temp_id"/>
</group>
<group>
<field name="to_email_partner_check" invisible="1"/>
<field name="to_email_lead_check" invisible="1"/>
<field name="to_email_contact_check" invisible="1"/>
<field name="to_email_applicant_check" invisible="1"/>
<field name="to_email_partner" widget="many2many_tags"
attrs="{'invisible': [('to_email_partner_check', '=', False)]}"/>
<field name="to_email_lead" widget="many2many_tags"
attrs="{'invisible': [('to_email_lead_check', '=',False)]}"/>
<field name="to_email_contact" widget="many2many_tags"
attrs="{'invisible': [('to_email_contact_check', '=',False)]}"/>
<field name="to_email_applicant" widget="many2many_tags"
attrs="{'invisible': [('to_email_applicant_check', '=',False)]}"/>
<field name="from_email"/>
<field name="email_finder" invisible="1"/>
<field name="sent_count" invisible="1"/>
<field name="send_grid_check" invisible="1"/>
<field name="temp_check" invisible="1"/>
</group>
</page>
</xpath>
<xpath expr="//button[@name='action_view_delivered']" position="replace">
<button name="action_view_delivered" type="object"
context="{'search_default_filter_delivered': True}"
attrs="{'invisible': ['|',('state', 'in', ('draft','test')),('send_grid_check','=',True)]}"
class="oe_stat_button">
<field name="received_ratio" string="Received" widget="percentpie"/>
</button>
</xpath>
<xpath expr="//button[@name='action_redirect_to_leads_and_opportunities']" position="replace">
<button name="action_redirect_to_leads_and_opportunities" type="object" icon="fa-star" class="oe_stat_button"
groups="sales_team.group_sale_salesman">
<field name="crm_lead_count" string="Leads" widget="statinfo"/>
</button>
</xpath>
<!-- <xpath expr="//button[@name='action_redirect_to_opportunities']" position="replace">-->
<!-- <button name="action_redirect_to_opportunities" type="object" icon="fa-star" class="oe_stat_button"-->
<!-- groups="sales_team.group_sale_salesman"-->
<!-- attrs="{'invisible': ['|','|',('state', '=', 'draft'), ('use_leads', '=', True), ('send_grid_check','=',True)]}">-->
<!-- <field name="crm_opportunities_count" string="Opportunities" widget="statinfo"/>-->
<!-- </button>-->
<!-- </xpath>-->
<xpath expr="//button[@name='action_view_opened']" position="replace">
<button name="action_view_opened" type="object" context="{'search_default_filter_opened': True}"
attrs="{'invisible': ['|',('state', 'in', ('draft','test')),('send_grid_check','=',True)]}"
class="oe_stat_button">
<field name="opened_ratio" string="Opened" widget="percentpie"/>
</button>
</xpath>
<xpath expr="//button[@name='action_view_replied']" position="replace">
<button name="action_view_replied" type="object" context="{'search_default_filter_replied': True}"
attrs="{'invisible': ['|',('state', 'in', ('draft','test')),('send_grid_check','=',True)]}"
class="oe_stat_button">
<field name="replied_ratio" string="Replied" widget="percentpie"/>
</button>
</xpath>
<xpath expr="//button[@name='action_view_bounced']" position="replace">
<button name="action_view_bounced" type="object" context="{'search_default_filter_bounced': True}"
attrs="{'invisible': ['|',('state', 'in', ('draft','test')),('send_grid_check','=',True)]}"
class="oe_stat_button">
<field name="bounced_ratio" string="Bounced" widget="percentpie"/>
</button>
</xpath>
<xpath expr="//field[@name='body_arch']" position="replace">
<field name="body_arch" class="o_mail_body oe_edit_only" widget="mass_mailing_html"
options="{
'snippets': 'mass_mailing.email_designer_snippets',
'cssEdit': 'mass_mailing.iframe_css_assets_edit',
'inline-field': 'body_html'
}" attrs="{'readonly': ['|',('state', 'in', ('sending', 'done')),('temp_check','=', True)]}"/>
</xpath>
</field>
</record>
</data>
</odoo>

37
sendgrid_email/views/res_config_view.xml

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="res_config_settings_send_grid_view_form" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.send.grid</field>
<field name="model">res.config.settings</field>
<field name="priority" eval="70"/>
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[hasclass('settings')]"
position="inside">
<div class="app_settings_block">
<div class="row mt16 o_settings_container">
<div class="col-lg-6 o_setting_box col-12">
<div class="o_setting_left_pane">
<field name="send_grid_api_check"/>
</div>
<div class="o_setting_right_pane">
<label for="send_grid_api_check"/>
<div class="text-muted">
Use API key For SendGrid Service
</div>
<div class="content-group"
attrs="{'invisible': [('send_grid_api_check', '=', False)]}">
<div class="mt16">
<field name="send_grid_api_value"/>
</div>
</div>
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
</data>
</odoo>

218
sendgrid_email/views/view.xml

@ -0,0 +1,218 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="email_sending_action" model="ir.actions.act_window">
<field name="name">Send Emails</field>
<field name="res_model">email.api</field>
<field name="view_mode">tree,form</field>
<field name="context">{'group_by': 'name'}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">Create contacts
</p>
</field>
</record>
<record id="send_emails_tree_view" model="ir.ui.view">
<field name="name">Send Emails tree</field>
<field name="model">email.api</field>
<field name="arch" type="xml">
<tree string="Send Emails" delete="0" create="0">
<field name="name"/>
<field name="to_email"/>
<field name="send_date"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="send_emails_free_view" model="ir.ui.view">
<field name="name">Send Emails Form</field>
<field name="model">email.api</field>
<field name="arch" type="xml">
<form string="Email Details" delete="0" create="0" edit="0">
<header>
<field name="state" widget="statusbar"/>
</header>
<sheet>
<group>
<field name="name"/>
<field name="send_date"/>
</group>
<group>
<field name="temp_type"/>
<field name="temp_id"/>
</group>
<group>
<field name="to_email_partner_check" invisible="1"/>
<field name="to_email_lead_check" invisible="1"/>
<field name="to_email_contact_check" invisible="1"/>
<field name="to_email_applicant_check" invisible="1"/>
<field name="to_email_partner"
attrs="{'invisible': [('to_email_partner_check', '=', False)]}"/>
<field name="to_email_lead" attrs="{'invisible': [('to_email_lead_check', '=',False)]}"/>
<field name="to_email_contact"
attrs="{'invisible': [('to_email_contact_check', '=',False)]}"/>
<field name="to_email_applicant"
attrs="{'invisible': [('to_email_applicant_check', '=',False)]}"/>
<field name="to_email" invisible="1"/>
<field name="company_name" invisible="1"/>
<field name="recipient_name" invisible="1"/>
<field name="email_finder" invisible="1"/>
<field name="from_email"/>
</group>
<group>
<field name="error_check" invisible="1"/>
</group>
<group>
<button string="Bounce Check" name="bounce_check" type="object"
attrs="{'invisible': [('error_check', '=',True)]}"/>
</group>
</sheet>
<notebook>
<page string="Messages">
<field name="bounce_msg" widget="text" attrs="{'invisible': [('error_check', '=',True)]}"/>
<field name="error_msg" widget="text" attrs="{'invisible': [('error_check', '=',False)]}"/>
</page>
</notebook>
</form>
</field>
</record>
<record id='send_emails_search' model='ir.ui.view'>
<field name="name">send.emails.search</field>
<field name="model">email.api</field>
<field name="arch" type="xml">
<search string="Send Emails">
<field name="name"/>
<field name="to_email"/>
<field name="send_date"/>
<field name="state"/>
<group expand="1" string="Group By">
<filter name="groupby_name" context="{'group_by': 'name'}" string="Name"/>
<filter name="groupby_state" context="{'group_by': 'state'}"
string="Email State"/>
</group>
</search>
</field>
</record>
<menuitem id="email_sending_menu"
parent="mass_mailing.menu_mass_mailing_report"
name="SendGrid Send Emails"
action="email_sending_action"/>
<record id="email_details_action" model="ir.actions.act_window">
<field name="name">Email Details</field>
<field name="res_model">email.sent</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">Create Email Details
</p>
</field>
</record>
<record id="email_details_tree_view" model="ir.ui.view">
<field name="name">Email Details tree</field>
<field name="model">email.sent</field>
<field name="arch" type="xml">
<tree string="Email Details">
<field name="name"/>
<field name="email_id"/>
</tree>
</field>
</record>
<record id="email_details_from_view" model="ir.ui.view">
<field name="name">Email Details Form</field>
<field name="model">email.sent</field>
<field name="arch" type="xml">
<form string="Email Details">
<sheet>
<group>
<field name="name"/>
<field name="email_id"/>
</group>
</sheet>
</form>
</field>
</record>
<menuitem id="email_details_menu"
parent="mass_mailing.mass_mailing_configuration"
name="SendGrid From Email"
action="email_details_action"/>
<record id="email_template_action" model="ir.actions.act_window">
<field name="name">Email Template Details</field>
<field name="res_model">email.template</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">Create Email Template Details
</p>
</field>
</record>
<record id="email_template_details_tree_view" model="ir.ui.view">
<field name="name">Email Template Details tree</field>
<field name="model">email.template</field>
<field name="arch" type="xml">
<tree string="Email Template Details">
<field name="temp_name"/>
<field name="generation"/>
</tree>
</field>
</record>
<record id="email_template_details_from_view" model="ir.ui.view">
<field name="name">Email Template Details Form</field>
<field name="model">email.template</field>
<field name="arch" type="xml">
<form string="Email Template Details">
<sheet>
<group>
<field name="temp_name"/>
<field name="generation"/>
</group>
<group>
<field name="ver_name"/>
<field name="ver_editor"/>
</group>
<notebook>
<page string="Email Content">
<label for="ver_subject"/>
<h2 style="display: inline-block;">
<field name="ver_subject" placeholder="Subject (placeholders may be used here)"/>
</h2>
<field name="temp_cont" widget="html" options="{'style-inline': true}"/>
<button string="Create Template" name="create_temp" type="object"/>
<group>
<field name="temp_id"/>
</group>
<button string="Create Version" name="create_ver" type="object"/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="action_auto_sent_error_emails" model="ir.actions.server">
<field name="name">Resend Error Mails</field>
<field name="type">ir.actions.server</field>
<field name="state">code</field>
<field name="model_id" ref="model_email_api"/>
<field name="binding_model_id" ref="model_email_api"/>
<field name="binding_view_types">list</field>
<field name="code">
records.send_error_mails()
</field>
</record>
<menuitem id="email_template_details_menu"
parent="mass_mailing.mass_mailing_configuration"
name="SendGrid Template Details"
action="email_template_action"/>
</data>
</odoo>
Loading…
Cancel
Save