15 changed files with 309 additions and 0 deletions
@ -0,0 +1,11 @@ |
|||
Leave Approval Notification v8 |
|||
============================== |
|||
|
|||
This module will notify the employee via e-mail while his/her leave is approved/rejected. |
|||
|
|||
Credits |
|||
======= |
|||
Cybrosys Techno Solutions |
|||
Author |
|||
------ |
|||
* Cybrosys <www.cybrosys.com> |
@ -0,0 +1,24 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2009-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
|||
# Author: Niyas Raphy(<http://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
import models |
|||
|
@ -0,0 +1 @@ |
|||
import leave_approval_mail |
@ -0,0 +1,44 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2009-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
|||
# Author: Niyas Raphy(<http://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
{ |
|||
'name': 'Leave Approval Notification', |
|||
'summary': """Employee Leave Status Notification""", |
|||
'version': '8.0.1.0.0', |
|||
'description': """Employee will get email notification when his/her leave approved or rejected""", |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'website': 'http://www.cybrosys.com', |
|||
'category': 'Human Resources', |
|||
'depends': ['mail', 'hr_holidays'], |
|||
'license': 'AGPL-3', |
|||
'data': [ |
|||
'views/leave_approval_mail_view.xml', |
|||
], |
|||
'demo': [], |
|||
'images': ['static/description/banner.jpg'], |
|||
'installable': True, |
|||
'auto_install': False, |
|||
|
|||
} |
|||
|
|||
|
@ -0,0 +1,44 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2009-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
|||
# Author: Niyas Raphy(<http://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
{ |
|||
'name': 'Leave Approval Notification', |
|||
'summary': """Employee Leave Status Notification""", |
|||
'version': '0.1', |
|||
'description': """Employee will get email notification when his/her leave approved or rejected""", |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'website': 'http://www.cybrosys.com', |
|||
'category': 'Human Resources', |
|||
'depends': ['mail', 'hr_holidays'], |
|||
'license': 'AGPL-3', |
|||
'data': [ |
|||
'views/leave_approval_mail_view.xml', |
|||
], |
|||
'demo': [], |
|||
'images': ['static/description/banner.jpg'], |
|||
'installable': True, |
|||
'auto_install': False, |
|||
|
|||
} |
|||
|
|||
|
@ -0,0 +1,23 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2009-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
|||
# Author: Niyas Raphy(<http://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
import leave_approval_mail |
@ -0,0 +1,41 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2009-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
|||
# Author: Niyas Raphy(<http://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
from openerp import models |
|||
|
|||
|
|||
class LeaveApproval(models.Model): |
|||
_inherit = 'hr.holidays' |
|||
|
|||
def holidays_validate(self, cr, uid, ids, context=None): |
|||
res = super(LeaveApproval, self).holidays_validate(cr, uid, ids, context=context) |
|||
ir_model_data = self.pool.get('ir.model.data') |
|||
template_id = ir_model_data.get_object_reference(cr, uid, 'leave_approval_mail', 'email_template_leave')[1] |
|||
self.pool.get('email.template').send_mail(cr, uid, template_id, ids[0], force_send=True, context=context) |
|||
return res |
|||
|
|||
def holidays_refuse(self, cr, uid, ids, context=None): |
|||
res = super(LeaveApproval, self).holidays_validate(cr, uid, ids, context=context) |
|||
ir_model_data = self.pool.get('ir.model.data') |
|||
template_id = ir_model_data.get_object_reference(cr, uid, 'leave_approval_mail', 'email_template_leave_rejection')[1] |
|||
self.pool.get('email.template').send_mail(cr, uid, template_id, ids[0], force_send=True, context=context) |
|||
return res |
After Width: | Height: | Size: 160 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 8.7 KiB |
@ -0,0 +1,72 @@ |
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h2 class="oe_slogan">Leave Approval Notification</h2> |
|||
<h3 class="oe_slogan">It Gives notification e-mail to employee</h3> |
|||
<h4 class="oe_slogan">Author : Cybrosys Techno Solutions , www.cybrosys.com</h4> |
|||
<div> |
|||
<h3>Major Features</h3> |
|||
<ul> |
|||
<li style="list-style:none !important;"><span style="color:green;">☑</span>Instant Notification to employee on Leave approval</li> |
|||
<li style="list-style:none !important;"><span style="color:green;"> ☑</span>Instant Notification to employee on Leave rejection</li> |
|||
</ul> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="oe_row oe_spaced oe_dark"> |
|||
<h2 class="oe_slogan">E-mail Notification</h2> |
|||
<div class="oe_span12"> |
|||
<p class='oe_mt32'> |
|||
This module will send a notification mail on approval of employee leave request |
|||
<br/>Mail contains:<br/> * No. of days leave for approved.<br/> * Date of leaves approved.<br/> |
|||
</p> |
|||
<div class="oe_centeralign oe_websiteonly"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section> |
|||
<div class="oe_row oe_spaced"> |
|||
<h4 class="oe_slogan">Leave Request To Approve</h4> |
|||
<div class="oe_span12"> |
|||
<p class='oe_mt32'> |
|||
☛On clicking this Approve button E-mail is send to the employee<br> |
|||
</p> |
|||
<div class="oe_row_img oe_centered"> |
|||
<img class="oe_picture oe_screenshot" src="leave_request.png"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="oe_row oe_spaced oe_dark"> |
|||
<h4 class="oe_slogan">Notification E-Mail</h4> |
|||
<div class="oe_span12"> |
|||
<p class='oe_mt32'> |
|||
☛Received E-mail regarding the approved leave<br> |
|||
</p> |
|||
<div class="oe_row_img oe_centered"> |
|||
<img class="oe_picture oe_screenshot" src="mail_inbox.png"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<h2 class="oe_slogan">Need Any Help?</h2> |
|||
<div class="oe_slogan"> |
|||
<a class="btn btn-primary btn-lg mt8" |
|||
style="color: #FFFFFF !important;" href="http://www.cybrosys.com"><i |
|||
class="fa fa-envelope"></i> Email </a> <a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;" |
|||
href="http://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;" |
|||
href="http://www.cybrosys.com/odoo-customization-and-installation/"><i |
|||
class="fa fa-check-square"></i> Request Customization </a> |
|||
</div> |
|||
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block"> |
|||
</section> |
|||
|
|||
|
|||
|
|||
|
|||
|
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 118 KiB |
@ -0,0 +1,49 @@ |
|||
<?xml version="1.0" ?> |
|||
<openerp> |
|||
<data > |
|||
<record id="email_template_leave" model="email.template"> |
|||
<field name="name">leave approval</field> |
|||
<field name="email_from">test@gmail.com</field> |
|||
<field name="subject">Leave Approved</field> |
|||
<field name="email_to">${object.employee_id.work_email }</field> |
|||
<field name="model_id" ref="hr_holidays.model_hr_holidays"/> |
|||
<field name="body_html"><![CDATA[ |
|||
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; "> |
|||
|
|||
<p>Hello <strong>${object.employee_id.name},</strong> |
|||
Your leave is <strong>approved</strong>. Hope you will be back soon, </p> |
|||
Thank You |
|||
<p><strong>Description:</strong></p> |
|||
<p>leave : ${object.holiday_status_id.name } </p> |
|||
<p> no of days :<strong>${object.number_of_days_temp }</strong></p> |
|||
<p> leave from : ${object.date_from } </p> |
|||
<p> leave upto : ${object.date_to } </p> |
|||
</div> |
|||
]]> |
|||
</field> |
|||
</record> |
|||
|
|||
|
|||
<record id="email_template_leave_rejection" model="email.template"> |
|||
<field name="name">leave rejected</field> |
|||
<field name="email_from">test@gmail.com</field> |
|||
<field name="subject">Leave Rejected</field> |
|||
<field name="email_to">${object.employee_id.work_email }</field> |
|||
<field name="model_id" ref="hr_holidays.model_hr_holidays"/> |
|||
<field name="body_html"><![CDATA[ |
|||
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; "> |
|||
|
|||
<p>Hello <strong>${object.employee_id.name},</strong> |
|||
Your leave is <strong>rejected</strong>.</p> |
|||
Thank You |
|||
<p><strong>Description:</strong></p> |
|||
<p>leave : ${object.holiday_status_id.name } </p> |
|||
<p> no of days requested :<strong>${object.number_of_days_temp }</strong></p> |
|||
<p> leave from : ${object.date_from } </p> |
|||
<p> leave upto : ${object.date_to } </p> |
|||
</div> |
|||
]]> |
|||
</field> |
|||
</record> |
|||
</data> |
|||
</openerp> |
Loading…
Reference in new issue