dat.vh
6 years ago
committed by
Abraham Anes
No known key found for this signature in database
GPG Key ID: 1865EBA8F25B5188
6 changed files with
11 additions and
15 deletions
-
partner_email_check/__init__.py
-
partner_email_check/__manifest__.py
-
partner_email_check/models/__init__.py
-
partner_email_check/models/res_partner.py
-
partner_email_check/tests/__init__.py
-
partner_email_check/tests/test_partner_email_check.py
|
|
@ -1,4 +1,3 @@ |
|
|
|
# Copyright 2017 Komit <http://komit-consulting.com> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
|
|
|
|
|
|
|
from . import models |
|
|
@ -1,12 +1,12 @@ |
|
|
|
# Copyright 2017 Komit <http://komit-consulting.com> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|
|
|
# Copyright 2019 Komit <https://komit-consulting.com> |
|
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
|
|
|
|
|
|
|
{ |
|
|
|
'name': 'Email Format Checker', |
|
|
|
'version': '11.0.1.0.0', |
|
|
|
'summary': 'Validate email address field', |
|
|
|
'author': "Komit, Odoo Community Association (OCA)", |
|
|
|
'website': 'http://komit-consulting.com', |
|
|
|
'website': 'https://github.com/OCA/partner-contact', |
|
|
|
'category': 'Tools', |
|
|
|
'depends': ['base'], |
|
|
|
'installable': True, |
|
|
|
|
|
@ -1,4 +1,3 @@ |
|
|
|
# Copyright 2017 Komit <http://komit-consulting.com> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
|
|
|
|
|
|
|
from . import res_partner |
|
|
@ -1,5 +1,5 @@ |
|
|
|
# Copyright 2017 Komit <http://komit-consulting.com> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|
|
|
# Copyright 2019 Komit <https://komit-consulting.com> |
|
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
|
|
|
|
|
|
|
import logging |
|
|
|
from odoo import api, models, _ |
|
|
@ -31,5 +31,4 @@ class ResPartner(models.Model): |
|
|
|
def email_check(self, email): |
|
|
|
if validate_email(email): |
|
|
|
return True |
|
|
|
else: |
|
|
|
raise UserError(_('Invalid e-mail!')) |
|
|
|
raise UserError(_('Invalid e-mail!')) |
|
|
@ -1,4 +1,3 @@ |
|
|
|
# Copyright 2017 Komit <http://komit-consulting.com> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
|
|
|
|
|
|
|
from . import test_partner_email_check |
|
|
@ -1,5 +1,5 @@ |
|
|
|
# Copyright 2017 Komit <http://komit-consulting.com> |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|
|
|
# Copyright 2019 Komit <https://komit-consulting.com> |
|
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
|
|
|
|
|
|
|
from odoo.exceptions import ValidationError |
|
|
|
from odoo.tests.common import TransactionCase |
|
|
|