@ -0,0 +1,24 @@ |
|||||
|
Validate E-mail ID v10 |
||||
|
====================== |
||||
|
With this plugin, you can validate the E-mail ID entered in Partner/Employee form. This app will help |
||||
|
you to maintain a consistent and reliable address details for your Partner/Employee. |
||||
|
The plugin uses 'addr-spec' portion of RFC 2822 for validating the ID.That is, with this plugin you can |
||||
|
correctly identify any email address that is likely to be in use as of 2011. |
||||
|
|
||||
|
Installation |
||||
|
============ |
||||
|
You must install following packages to work the App properly: |
||||
|
* pip install validate_email |
||||
|
* pip install pyDNS |
||||
|
|
||||
|
NOTE: Since the Plugin performs verification through online you must be connected to the internet while |
||||
|
checking the Id |
||||
|
|
||||
|
Configuration |
||||
|
============= |
||||
|
|
||||
|
Nothing to configure. |
||||
|
|
||||
|
Credits |
||||
|
======= |
||||
|
Developer: Saritha Sahadevan @ cybrosys, saritha@cybrosys.in |
@ -0,0 +1,24 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################## |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author: Saritha Sahadevan(<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 <https://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################## |
||||
|
|
||||
|
from . import models |
@ -0,0 +1,39 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################## |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author: Saritha Sahadevan(<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 <https://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################## |
||||
|
{ |
||||
|
'name': "Validate E-mail ID", |
||||
|
'version': '10.0.1.0.0', |
||||
|
'summary': """Check Whether A Given E-mail ID Is Valid Or Not""", |
||||
|
'description': """Check Whether A Given E-mail ID Is Valid Or Not In Partner And Employee Form""", |
||||
|
'author': "Cybrosys Techno Solutions", |
||||
|
'website': "https://www.cybrosys.com", |
||||
|
'maintainer': 'Cybrosys Techno Solutions', |
||||
|
'category': 'Extra Tools', |
||||
|
'depends': ['base', 'hr', 'sale'], |
||||
|
'images': ['static/description/banner.jpg'], |
||||
|
'license': 'LGPL-3', |
||||
|
'installable': True, |
||||
|
'auto_install': False, |
||||
|
'external_dependencies': {'python': ['validate_email', 'pyDNS']}, |
||||
|
'application': False, |
||||
|
} |
@ -0,0 +1,23 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################## |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author: Saritha Sahadevan(<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 <https://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################## |
||||
|
from . import email_id_validation |
@ -0,0 +1,47 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################## |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author: Saritha Sahadevan(<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 <https://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################## |
||||
|
from validate_email import validate_email |
||||
|
from odoo.exceptions import ValidationError |
||||
|
from odoo import models, api, _ |
||||
|
|
||||
|
|
||||
|
class PartnerEmailValidation(models.Model): |
||||
|
_inherit = 'res.partner' |
||||
|
|
||||
|
@api.constrains('email') |
||||
|
def validate(self): |
||||
|
is_valid = validate_email(self.email, check_mx=False, verify=True, debug=False, smtp_timeout=10) |
||||
|
if is_valid is not True: |
||||
|
raise ValidationError(_('You can use only valid email address.Email address %s is invalid or does not exit') |
||||
|
% self.email) |
||||
|
|
||||
|
|
||||
|
class EmployeeEmailValidation(models.Model): |
||||
|
_inherit = 'hr.employee' |
||||
|
|
||||
|
@api.constrains('work_email') |
||||
|
def validate(self): |
||||
|
is_valid = validate_email(self.work_email, check_mx=False, verify=True, debug=False, smtp_timeout=10) |
||||
|
if is_valid is not True: |
||||
|
raise ValidationError(_('You can use only valid email address.Email address %s is invalid or does not exit') |
||||
|
% self.work_email) |
After Width: | Height: | Size: 96 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 33 KiB |
@ -0,0 +1,93 @@ |
|||||
|
<section class="oe_container"> |
||||
|
<div class="oe_row oe_spaced"> |
||||
|
<h2 class="oe_slogan">Validate E-mail ID</h2> |
||||
|
<h3 class="oe_slogan">Check Whether A Given E-mail ID Is Valid Or Not .</h3> |
||||
|
<h4 class="oe_slogan"><a href="https://www.cybrosys.com">Cybrosys Technologies</a> </h4> |
||||
|
</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"> |
||||
|
With this plugin, you can validate the E-mail ID entered in Partner/Employee form. This app will help |
||||
|
you to maintain a consistent and reliable address details for your Partner/Employee. |
||||
|
The plugin uses 'addr-spec' portion of RFC 2822 for validating the ID.That is, with this plugin you can |
||||
|
correctly identify any email address that is likely to be in use as of 2011. |
||||
|
</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
|
||||
|
<section class="oe_container"> |
||||
|
<div class="oe_row oe_spaced"> |
||||
|
<h3 class="oe_slogan">Validate Email ID</h3> |
||||
|
<p class='oe_mt32'> |
||||
|
<centre>You will get a warning message if you entered an invalid ID.</centre> |
||||
|
</p> |
||||
|
<div class="oe_row oe_padded"> |
||||
|
<div class="oe_span6"> |
||||
|
<img class="oe_picture oe_screenshot" src="validation.png"> |
||||
|
</div> |
||||
|
<div class="oe_span6"> |
||||
|
<img class="oe_picture oe_screenshot" src="validation_hr.png"> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
|
||||
|
<section class="oe_container oe_dark"> |
||||
|
<div class="oe_row oe_spaced"> |
||||
|
<h3 class="oe_slogan">Installation</h3> |
||||
|
<p class='oe_mt32'> |
||||
|
<centre>You must install following packages to work the App properly:</centre> |
||||
|
</p> |
||||
|
<div class="oe_row"> |
||||
|
<div class="oe_span6"> |
||||
|
<img class="oe_picture oe_screenshot" src="validate_email.png"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div> |
||||
|
<div class="oe_span6"> |
||||
|
<img class="oe_picture oe_screenshot" src="pyDns.png"> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div> |
||||
|
<p class='oe_mt32'> |
||||
|
Since the Plugin performs verification through online you must be connected to the internet while |
||||
|
checking the Id |
||||
|
</p> |
||||
|
</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: 1.2 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 91 KiB |
After Width: | Height: | Size: 78 KiB |
@ -0,0 +1,41 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################## |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
||||
|
# Author: Cybrosys Technologies(<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': 'Parent Team & Targets', |
||||
|
'version': '10.0.1.0.0', |
||||
|
'category': 'Sales', |
||||
|
'summary': 'Sales Team Targets and Parent Teams', |
||||
|
'author': 'Cybrosys Techno Solutions', |
||||
|
'company': 'Cybrosys Techno Solutions', |
||||
|
'website': 'http://www.cybrosys.com', |
||||
|
'depends': ['crm', 'sale'], |
||||
|
'images': ['static/description/banner.jpg'], |
||||
|
'data': [ |
||||
|
'views/parent_team.xml', |
||||
|
'views/sales_man_target.xml', |
||||
|
'views/sales_team_target.xml', |
||||
|
'security/ir.model.access.csv', |
||||
|
], |
||||
|
'installable': True, |
||||
|
'auto_install': False, |
||||
|
} |
@ -0,0 +1,59 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################## |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
||||
|
# Author: Cybrosys Technologies(<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 odoo import models, fields, api |
||||
|
|
||||
|
|
||||
|
class CrmTeam(models.Model): |
||||
|
_inherit = 'crm.team' |
||||
|
|
||||
|
def get_currency(self): |
||||
|
return self.env.user.company_id.currency_id.id |
||||
|
|
||||
|
team_target = fields.Float(string='Team Target', compute="compute_team_target") |
||||
|
parent_team = fields.Many2one('crm.team', string='Parent Team', copy=False) |
||||
|
currency_id = fields.Many2one('res.currency', store=True, string='Currency', readonly=True, default=lambda self: self.get_currency()) |
||||
|
|
||||
|
@api.one |
||||
|
def compute_team_target(self): |
||||
|
total = 0 |
||||
|
childs = self.get_childs(self.id) |
||||
|
childs += self |
||||
|
for team in childs: |
||||
|
for member_id in team.member_ids: |
||||
|
target = team.env['crm.target'].search([('user_id', '=', member_id.id)]) |
||||
|
if target: |
||||
|
for t in target: |
||||
|
total += t.target_amount |
||||
|
|
||||
|
team.team_target = total |
||||
|
return |
||||
|
|
||||
|
def get_childs(self, team_id): |
||||
|
child_teams = self.search([('parent_team.id', '=', team_id)]) |
||||
|
if child_teams: |
||||
|
for team in child_teams: |
||||
|
child_teams += self.get_childs(team.id) |
||||
|
return child_teams |
||||
|
|
||||
|
|