13 changed files with 391 additions and 0 deletions
@ -0,0 +1,33 @@ |
|||
============== |
|||
Event Mail v10 |
|||
============== |
|||
Event mail adds the functionality to send email notification to the customer at the time of event order confirmation. |
|||
|
|||
Features |
|||
======== |
|||
* Customize your own templates for mail. |
|||
* Default template for order confirmation. |
|||
* Send notification email to customer when an event order is confirmed. |
|||
|
|||
License |
|||
======= |
|||
GNU LESSER GENERAL PUBLIC LICENSE, Version 3 (LGPLv3) |
|||
(http://www.gnu.org/licenses/agpl.html) |
|||
|
|||
Bug Tracker |
|||
=========== |
|||
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. |
|||
|
|||
|
|||
Contributors |
|||
============ |
|||
|
|||
* Avinash Nk <avinash@cybrosys.in> |
|||
|
|||
|
|||
Maintainer |
|||
========== |
|||
|
|||
This module is maintained by Cybrosys Technologies. |
|||
|
|||
For support and more information, please visit https://www.cybrosys.com |
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Avinash Nk(<avinash@cybrosys.in>) |
|||
# |
|||
# 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 |
@ -0,0 +1,42 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Avinash Nk(<avinash@cybrosys.in>) |
|||
# |
|||
# 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': 'Event Mail', |
|||
'version': '10.0.1.0.0', |
|||
'summary': """Send Email Notification to the Customer at the Time of Event Order Confirmation.""", |
|||
'description': """Send Email Notification to the Customer at the Time of Event Order Confirmation.""", |
|||
"category": "Tools", |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'maintainer': 'Cybrosys Techno Solutions', |
|||
'website': "https://www.cybrosys.com", |
|||
'depends': ['event_management'], |
|||
'data': ['data/event_mail_template.xml', |
|||
'views/event_mail.xml', |
|||
], |
|||
'demo': [ |
|||
], |
|||
'images': ['static/description/banner.jpg'], |
|||
'license': 'AGPL-3', |
|||
'installable': True, |
|||
'application': False, |
|||
} |
@ -0,0 +1,113 @@ |
|||
<?xml version="1.0" ?> |
|||
<odoo> |
|||
|
|||
<!-- Mail template are declared in a NOUPDATE block |
|||
so users can freely customize/delete them --> |
|||
<data noupdate="1"> |
|||
<!--Email template --> |
|||
<record id="email_template_event" model="mail.template"> |
|||
<field name="name">Event Confirmation - Send by Email</field> |
|||
<field name="email_from">${(object.create_uid.email and '%s <%s>' % (object.create_uid.name, object.create_uid.email) or '')|safe}</field> |
|||
<field name="subject">${object.create_uid.company_id.name} Event Confirmation (Ref ${object.name or 'n/a'})</field> |
|||
<field name="partner_to">${object.partner_id.id}</field> |
|||
<field name="model_id" ref="event_management.model_event_management"/> |
|||
<field name="reply_to">${object.create_uid.email|safe}</field> |
|||
<field name="auto_delete" eval="True"/> |
|||
<field name="report_name">Event_${(object.name or '').replace('/','_')}}</field> |
|||
<field name="lang">${object.partner_id.lang}</field> |
|||
<field name="body_html"><![CDATA[ |
|||
<p>Dear ${object.partner_id.name} |
|||
% if object.partner_id.parent_id: |
|||
(<i>${object.partner_id.parent_id.name}</i>) |
|||
% endif |
|||
,</p> |
|||
<p>Your event order is confirmed.<strong>(${object.name})</strong></p> |
|||
<p>Thank you,</p> |
|||
% if object.create_uid and object.create_uid.signature: |
|||
${object.create_uid.signature | safe} |
|||
% endif |
|||
]]></field> |
|||
</record> |
|||
|
|||
<!--Default Notification Email template for event confirmation--> |
|||
<record id="event_management.mail_template_event_confirmation" model="mail.template"> |
|||
<field name="name">Event Confirmation Email</field> |
|||
<field name="subject">${object.subject}</field> |
|||
<field name="model_id" ref="mail.model_mail_message"/> |
|||
<field name="auto_delete" eval="True"/> |
|||
<field name="body_html"><![CDATA[<html> |
|||
<head></head> |
|||
% set record = ctx.get('record') |
|||
% set company = record and record.company_id or user.company_id |
|||
<body style="margin: 0; padding: 0;"> |
|||
<table border="0" width="100%" cellpadding="0" bgcolor="#ededed" style="padding: 20px; background-color: #ededed" summary="o_mail_notification"> |
|||
<tbody> |
|||
|
|||
<!-- HEADER --> |
|||
<tr> |
|||
<td align="center" style="min-width: 590px;"> |
|||
<table width="590" border="0" cellpadding="0" bgcolor="#875A7B" style="min-width: 590px; background-color: rgb(135,90,123); padding: 20px;"> |
|||
<tr> |
|||
<td valign="middle"> |
|||
<span style="font-size:20px; color:white; font-weight: bold;"> |
|||
Event ${object.record_name} |
|||
</span> |
|||
</td> |
|||
<td valign="middle" align="right"> |
|||
<img src="/logo.png?company=${company.id}" style="padding: 0px; margin: 0px; height: auto; width: 80px;" alt="${company.name}"> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
|
|||
<!-- CONTENT --> |
|||
<tr> |
|||
<td align="center" style="min-width: 590px;"> |
|||
<table width="590" border="0" cellpadding="0" bgcolor="#ffffff" style="min-width: 590px; background-color: rgb(255, 255, 255); padding: 20px;"> |
|||
<tbody> |
|||
<td valign="top" style="font-family:Arial,Helvetica,sans-serif; color: #555; font-size: 14px;"> |
|||
${object.body | safe} |
|||
</td> |
|||
</tbody> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
|
|||
<!-- FOOTER --> |
|||
<tr> |
|||
<td align="center" style="min-width: 590px;"> |
|||
<table width="590" border="0" cellpadding="0" bgcolor="#875A7B" style="min-width: 590px; background-color: rgb(135,90,123); padding: 20px;"> |
|||
<tr> |
|||
<td valign="middle" align="left" style="color: #fff; padding-top: 10px; padding-bottom: 10px; font-size: 12px;"> |
|||
${company.name}<br/> |
|||
${company.phone or ''} |
|||
</td> |
|||
<td valign="middle" align="right" style="color: #fff; padding-top: 10px; padding-bottom: 10px; font-size: 12px;"> |
|||
% if company.email: |
|||
<a href="mailto:${company.email}" style="text-decoration:none; color: white;">${company.email}</a><br/> |
|||
% endif |
|||
% if company.website: |
|||
<a href="${company.website}" style="text-decoration:none; color: white;"> |
|||
${company.website} |
|||
</a> |
|||
% endif |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td align="center"> |
|||
Powered by <a href="https://www.odoo.com">Odoo</a>. |
|||
</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</body> |
|||
</html> |
|||
]]></field> |
|||
</record> |
|||
|
|||
</data> |
|||
</odoo> |
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Avinash Nk(<avinash@cybrosys.in>) |
|||
# |
|||
# 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 event_mail |
@ -0,0 +1,64 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Avinash Nk(<avinash@cybrosys.in>) |
|||
# |
|||
# 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 EventManagementMail(models.Model): |
|||
_inherit = 'event.management' |
|||
|
|||
sent = fields.Boolean(string="Sent", copy=False, help="It indicates that the mail has been sent.") |
|||
|
|||
@api.multi |
|||
def send_confirmation_mail(self): |
|||
""" Open a window to compose an email, with the event mail template |
|||
message loaded by default |
|||
""" |
|||
self.ensure_one() |
|||
template = self.env.ref('event_mail.email_template_event', False) |
|||
compose_form = self.env.ref('mail.email_compose_message_wizard_form', False) |
|||
ctx = dict( |
|||
default_model='event.management', |
|||
default_res_id=self.id, |
|||
default_use_template=bool(template), |
|||
default_template_id=template and template.id or False, |
|||
default_composition_mode='comment', |
|||
mark_invoice_as_sent=True, |
|||
custom_layout="event_mail.mail_template_event_confirmation" |
|||
) |
|||
return { |
|||
'name': _('Compose Email'), |
|||
'type': 'ir.actions.act_window', |
|||
'view_type': 'form', |
|||
'view_mode': 'form', |
|||
'res_model': 'mail.compose.message', |
|||
'views': [(compose_form.id, 'form')], |
|||
'view_id': compose_form.id, |
|||
'target': 'new', |
|||
'context': ctx, |
|||
} |
|||
|
|||
@api.model |
|||
def message_get_reply_to(self, res_ids, default=None): |
|||
event = self.sudo().browse(res_ids) |
|||
reply_to = event.create_uid.email |
|||
event.write({'sent': True}) |
|||
return {res_ids[0]: reply_to} |
After Width: | Height: | Size: 79 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 82 KiB |
After Width: | Height: | Size: 81 KiB |
@ -0,0 +1,74 @@ |
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<h2 class="oe_slogan">Event Mail</h2> |
|||
<h3 class="oe_slogan">Email Notification for customers at the time of event order confirmation.</h3> |
|||
<h4 class="oe_slogan"><a href="https://www.cybrosys.com">Cybrosys Technologies</a> </h4> |
|||
</div> |
|||
<div class="oe_row oe_spaced"> |
|||
<h4><p style="margin-left: 42px;">Major Features:</p></h4> |
|||
<ul> |
|||
<li style="list-style:none !important;"><span style="color:green;"> ★</span> Customize your own templates for mail.</li> |
|||
<li style="list-style:none !important;"><span style="color:green;"> ★</span> Default template for order confirmation.</li> |
|||
<li style="list-style:none !important;"><span style="color:green;"> ★</span> Send notification email to customer when an event order is confirmed.</li> |
|||
</ul> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_picture"> |
|||
<h3 class="oe_slogan">Overview</h3> |
|||
<p class="oe_mt32">Event mail adds the functionality to send email notification to the customer at the time of event order confirmation.</p> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<p><h1>Mail Button</h1> </p> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<img src="event_mail_button.png"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<p><h1>Mail Wizard</h1> </p> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<img src="event_mail_wizard.png"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2> |
|||
<div class="oe_slogan" style="margin-top:10px !important;"> |
|||
<div> |
|||
<a class="btn btn-primary btn-lg mt8" |
|||
style="color: #FFFFFF !important;border-radius: 0;" href="https://www.cybrosys.com"><i |
|||
class="fa fa-envelope"></i> Email </a> <a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.cybrosys.com/contact/"><i |
|||
class="fa fa-phone"></i> Contact Us </a> <a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.cybrosys.com/odoo-customization-and-installation/"><i |
|||
class="fa fa-check-square"></i> Request Customization </a> |
|||
</div> |
|||
<br> |
|||
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block"> |
|||
<div> |
|||
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></td> |
|||
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></td> |
|||
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></td> |
|||
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;"></i></a></td> |
|||
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;"></i></a></td> |
|||
</div> |
|||
</div> |
|||
</section> |
After Width: | Height: | Size: 34 KiB |
@ -0,0 +1,21 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
|
|||
<record id="event_management_form_view_mail" model="ir.ui.view"> |
|||
<field name="name">event_management_form_view_mail.form</field> |
|||
<field name="model">event.management</field> |
|||
<field name="inherit_id" ref="event_management.event_management_form_view"/> |
|||
<field name="arch" type="xml"> |
|||
<header position="inside"> |
|||
<button name="send_confirmation_mail" string="Send Mail" type="object" class="oe_highlight" attrs="{'invisible': ['|', ('sent','=',True), ('state', 'not in', ['confirm'])]}"/> |
|||
<button name="send_confirmation_mail" string="Send Mail" type="object" attrs="{'invisible': ['|', ('sent','=',False), ('state', 'not in', ['confirm'])]}"/> |
|||
</header> |
|||
|
|||
<field name="partner_id" position="after"> |
|||
<field name="sent" invisible="1"/> |
|||
</field> |
|||
|
|||
</field> |
|||
</record> |
|||
|
|||
</odoo> |
Loading…
Reference in new issue