@ -1,17 +0,0 @@ |
|||||
Access Restriction By IP V11 |
|
||||
============================ |
|
||||
|
|
||||
This module will restrict users access to his account from the specified IP only. If user access his |
|
||||
account from non-specified IP, login will be restricted and a warning message will be displayed in |
|
||||
login page. |
|
||||
|
|
||||
If no IP is specified for a user, then there will not be restriction by IP. He can access from any IP. |
|
||||
|
|
||||
|
|
||||
Credits |
|
||||
======= |
|
||||
Cybrosys Techno Solutions |
|
||||
|
|
||||
Author |
|
||||
------ |
|
||||
* Niyas Raphy <niyas@cybrosys.in> |
|
@ -1,26 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Cybrosys Technologies Pvt. Ltd. |
|
||||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|
||||
# Author: Niyas Raphy(<https://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 controllers |
|
||||
import models |
|
||||
|
|
||||
|
|
@ -1,42 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Cybrosys Technologies Pvt. Ltd. |
|
||||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|
||||
# Author: Niyas Raphy(<https://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': 'Access Restriction By IP', |
|
||||
'summary': """User Can Access His Account Only From Specified IP Address""", |
|
||||
'version': '11.0.1.0.0', |
|
||||
'description': """User Can Access His Account Only From Specified IP Address""", |
|
||||
'author': 'Cybrosys Techno Solutions', |
|
||||
'company': 'Cybrosys Techno Solutions', |
|
||||
'website': 'https://www.cybrosys.com', |
|
||||
'category': 'Tools', |
|
||||
'depends': ['base', 'mail'], |
|
||||
'license': 'AGPL-3', |
|
||||
'data': [ |
|
||||
'views/allowed_ips_view.xml', |
|
||||
], |
|
||||
'images': ['static/description/banner.jpg'], |
|
||||
'demo': [], |
|
||||
'installable': True, |
|
||||
'auto_install': False, |
|
||||
} |
|
||||
|
|
@ -1,24 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Cybrosys Technologies Pvt. Ltd. |
|
||||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|
||||
# Author: Niyas Raphy(<https://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 main |
|
||||
|
|
@ -1,80 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Cybrosys Technologies Pvt. Ltd. |
|
||||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|
||||
# Author: Niyas Raphy(<https://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 odoo.addons.web.controllers import main |
|
||||
from odoo.http import request |
|
||||
from odoo.exceptions import Warning |
|
||||
import odoo |
|
||||
import odoo.modules.registry |
|
||||
from odoo.tools.translate import _ |
|
||||
from odoo import http |
|
||||
|
|
||||
|
|
||||
class Home(main.Home): |
|
||||
|
|
||||
@http.route('/web/login', type='http', auth="public") |
|
||||
def web_login(self, redirect=None, **kw): |
|
||||
main.ensure_db() |
|
||||
request.params['login_success'] = False |
|
||||
if request.httprequest.method == 'GET' and redirect and request.session.uid: |
|
||||
return http.redirect_with_hash(redirect) |
|
||||
|
|
||||
if not request.uid: |
|
||||
request.uid = odoo.SUPERUSER_ID |
|
||||
|
|
||||
values = request.params.copy() |
|
||||
try: |
|
||||
values['databases'] = http.db_list() |
|
||||
except odoo.exceptions.AccessDenied: |
|
||||
values['databases'] = None |
|
||||
if request.httprequest.method == 'POST': |
|
||||
old_uid = request.uid |
|
||||
ip_address = request.httprequest.environ['REMOTE_ADDR'] |
|
||||
if request.params['login']: |
|
||||
user_rec = request.env['res.users'].sudo().search([('login', '=', request.params['login'])]) |
|
||||
if user_rec.allowed_ips: |
|
||||
ip_list = [] |
|
||||
for rec in user_rec.allowed_ips: |
|
||||
ip_list.append(rec.ip_address) |
|
||||
if ip_address in ip_list: |
|
||||
uid = request.session.authenticate(request.session.db, request.params['login'], request.params['password']) |
|
||||
if uid is not False: |
|
||||
request.params['login_success'] = True |
|
||||
if not redirect: |
|
||||
redirect = '/web' |
|
||||
return http.redirect_with_hash(redirect) |
|
||||
request.uid = old_uid |
|
||||
values['error'] = _("Wrong login/password") |
|
||||
request.uid = old_uid |
|
||||
values['error'] = _("Not allowed to login from this IP") |
|
||||
else: |
|
||||
uid = request.session.authenticate(request.session.db, request.params['login'], |
|
||||
request.params['password']) |
|
||||
if uid is not False: |
|
||||
request.params['login_success'] = True |
|
||||
if not redirect: |
|
||||
redirect = '/web' |
|
||||
return http.redirect_with_hash(redirect) |
|
||||
request.uid = old_uid |
|
||||
values['error'] = _("Wrong login/password") |
|
||||
|
|
||||
return request.render('web.login', values) |
|
@ -1,25 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Cybrosys Technologies Pvt. Ltd. |
|
||||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|
||||
# Author: Niyas Raphy(<https://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 allowed_ips |
|
||||
|
|
||||
|
|
@ -1,36 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Cybrosys Technologies Pvt. Ltd. |
|
||||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|
||||
# Author: Niyas Raphy(<https://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 odoo import models, fields |
|
||||
|
|
||||
|
|
||||
class ResUsersInherit(models.Model): |
|
||||
_inherit = 'res.users' |
|
||||
|
|
||||
allowed_ips = fields.One2many('allowed.ips', 'users_ip', string='IP') |
|
||||
|
|
||||
|
|
||||
class AllowedIPs(models.Model): |
|
||||
_name = 'allowed.ips' |
|
||||
|
|
||||
users_ip = fields.Many2one('res.users', string='IP') |
|
||||
ip_address = fields.Char(string='Allowed IP') |
|
Before Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 133 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 32 KiB |
@ -1,69 +0,0 @@ |
|||||
<section class="oe_container"> |
|
||||
<div class="oe_row oe_spaced"> |
|
||||
<h2 class="oe_slogan">Access Restriction By IP</h2> |
|
||||
<h3 class="oe_slogan">User can access his account only from specified IP's</h3> |
|
||||
<h4 class="oe_slogan"><a href="https://www.cybrosys.com">Cybrosys Technologies</a> </h4> |
|
||||
<div> |
|
||||
<p>This module will restrict the users access to his account from specified IP address only</p> |
|
||||
</div> |
|
||||
<div> |
|
||||
<h4><p>Features:</p></h4> |
|
||||
<ul> |
|
||||
<li style="list-style:none !important;"><span style="color:green;"> ☑</span> Administrator can set a IP or a group of IP address for each users </li> |
|
||||
<li style="list-style:none !important;"><span style="color:green;"> ☑</span> Users can access their account only from the specified IP's</li> |
|
||||
<li style="list-style:none !important;"><span style="color:green;"> ☑</span> Accessing system from a non-specified IP will restrict the user login</li> |
|
||||
<li style="list-style:none !important;"><span style="color:green;"> ☑</span> A warning message will be displayed</li> |
|
||||
<li style="list-style:none !important;"><span style="color:green;"> ☑</span> If no IP is set to user means there is no any restriction by IP</li> |
|
||||
<li style="list-style:none !important;"><span style="color:green;"> ☑</span> IP Address for each users can be set from users form view</li> |
|
||||
</ul> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section> |
|
||||
|
|
||||
<section class="oe_container oe_dark"> |
|
||||
<div class="oe_row oe_spaced"> |
|
||||
<h4 class="oe_slogan">Setting IP address for User</h4> |
|
||||
<div class="oe_span12"> |
|
||||
<p>Setting IP address for user from users form view </p> |
|
||||
<p>User will be able to access his account only from this IP's</p> |
|
||||
<div class="oe_row_img oe_centered"> |
|
||||
<img style="border:10px solid white;" class="oe_picture oe_screenshot" src="user_set_ip.png"> |
|
||||
</div> |
|
||||
</div> |
|
||||
<h4 class="oe_slogan">User accessing his account</h4> |
|
||||
<div class="oe_span12"> |
|
||||
<p>On accessing account from a non specified IP</p> |
|
||||
<div class="oe_row_img oe_centered"> |
|
||||
<img style="border:10px solid white;" class="oe_picture oe_screenshot" src="access_non_set_ip.png"> |
|
||||
</div> |
|
||||
<p>Warning message will be displayed</p> |
|
||||
</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> |
|
@ -1,82 +0,0 @@ |
|||||
<section class="oe_container"> |
|
||||
<div class="oe_spaced"> |
|
||||
<h2 class="oe_slogan">Birthday Notification By E-mail</h2> |
|
||||
<h3 class="oe_slogan">This module will wish the employees on their birthday</h3> |
|
||||
|
|
||||
<h4 class="oe_slogan">Author : Cybrosys Techno Solutions , www.cybrosys.com</h4> |
|
||||
<div style="padding-left:66px;"> |
|
||||
<h4>Features:</h4> |
|
||||
<ul> |
|
||||
<li style="list-style:none !important;"><span style="color:green;"> →</span> Adds a cron job to invoke email</li> |
|
||||
<li style="list-style:none !important;"><span style="color:green;"> →</span> Adds an email template</li> |
|
||||
</ul> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section> |
|
||||
|
|
||||
<section class="oe_container oe_dark"> |
|
||||
<div class="oe_spaced"> |
|
||||
<div class="oe_picture"> |
|
||||
<h3 class="oe_slogan">Overview</h3> |
|
||||
<p class="oe_mt32"> |
|
||||
HR departments need not worry to wish their employees for their Birthday. In this module we have included the feature to send an email Birthday notification to the employee. |
|
||||
</p> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section> |
|
||||
|
|
||||
<section class="oe_container"> |
|
||||
<div class="oe_row oe_spaced"> |
|
||||
<h4 class="oe_slogan">Employee Form</h4> |
|
||||
<div class="oe_span12"> |
|
||||
<p class='oe_mt32'> |
|
||||
☛ Give Date of Birth for employee.<br> |
|
||||
☛ Give work email.<br> |
|
||||
</p> |
|
||||
<div class="oe_row_img oe_centered"> |
|
||||
<img class="oe_picture oe_screenshot" src="birthday_1.png"> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section> |
|
||||
|
|
||||
<section class="oe_container"> |
|
||||
<div class="oe_row oe_spaced"> |
|
||||
<h4 class="oe_slogan">Email Template</h4> |
|
||||
<div class="oe_span12"> |
|
||||
<p class='oe_mt32'> |
|
||||
☛ The cron job will invoke the email<br> |
|
||||
☛ Email template is very simple<br> |
|
||||
</p> |
|
||||
<div class="oe_row_img oe_centered"> |
|
||||
<img class="oe_picture oe_screenshot" src="temp.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="http://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="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;border-radius: 0;" |
|
||||
href="http://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> |
|
Before Width: | Height: | Size: 24 KiB |
@ -1,21 +0,0 @@ |
|||||
<?xml version="1.0" encoding="utf-8" ?> |
|
||||
<odoo> |
|
||||
<data> |
|
||||
<record model="ir.ui.view" id="res_users_allowed_ips"> |
|
||||
<field name="name">res.users</field> |
|
||||
<field name="model">res.users</field> |
|
||||
<field name="inherit_id" ref="base.view_users_form"/> |
|
||||
<field name="arch" type="xml"> |
|
||||
<xpath expr="//page[1]" position='after'> |
|
||||
<page string="Allowed IP"> |
|
||||
<field name="allowed_ips"> |
|
||||
<tree editable="bottom"> |
|
||||
<field name="ip_address"/> |
|
||||
</tree> |
|
||||
</field> |
|
||||
</page> |
|
||||
</xpath> |
|
||||
</field> |
|
||||
</record> |
|
||||
</data> |
|
||||
</odoo> |
|
@ -1,13 +0,0 @@ |
|||||
Hide Product Cost Price v11 |
|
||||
=========================== |
|
||||
The cost price of the product will be only visible for the users added in the group "view cost price". |
|
||||
If user is not there in the group, the cost price of the product will remain invisible for the user. |
|
||||
By default administrator will be added to this group |
|
||||
|
|
||||
Credits |
|
||||
======= |
|
||||
Cybrosys Techno Solutions |
|
||||
|
|
||||
Author |
|
||||
------ |
|
||||
* Niyas Raphy <niyas@cybosys.in> |
|
@ -1,22 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Cybrosys Technologies Pvt. Ltd. |
|
||||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|
||||
# Author: Niyas Raphy(<https://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/>. |
|
||||
# |
|
||||
############################################################################## |
|
@ -1,43 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Cybrosys Technologies Pvt. Ltd. |
|
||||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|
||||
# Author: Niyas Raphy(<https://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': 'Hide Product Cost Price', |
|
||||
'summary': """Product Cost Price Will be Visible Only for Specified Group""", |
|
||||
'version': '11.0.1.0.0', |
|
||||
'description': """Product cost price will be visible only for specified group""", |
|
||||
'author': 'Cybrosys Techno Solutions', |
|
||||
'company': 'Cybrosys Techno Solutions', |
|
||||
'website': 'https://www.cybrosys.com', |
|
||||
'category': 'Sales', |
|
||||
'depends': ['base', 'purchase'], |
|
||||
'license': 'AGPL-3', |
|
||||
'data': [ |
|
||||
'security/view_cost_price.xml', |
|
||||
'views/hide_product_cost.xml' |
|
||||
], |
|
||||
'images': ['static/description/banner.jpg'], |
|
||||
'demo': [], |
|
||||
'installable': True, |
|
||||
'auto_install': False, |
|
||||
|
|
||||
} |
|
@ -1,43 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Cybrosys Technologies Pvt. Ltd. |
|
||||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://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': 'Hide Product Cost Price', |
|
||||
'summary': """Product Cost Price Will be Visible Only for Specified Users in the Group""", |
|
||||
'version': '10.0.1.0.0', |
|
||||
'description': """Product cost price will be visible only users in group""", |
|
||||
'author': 'Cybrosys Techno Solutions', |
|
||||
'company': 'Cybrosys Techno Solutions', |
|
||||
'website': 'http://www.cybrosys.com', |
|
||||
'category': 'Sales', |
|
||||
'depends': ['base', 'purchase'], |
|
||||
'license': 'AGPL-3', |
|
||||
'data': [ |
|
||||
'security/view_cost_price.xml', |
|
||||
'views/hide_product_cost.xml' |
|
||||
], |
|
||||
'images': ['static/description/banner.jpg'], |
|
||||
'demo': [], |
|
||||
'installable': True, |
|
||||
'auto_install': False, |
|
||||
|
|
||||
} |
|
@ -1,9 +0,0 @@ |
|||||
<?xml version="1.0"?> |
|
||||
<odoo> |
|
||||
<data> |
|
||||
<record id="view_cost_price" model="res.groups"> |
|
||||
<field name="name">View Cost Price</field> |
|
||||
<field name="users" eval="[(4, ref('base.user_root'))]"/> |
|
||||
</record> |
|
||||
</data> |
|
||||
</odoo> |
|
Before Width: | Height: | Size: 120 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 16 KiB |
@ -1,75 +0,0 @@ |
|||||
<section class="oe_container"> |
|
||||
<div class="oe_row oe_spaced"> |
|
||||
<h2 class="oe_slogan">Hide Product Cost Price</h2> |
|
||||
<h3 class="oe_slogan">Cost price will be visible only for selected users</h3> |
|
||||
<h4 class="oe_slogan"><a href="https://www.cybrosys.com">Cybrosys Technologies</a> </h4> |
|
||||
<div> |
|
||||
<p>This module will create a new group and the users added in this group can only view the |
|
||||
cost price of the product</p> |
|
||||
</div> |
|
||||
<div> |
|
||||
<h4><p>Features:</p></h4> |
|
||||
<ul> |
|
||||
<li style="list-style:none !important;"><span style="color:green;"> ☑</span> Cost price visibility restricted</li> |
|
||||
<li style="list-style:none !important;"><span style="color:green;"> ☑</span> Visible only for the users in the group</li> |
|
||||
<li style="list-style:none !important;"><span style="color:green;"> ☑</span> By default administrator will be added to this group</li> |
|
||||
</ul> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section> |
|
||||
|
|
||||
<section class="oe_container oe_dark"> |
|
||||
<div class="oe_row oe_spaced"> |
|
||||
<h4 class="oe_slogan">Working</h4> |
|
||||
<div class="oe_span12"> |
|
||||
<strong><p>Adding user to the View Cost Price group</p></strong> |
|
||||
<p>User will see the product cost price only if he is added in this group</p> |
|
||||
<div class="oe_row_img oe_centered"> |
|
||||
<img style="border:10px solid white;" class="oe_picture oe_screenshot" src="user_adding_group.png"> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
<div class="oe_span12"> |
|
||||
<strong><p>Product View for users not in the Group</p></strong> |
|
||||
<div class="oe_row_img oe_centered"> |
|
||||
<p>Product form view without cost price</p> |
|
||||
<div class="oe_row_img oe_centered"> |
|
||||
<a href="https://www.cybrosys.com"> |
|
||||
<img style="border:10px solid white;" class="oe_picture oe_screenshot" src="product_form_view.png"> |
|
||||
</a> |
|
||||
</div> |
|
||||
<p>Product tree view without cost price</p> |
|
||||
<div class="oe_row_img oe_centered"> |
|
||||
<img style="border:10px solid white;" class="oe_picture oe_screenshot" src="product_tree_view.png"> |
|
||||
</div> |
|
||||
</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> |
|
@ -1,82 +0,0 @@ |
|||||
<section class="oe_container"> |
|
||||
<div class="oe_spaced"> |
|
||||
<h2 class="oe_slogan">Birthday Notification By E-mail</h2> |
|
||||
<h3 class="oe_slogan">This module will wish the employees on their birthday</h3> |
|
||||
|
|
||||
<h4 class="oe_slogan">Author : Cybrosys Techno Solutions , www.cybrosys.com</h4> |
|
||||
<div style="padding-left:66px;"> |
|
||||
<h4>Features:</h4> |
|
||||
<ul> |
|
||||
<li style="list-style:none !important;"><span style="color:green;"> →</span> Adds a cron job to invoke email</li> |
|
||||
<li style="list-style:none !important;"><span style="color:green;"> →</span> Adds an email template</li> |
|
||||
</ul> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section> |
|
||||
|
|
||||
<section class="oe_container oe_dark"> |
|
||||
<div class="oe_spaced"> |
|
||||
<div class="oe_picture"> |
|
||||
<h3 class="oe_slogan">Overview</h3> |
|
||||
<p class="oe_mt32"> |
|
||||
HR departments need not worry to wish their employees for their Birthday. In this module we have included the feature to send an email Birthday notification to the employee. |
|
||||
</p> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section> |
|
||||
|
|
||||
<section class="oe_container"> |
|
||||
<div class="oe_row oe_spaced"> |
|
||||
<h4 class="oe_slogan">Employee Form</h4> |
|
||||
<div class="oe_span12"> |
|
||||
<p class='oe_mt32'> |
|
||||
☛ Give Date of Birth for employee.<br> |
|
||||
☛ Give work email.<br> |
|
||||
</p> |
|
||||
<div class="oe_row_img oe_centered"> |
|
||||
<img class="oe_picture oe_screenshot" src="birthday_1.png"> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section> |
|
||||
|
|
||||
<section class="oe_container"> |
|
||||
<div class="oe_row oe_spaced"> |
|
||||
<h4 class="oe_slogan">Email Template</h4> |
|
||||
<div class="oe_span12"> |
|
||||
<p class='oe_mt32'> |
|
||||
☛ The cron job will invoke the email<br> |
|
||||
☛ Email template is very simple<br> |
|
||||
</p> |
|
||||
<div class="oe_row_img oe_centered"> |
|
||||
<img class="oe_picture oe_screenshot" src="temp.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="http://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="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;border-radius: 0;" |
|
||||
href="http://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> |
|
Before Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 20 KiB |
@ -1,29 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<odoo> |
|
||||
<data> |
|
||||
<record model="ir.ui.view" id="product_form_hide_cost"> |
|
||||
<field name="name">product.template.cost</field> |
|
||||
<field name="model">product.template</field> |
|
||||
<field name="inherit_id" ref="product.product_template_only_form_view"/> |
|
||||
<field name="arch" type="xml"> |
|
||||
<xpath expr="//label[@for='standard_price']" position="attributes"> |
|
||||
<attribute name="groups">hide_cost_price.view_cost_price</attribute> |
|
||||
</xpath> |
|
||||
<xpath expr="//field[@name='standard_price']" position="attributes"> |
|
||||
<attribute name="groups">hide_cost_price.view_cost_price</attribute> |
|
||||
</xpath> |
|
||||
</field> |
|
||||
</record> |
|
||||
|
|
||||
<record model="ir.ui.view" id="product_tree_hide_cost"> |
|
||||
<field name="name">product.template.cost</field> |
|
||||
<field name="model">product.template</field> |
|
||||
<field name="inherit_id" ref="product.product_template_tree_view"/> |
|
||||
<field name="arch" type="xml"> |
|
||||
<xpath expr="//field[@name='standard_price']" position="attributes"> |
|
||||
<attribute name="groups">hide_cost_price.view_cost_price</attribute> |
|
||||
</xpath> |
|
||||
</field> |
|
||||
</record> |
|
||||
</data> |
|
||||
</odoo> |
|
@ -1,26 +0,0 @@ |
|||||
User Login Alert v11 |
|
||||
==================== |
|
||||
|
|
||||
This module will help to send the notification to users on successful login to his account. |
|
||||
|
|
||||
|
|
||||
Working |
|
||||
======= |
|
||||
if user is continuously using the same system the user will be notified only once. If he changes |
|
||||
the browser or the OS from same system he will receive the mail. |
|
||||
If user logged from another system and if he come back to his original system, for the first time |
|
||||
he will receive the email |
|
||||
Configuration |
|
||||
============= |
|
||||
For the working of this module, the outgoing mail configuration has to be configured . The Email will be send |
|
||||
to Users related partners Email ID. If the Email ID for the related partner of the user is not given, |
|
||||
then the notification mail will not send. |
|
||||
|
|
||||
Also install the "httpagentparser" python package, sudo pip install httpagentparser |
|
||||
|
|
||||
Credits |
|
||||
======= |
|
||||
Cybrosys Techno Solutions |
|
||||
Author |
|
||||
------ |
|
||||
* Cybrosys Techno Solutions <https://www.cybrosys.com> |
|
@ -1,25 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Cybrosys Technologies Pvt. Ltd. |
|
||||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|
||||
# Author: Niyas Raphy(<https://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 controllers |
|
||||
import models |
|
||||
|
|
@ -1,50 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Cybrosys Technologies Pvt. Ltd. |
|
||||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|
||||
# Author: Niyas Raphy(<https://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': 'User Login Alert', |
|
||||
'summary': """Secure your Odoo account by alerts at right time. If any successful login to your |
|
||||
account happens, an alert mail will be send to you with the browser and IP details.""", |
|
||||
'version': '11.0.1.0.0', |
|
||||
'description': """Secure your Odoo account by alerts at right time. If any successful login to your |
|
||||
account happens, an alert mail will be send to you with the browser and IP details.""", |
|
||||
'author': 'Cybrosys Techno Solutions', |
|
||||
'company': 'Cybrosys Techno Solutions', |
|
||||
'website': 'https://www.cybrosys.com', |
|
||||
'category': 'Tools', |
|
||||
'depends': ['base', 'mail'], |
|
||||
'license': 'AGPL-3', |
|
||||
'data': [ |
|
||||
'security/notification_group.xml', |
|
||||
'views/logged_details_view.xml', |
|
||||
], |
|
||||
'images': ['static/description/banner.jpg'], |
|
||||
'demo': [], |
|
||||
'installable': True, |
|
||||
'auto_install': False, |
|
||||
'external_dependencies': { |
|
||||
'python': ['httpagentparser'], |
|
||||
}, |
|
||||
|
|
||||
|
|
||||
} |
|
||||
|
|
@ -1,18 +0,0 @@ |
|||||
{ |
|
||||
'name': 'Login Notification', |
|
||||
'summary': """Send login notification E-mail to user""", |
|
||||
'version': '10.0.1.0.0', |
|
||||
'description': """Send login notification E-mail to user""", |
|
||||
'author': 'Cybrosys Techno Solutions', |
|
||||
'company': 'Cybrosys Techno Solutions', |
|
||||
'website': 'http://www.cybrosys.com', |
|
||||
'category': 'Tools', |
|
||||
'depends': ['base', 'web'], |
|
||||
'license': 'AGPL-3', |
|
||||
'data': [ |
|
||||
], |
|
||||
'demo': [], |
|
||||
'installable': True, |
|
||||
'auto_install': False, |
|
||||
|
|
||||
} |
|
@ -1,23 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Cybrosys Technologies Pvt. Ltd. |
|
||||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|
||||
# Author: Niyas Raphy(<https://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 main |
|
@ -1,109 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Cybrosys Technologies Pvt. Ltd. |
|
||||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|
||||
# Author: Niyas Raphy(<https://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 httpagentparser |
|
||||
from time import gmtime, strftime |
|
||||
from odoo.addons.web.controllers import main |
|
||||
from odoo.http import request |
|
||||
from odoo.exceptions import Warning |
|
||||
import odoo |
|
||||
import odoo.modules.registry |
|
||||
from odoo.tools.translate import _ |
|
||||
from odoo import http |
|
||||
|
|
||||
|
|
||||
class Home(main.Home): |
|
||||
|
|
||||
@http.route('/web/login', type='http', auth="public") |
|
||||
def web_login(self, redirect=None, **kw): |
|
||||
main.ensure_db() |
|
||||
request.params['login_success'] = False |
|
||||
if request.httprequest.method == 'GET' and redirect and request.session.uid: |
|
||||
return http.redirect_with_hash(redirect) |
|
||||
|
|
||||
if not request.uid: |
|
||||
request.uid = odoo.SUPERUSER_ID |
|
||||
|
|
||||
values = request.params.copy() |
|
||||
try: |
|
||||
values['databases'] = http.db_list() |
|
||||
except odoo.exceptions.AccessDenied: |
|
||||
values['databases'] = None |
|
||||
if request.httprequest.method == 'POST': |
|
||||
old_uid = request.uid |
|
||||
uid = request.session.authenticate(request.session.db, request.params['login'], request.params['password']) |
|
||||
if uid is not False: |
|
||||
user_rec = request.env['res.users'].sudo().search([('id', '=', uid)]) |
|
||||
if user_rec.partner_id.email and user_rec.has_group('user_login_alert.receive_login_notification'): |
|
||||
send_mail = 0 |
|
||||
agent = request.httprequest.environ.get('HTTP_USER_AGENT') |
|
||||
agent_details = httpagentparser.detect(agent) |
|
||||
user_os = agent_details['os']['name'] |
|
||||
browser_name = agent_details['browser']['name'] |
|
||||
ip_address = request.httprequest.environ['REMOTE_ADDR'] |
|
||||
if user_rec.last_logged_ip and user_rec.last_logged_browser and user_rec.last_logged_os: |
|
||||
if user_rec.last_logged_ip != ip_address or user_rec.last_logged_browser != browser_name or user_rec.last_logged_os != user_os: |
|
||||
send_mail = 1 |
|
||||
user_rec.last_logged_ip = ip_address |
|
||||
user_rec.last_logged_browser = browser_name |
|
||||
user_rec.last_logged_os = user_os |
|
||||
else: |
|
||||
send_mail = 0 |
|
||||
else: |
|
||||
send_mail = 1 |
|
||||
user_rec.last_logged_ip = ip_address |
|
||||
user_rec.last_logged_browser = browser_name |
|
||||
user_rec.last_logged_os = user_os |
|
||||
if send_mail == 1: |
|
||||
email_to = user_rec.partner_id.email |
|
||||
current_date_time = strftime("%Y-%m-%d %H:%M:%S", gmtime()) |
|
||||
message_body = 'Hi ' + user_rec.name + ' , Your account has been ' \ |
|
||||
'accessed successfully. The details of the ' \ |
|
||||
'system from which the account is accessed ...,' |
|
||||
message_body += '<table border="1" width="100%" cellpadding="0" bgcolor="#ededed">' |
|
||||
message_body += '<tr><td>' + 'OS' + '</td>' \ |
|
||||
'<td>' + user_os + '</td>' \ |
|
||||
'</tr>'\ |
|
||||
'<tr><td>' + 'Browser' + '</td>' \ |
|
||||
'<td>' + browser_name + '</td>' \ |
|
||||
'</tr>'\ |
|
||||
'<tr><td>' + 'IP Address' + '</td>' \ |
|
||||
'<td>' + ip_address + '</td>' \ |
|
||||
'</tr>' |
|
||||
message_body += '</table>' |
|
||||
message_body += 'Thank you' |
|
||||
template_obj = request.env['mail.mail'] |
|
||||
template_data = { |
|
||||
'subject': 'Login Alert : ' + current_date_time, |
|
||||
'body_html': message_body, |
|
||||
'email_from': request.env.user.company_id.email, |
|
||||
'email_to': email_to |
|
||||
} |
|
||||
template_id = template_obj.create(template_data) |
|
||||
template_obj.send(template_id) |
|
||||
request.params['login_success'] = True |
|
||||
if not redirect: |
|
||||
redirect = '/web' |
|
||||
return http.redirect_with_hash(redirect) |
|
||||
request.uid = old_uid |
|
||||
values['error'] = _("Wrong login/password") |
|
||||
return request.render('web.login', values) |
|
@ -1,24 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Cybrosys Technologies Pvt. Ltd. |
|
||||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|
||||
# Author: Niyas Raphy(<https://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 logged_details |
|
||||
|
|
@ -1,31 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Cybrosys Technologies Pvt. Ltd. |
|
||||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|
||||
# Author: Niyas Raphy(<https://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 odoo import models, fields |
|
||||
|
|
||||
|
|
||||
class ResUsersInherit(models.Model): |
|
||||
_inherit = 'res.users' |
|
||||
|
|
||||
last_logged_ip = fields.Char(string='IP') |
|
||||
last_logged_browser = fields.Char(string='Browser') |
|
||||
last_logged_os = fields.Char(string='OS') |
|
@ -1,8 +0,0 @@ |
|||||
<?xml version="1.0"?> |
|
||||
<odoo> |
|
||||
<data> |
|
||||
<record id="receive_login_notification" model="res.groups"> |
|
||||
<field name="name">Receive Login Notification</field> |
|
||||
</record> |
|
||||
</data> |
|
||||
</odoo> |
|
Before Width: | Height: | Size: 121 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 16 KiB |
@ -1,86 +0,0 @@ |
|||||
<section class="oe_container"> |
|
||||
<div class="oe_row oe_spaced"> |
|
||||
<h2 class="oe_slogan">User Login Alert</h2> |
|
||||
<h3 class="oe_slogan">User will be notified on Successful login</h3> |
|
||||
<h4 class="oe_slogan"><a href="https://www.cybrosys.com">Cybrosys Technologies</a> </h4> |
|
||||
<div> |
|
||||
<p>This module will send a notification email to the users email. The notification email contains the IP |
|
||||
of the system, browser name and OS from which the account is accessed.</p> |
|
||||
</div> |
|
||||
<div> |
|
||||
<h4><p>Features:</p></h4> |
|
||||
<ul> |
|
||||
<li style="list-style:none !important;"><span style="color:green;"> ☑</span> Email notification on Log in</li> |
|
||||
<li style="list-style:none !important;"><span style="color:green;"> ☑</span> Details of the system that accessed the account</li> |
|
||||
<li style="list-style:none !important;"><span style="color:green;"> ☑</span> IP, OS and browser as well as log in time will be there in the notification email</li> |
|
||||
<li style="list-style:none !important;"><span style="color:green;"> ☑</span> User will receive notification only if user exist in group receive login notification</li> |
|
||||
</ul> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section> |
|
||||
|
|
||||
<section class="oe_container oe_dark"> |
|
||||
<div class="oe_row oe_spaced"> |
|
||||
<h4 class="oe_slogan">Notification E-Mail</h4> |
|
||||
<div class="oe_span12"> |
|
||||
<p>Adding user to the login notification group</p> |
|
||||
<p>user will receive notification only if he is added in this group</p> |
|
||||
<div class="oe_row_img oe_centered"> |
|
||||
<img style="border:10px solid white;" class="oe_picture oe_screenshot" src="tick_to_receive.png"> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
<div class="oe_span12"> |
|
||||
<p>User received e-mail on successful login</p> |
|
||||
<div class="oe_row_img oe_centered"> |
|
||||
<img style="border:10px solid white;" class="oe_picture oe_screenshot" src="notified_email.png"> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section> |
|
||||
|
|
||||
<section class="oe_container "> |
|
||||
<div class="oe_row oe_spaced"> |
|
||||
<h4 class="oe_slogan">Working</h4> |
|
||||
<div> |
|
||||
<ul> |
|
||||
<li style="list-style:none !important;"><span style="color:green;"> ☑</span> If the user is logging in from the same system, user will be only notified for the first time</li> |
|
||||
<li style="list-style:none !important;"><span style="color:green;"> ☑</span> If the user changes the browser or OS from the same system, the notification email will be received</li> |
|
||||
<li style="list-style:none !important;"><span style="color:green;"> ☑</span> if user logged in from a new system , notification mail will send.</li> |
|
||||
<li style="list-style:none !important;"><span style="color:green;"> ☑</span> Users IP, OS ad browser details will be stored in User form.</li> |
|
||||
<li style="list-style:none !important;"><span style="color:green;"> ☑</span> Logging in from above IP ,browser and OS user wont be notified</li> |
|
||||
<li style="list-style:none !important;"><span style="color:green;"> ☑</span> This will get updated based on users latest login</li> |
|
||||
<li style="list-style:none !important;"><span style="color:green;"> ☑</span> This will details be visible only in developer mode</li> |
|
||||
</ul> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section> |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
<section class="oe_container oe_dark"> |
|
||||
<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> |
|
@ -1,82 +0,0 @@ |
|||||
<section class="oe_container"> |
|
||||
<div class="oe_spaced"> |
|
||||
<h2 class="oe_slogan">Birthday Notification By E-mail</h2> |
|
||||
<h3 class="oe_slogan">This module will wish the employees on their birthday</h3> |
|
||||
|
|
||||
<h4 class="oe_slogan">Author : Cybrosys Techno Solutions , www.cybrosys.com</h4> |
|
||||
<div style="padding-left:66px;"> |
|
||||
<h4>Features:</h4> |
|
||||
<ul> |
|
||||
<li style="list-style:none !important;"><span style="color:green;"> →</span> Adds a cron job to invoke email</li> |
|
||||
<li style="list-style:none !important;"><span style="color:green;"> →</span> Adds an email template</li> |
|
||||
</ul> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section> |
|
||||
|
|
||||
<section class="oe_container oe_dark"> |
|
||||
<div class="oe_spaced"> |
|
||||
<div class="oe_picture"> |
|
||||
<h3 class="oe_slogan">Overview</h3> |
|
||||
<p class="oe_mt32"> |
|
||||
HR departments need not worry to wish their employees for their Birthday. In this module we have included the feature to send an email Birthday notification to the employee. |
|
||||
</p> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section> |
|
||||
|
|
||||
<section class="oe_container"> |
|
||||
<div class="oe_row oe_spaced"> |
|
||||
<h4 class="oe_slogan">Employee Form</h4> |
|
||||
<div class="oe_span12"> |
|
||||
<p class='oe_mt32'> |
|
||||
☛ Give Date of Birth for employee.<br> |
|
||||
☛ Give work email.<br> |
|
||||
</p> |
|
||||
<div class="oe_row_img oe_centered"> |
|
||||
<img class="oe_picture oe_screenshot" src="birthday_1.png"> |
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
|
||||
</section> |
|
||||
|
|
||||
<section class="oe_container"> |
|
||||
<div class="oe_row oe_spaced"> |
|
||||
<h4 class="oe_slogan">Email Template</h4> |
|
||||
<div class="oe_span12"> |
|
||||
<p class='oe_mt32'> |
|
||||
☛ The cron job will invoke the email<br> |
|
||||
☛ Email template is very simple<br> |
|
||||
</p> |
|
||||
<div class="oe_row_img oe_centered"> |
|
||||
<img class="oe_picture oe_screenshot" src="temp.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="http://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="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;border-radius: 0;" |
|
||||
href="http://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> |
|
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 19 KiB |
@ -1,25 +0,0 @@ |
|||||
<?xml version="1.0" encoding="utf-8" ?> |
|
||||
<odoo> |
|
||||
<data> |
|
||||
<record model="ir.ui.view" id="res_users_logged_details"> |
|
||||
<field name="name">res.users</field> |
|
||||
<field name="model">res.users</field> |
|
||||
<field name="inherit_id" ref="base.view_users_form"/> |
|
||||
<field name="arch" type="xml"> |
|
||||
<xpath expr="//page[1]" position='after'> |
|
||||
<page string="Logged In details" groups="base.group_no_one"> |
|
||||
<group> |
|
||||
<group> |
|
||||
<field name="last_logged_ip"/> |
|
||||
</group> |
|
||||
<group> |
|
||||
<field name="last_logged_browser"/> |
|
||||
<field name="last_logged_os"/> |
|
||||
</group> |
|
||||
</group> |
|
||||
</page> |
|
||||
</xpath> |
|
||||
</field> |
|
||||
</record> |
|
||||
</data> |
|
||||
</odoo> |
|