diff --git a/partner_email_check/README.rst b/partner_email_check/README.rst new file mode 100644 index 000000000..42b72ccd0 --- /dev/null +++ b/partner_email_check/README.rst @@ -0,0 +1,99 @@ +==================== +Email Format Checker +==================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpartner--contact-lightgray.png?logo=github + :target: https://github.com/OCA/partner-contact/tree/13.0/partner_email_check + :alt: OCA/partner-contact +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/partner-contact-13-0/partner-contact-13-0-partner_email_check + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/134/13.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module validates and normalizes the field ``email`` in the model +``res.partner``. + +As part of the normalization, email addresses are converted to lowercase. + +Optionally, multiple partners can not be allowed to have the same address. +This will not work with multiple comma-separated email addresses in the field, +although validation and normalization are still supported in such cases. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +Install python package email-validator: ``sudo pip install email-validator``. + +To not allow multiple partners to have the same email address, use the +"Filter duplicate email addresses"/``partner_email_check_filter_duplicates`` +setting. + +To validate that email addresses are deliverable (that the hostname exists), +use the "Check deliverability of email addresses"/``partner_email_check_check_deliverability`` +setting. + +Usage +===== + +This module integrate automatically in all of the view ``res.partner`` + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Komit + +Contributors +~~~~~~~~~~~~ + +* Vo Hoang Dat +* Jean-Charles Drubay + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/partner-contact `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/partner_email_check/__init__.py b/partner_email_check/__init__.py new file mode 100644 index 000000000..31660d6a9 --- /dev/null +++ b/partner_email_check/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import models diff --git a/partner_email_check/__manifest__.py b/partner_email_check/__manifest__.py new file mode 100644 index 000000000..661cda796 --- /dev/null +++ b/partner_email_check/__manifest__.py @@ -0,0 +1,18 @@ +# Copyright 2019 Komit +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "Email Format Checker", + "version": "14.0.1.1.0", + "summary": "Validate email address field", + "author": "Komit, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/partner-contact", + "category": "Tools", + "depends": ["base_setup"], + "installable": True, + "application": False, + "license": "AGPL-3", + "external_dependencies": {"python": ["email-validator"]}, + "data": ["views/base_config_view.xml"], + "demo": ["demo/res_company_demo.xml"], +} diff --git a/partner_email_check/demo/res_company_demo.xml b/partner_email_check/demo/res_company_demo.xml new file mode 100644 index 000000000..ea44380cf --- /dev/null +++ b/partner_email_check/demo/res_company_demo.xml @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/partner_email_check/i18n/partner_email_check.pot b/partner_email_check/i18n/partner_email_check.pot new file mode 100644 index 000000000..11e3ae601 --- /dev/null +++ b/partner_email_check/i18n/partner_email_check.pot @@ -0,0 +1,119 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * partner_email_check +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: partner_email_check +#: code:addons/partner_email_check/models/res_partner.py:0 +#, python-format +msgid "%s is an invalid email" +msgstr "" + +#. module: partner_email_check +#: model_terms:ir.ui.view,arch_db:partner_email_check.view_general_configuration +msgid "" +"" +msgstr "" + +#. module: partner_email_check +#: code:addons/partner_email_check/models/res_partner.py:0 +#, python-format +msgid "Cannot deliver to email address %s" +msgstr "" + +#. module: partner_email_check +#: model:ir.model.fields,field_description:partner_email_check.field_res_company__partner_email_check_check_deliverability +#: model:ir.model.fields,field_description:partner_email_check.field_res_config_settings__partner_email_check_check_deliverability +msgid "Check deliverability of email addresses" +msgstr "" + +#. module: partner_email_check +#: model:ir.model.fields,field_description:partner_email_check.field_res_company__partner_email_check_syntax +#: model:ir.model.fields,field_description:partner_email_check.field_res_config_settings__partner_email_check_syntax +msgid "Check syntax of email addresses" +msgstr "" + +#. module: partner_email_check +#: model:ir.model,name:partner_email_check.model_res_company +msgid "Companies" +msgstr "" + +#. module: partner_email_check +#: model:ir.model,name:partner_email_check.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: partner_email_check +#: model:ir.model,name:partner_email_check.model_res_partner +msgid "Contact" +msgstr "" + +#. module: partner_email_check +#: model:ir.model.fields,help:partner_email_check.field_res_company__partner_email_check_check_deliverability +#: model:ir.model.fields,help:partner_email_check.field_res_config_settings__partner_email_check_check_deliverability +msgid "Don't allow email addresses with providers that don't exist" +msgstr "" + +#. module: partner_email_check +#: model:ir.model.fields,help:partner_email_check.field_res_company__partner_email_check_syntax +#: model:ir.model.fields,help:partner_email_check.field_res_config_settings__partner_email_check_syntax +msgid "Don't allow email addresses with wrong syntax" +msgstr "" + +#. module: partner_email_check +#: model:ir.model.fields,help:partner_email_check.field_res_company__partner_email_check_filter_duplicates +#: model:ir.model.fields,help:partner_email_check.field_res_config_settings__partner_email_check_filter_duplicates +msgid "Don't allow multiple partners to have the same email address." +msgstr "" + +#. module: partner_email_check +#: code:addons/partner_email_check/models/res_partner.py:0 +#, python-format +msgid "Email '%s' is already in use." +msgstr "" + +#. module: partner_email_check +#: model_terms:ir.ui.view,arch_db:partner_email_check.view_general_configuration +msgid "Email validation" +msgstr "" + +#. module: partner_email_check +#: model_terms:ir.ui.view,arch_db:partner_email_check.view_general_configuration +msgid "Ensure that partner email addresses can be delivered to" +msgstr "" + +#. module: partner_email_check +#: code:addons/partner_email_check/models/res_partner.py:0 +#, python-format +msgid "" +"Field contains multiple email addresses. This is not supported when " +"duplicate email addresses are not allowed." +msgstr "" + +#. module: partner_email_check +#: model:ir.model.fields,field_description:partner_email_check.field_res_company__partner_email_check_filter_duplicates +#: model:ir.model.fields,field_description:partner_email_check.field_res_config_settings__partner_email_check_filter_duplicates +msgid "Filter duplicate partner email addresses" +msgstr "" + +#. module: partner_email_check +#: model_terms:ir.ui.view,arch_db:partner_email_check.view_general_configuration +msgid "Require partner email addresses to be unique" +msgstr "" + +#. module: partner_email_check +#: model_terms:ir.ui.view,arch_db:partner_email_check.view_general_configuration +msgid "Require partner email addresses to have valid syntax" +msgstr "" diff --git a/partner_email_check/models/__init__.py b/partner_email_check/models/__init__.py new file mode 100644 index 000000000..9483b9bfe --- /dev/null +++ b/partner_email_check/models/__init__.py @@ -0,0 +1,5 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import res_company +from . import res_config_settings +from . import res_partner diff --git a/partner_email_check/models/res_company.py b/partner_email_check/models/res_company.py new file mode 100644 index 000000000..73b56ecf8 --- /dev/null +++ b/partner_email_check/models/res_company.py @@ -0,0 +1,23 @@ +# Copyright 2021 ACSONE SA/NV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ResCompany(models.Model): + + _inherit = "res.company" + + partner_email_check_syntax = fields.Boolean( + string="Check syntax of email addresses", + help="Don't allow email addresses with wrong syntax", + default=True, + ) + partner_email_check_filter_duplicates = fields.Boolean( + string="Filter duplicate partner email addresses", + help="Don't allow multiple partners to have the same email address.", + ) + partner_email_check_check_deliverability = fields.Boolean( + string="Check deliverability of email addresses", + help="Don't allow email addresses with providers that don't exist", + ) diff --git a/partner_email_check/models/res_config_settings.py b/partner_email_check/models/res_config_settings.py new file mode 100644 index 000000000..4128377ac --- /dev/null +++ b/partner_email_check/models/res_config_settings.py @@ -0,0 +1,27 @@ +from odoo import api, fields, models + + +class ResConfigSettings(models.TransientModel): + _inherit = "res.config.settings" + + partner_email_check_syntax = fields.Boolean( + related="company_id.partner_email_check_syntax", + readonly=False, + ) + + partner_email_check_filter_duplicates = fields.Boolean( + related="company_id.partner_email_check_filter_duplicates", + readonly=False, + ) + + partner_email_check_check_deliverability = fields.Boolean( + related="company_id.partner_email_check_check_deliverability", + readonly=False, + ) + + @api.onchange( + "partner_email_check_syntax", "partner_email_check_check_deliverability" + ) + def _onchange_partner_email_check_check_deliverability(self): + if self.partner_email_check_check_deliverability: + self.partner_email_check_syntax = True diff --git a/partner_email_check/models/res_partner.py b/partner_email_check/models/res_partner.py new file mode 100644 index 000000000..52e2bd70e --- /dev/null +++ b/partner_email_check/models/res_partner.py @@ -0,0 +1,99 @@ +# Copyright 2019 Komit +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +import logging + +from odoo import _, api, models +from odoo.exceptions import UserError, ValidationError + +_logger = logging.getLogger(__name__) + +try: + from email_validator import ( + EmailSyntaxError, + EmailUndeliverableError, + validate_email, + ) +except ImportError: + _logger.debug('Cannot import "email_validator".') + + validate_email = None + + +class ResPartner(models.Model): + _inherit = "res.partner" + + def copy_data(self, default=None): + res = super(ResPartner, self).copy_data(default=default) + if self._should_filter_duplicates(): + for copy_vals in res: + copy_vals.pop("email", None) + return res + + @api.model + def email_check(self, emails): + return ",".join( + self._normalize_email(email.strip()) + for email in emails.split(",") + if email.strip() + ) + + @api.constrains("email") + def _check_email_unique(self): + if self._should_filter_duplicates(): + for rec in self.filtered("email"): + if "," in rec.email: + raise UserError( + _( + "Field contains multiple email addresses. This is " + "not supported when duplicate email addresses are " + "not allowed." + ) + ) + if self.search_count([("email", "=", rec.email), ("id", "!=", rec.id)]): + raise UserError( + _("Email '%s' is already in use.") % rec.email.strip() + ) + + def _normalize_email(self, email): + if not self._should_check_syntax(): + return email + if validate_email is None: + _logger.warning( + "Can not validate email, " + 'python dependency required "email_validator"' + ) + return email + + try: + result = validate_email( + email, + check_deliverability=self._should_check_deliverability(), + ) + except EmailSyntaxError: + raise ValidationError(_("%s is an invalid email") % email.strip()) + except EmailUndeliverableError: + raise ValidationError( + _("Cannot deliver to email address %s") % email.strip() + ) + return result["local"].lower() + "@" + result["domain_i18n"] + + def _should_check_syntax(self): + return self.env.company.partner_email_check_syntax + + def _should_filter_duplicates(self): + return self.env.company.partner_email_check_filter_duplicates + + def _should_check_deliverability(self): + return self.env.company.partner_email_check_check_deliverability + + @api.model + def create(self, vals): + if vals.get("email"): + vals["email"] = self.email_check(vals["email"]) + return super(ResPartner, self).create(vals) + + def write(self, vals): + if vals.get("email"): + vals["email"] = self.email_check(vals["email"]) + return super(ResPartner, self).write(vals) diff --git a/partner_email_check/readme/CONFIGURE.rst b/partner_email_check/readme/CONFIGURE.rst new file mode 100644 index 000000000..b8a310e6e --- /dev/null +++ b/partner_email_check/readme/CONFIGURE.rst @@ -0,0 +1,9 @@ +Install python package email-validator: ``sudo pip install email-validator``. + +To not allow multiple partners to have the same email address, use the +"Filter duplicate email addresses"/``partner_email_check_filter_duplicates`` +setting. + +To validate that email addresses are deliverable (that the hostname exists), +use the "Check deliverability of email addresses"/``partner_email_check_check_deliverability`` +setting. diff --git a/partner_email_check/readme/CONTRIBUTORS.rst b/partner_email_check/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..5e004a233 --- /dev/null +++ b/partner_email_check/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Vo Hoang Dat +* Jean-Charles Drubay diff --git a/partner_email_check/readme/DESCRIPTION.rst b/partner_email_check/readme/DESCRIPTION.rst new file mode 100644 index 000000000..d15827c8f --- /dev/null +++ b/partner_email_check/readme/DESCRIPTION.rst @@ -0,0 +1,8 @@ +This module validates and normalizes the field ``email`` in the model +``res.partner``. + +As part of the normalization, email addresses are converted to lowercase. + +Optionally, multiple partners can not be allowed to have the same address. +This will not work with multiple comma-separated email addresses in the field, +although validation and normalization are still supported in such cases. diff --git a/partner_email_check/readme/USAGE.rst b/partner_email_check/readme/USAGE.rst new file mode 100644 index 000000000..56fbd95bd --- /dev/null +++ b/partner_email_check/readme/USAGE.rst @@ -0,0 +1 @@ +This module integrate automatically in all of the view ``res.partner`` diff --git a/partner_email_check/static/description/icon.png b/partner_email_check/static/description/icon.png new file mode 100644 index 000000000..3a0328b51 Binary files /dev/null and b/partner_email_check/static/description/icon.png differ diff --git a/partner_email_check/static/description/index.html b/partner_email_check/static/description/index.html new file mode 100644 index 000000000..4b098520f --- /dev/null +++ b/partner_email_check/static/description/index.html @@ -0,0 +1,441 @@ + + + + + + +Email Format Checker + + + +
+

Email Format Checker

+ + +

Beta License: AGPL-3 OCA/partner-contact Translate me on Weblate Try me on Runbot

+

This module validates and normalizes the field email in the model +res.partner.

+

As part of the normalization, email addresses are converted to lowercase.

+

Optionally, multiple partners can not be allowed to have the same address. +This will not work with multiple comma-separated email addresses in the field, +although validation and normalization are still supported in such cases.

+

Table of contents

+ +
+

Configuration

+

Install python package email-validator: sudo pip install email-validator.

+

To not allow multiple partners to have the same email address, use the +“Filter duplicate email addresses”/partner_email_check_filter_duplicates +setting.

+

To validate that email addresses are deliverable (that the hostname exists), +use the “Check deliverability of email addresses”/partner_email_check_check_deliverability +setting.

+
+
+

Usage

+

This module integrate automatically in all of the view res.partner

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Komit
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/partner-contact project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/partner_email_check/tests/__init__.py b/partner_email_check/tests/__init__.py new file mode 100644 index 000000000..5f0137fa7 --- /dev/null +++ b/partner_email_check/tests/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import test_partner_email_check diff --git a/partner_email_check/tests/test_partner_email_check.py b/partner_email_check/tests/test_partner_email_check.py new file mode 100644 index 000000000..2301226c3 --- /dev/null +++ b/partner_email_check/tests/test_partner_email_check.py @@ -0,0 +1,144 @@ +# Copyright 2019 Komit +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from unittest.mock import patch + +from odoo.exceptions import UserError, ValidationError +from odoo.tests.common import SavepointCase +from odoo.tools.misc import mute_logger + + +class TestPartnerEmailCheck(SavepointCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True)) + cls.test_partner = cls.env["res.partner"].create({"name": "test"}) + cls.env.company.partner_email_check_syntax = True + cls.env.company.partner_email_check_filter_duplicates = False + cls.env.company.partner_email_check_check_deliverability = False + + def test_bad_email(self): + """Test rejection of bad emails.""" + with self.assertRaises(ValidationError): + self.test_partner.email = "bad@email@domain..com" + + def test_good_email(self): + """Test acceptance of good""" + self.test_partner.email = "goodemail@domain.com" + self.assertTrue(self.test_partner.email) + + def test_bad_emails(self): + """Test rejection of bad emails.""" + with self.assertRaises(ValidationError): + self.test_partner.email = "good@domain.com,bad@email@domain..com" + + def test_good_emails(self): + """Test acceptance of good""" + self.test_partner.email = "goodemail@domain.com,goodemail2@domain.com" + self.assertTrue(self.test_partner.email) + + def test_email_domain_normalization(self): + """Test normalization of email domain names, including punycode.""" + self.test_partner.write({"email": "goodemail@xn--xamPle-9ua.com"}) + self.assertEqual(self.test_partner.email, u"goodemail@éxample.com") + + def test_multi_email_domain_normalization(self): + """Test normalization of email domain names of multiple addresses.""" + self.test_partner.write( + {"email": "goodemail@doMAIN.com,othergood@xn--xample-9ua.com"} + ) + self.assertEqual( + self.test_partner.email, u"goodemail@domain.com,othergood@éxample.com" + ) + + def test_email_local_normalization(self): + """Test normalization of the local part of email addresses.""" + self.test_partner.write({"email": "Me@mail.org"}) + # .lower() is locale-dependent, so don't hardcode the result + self.assertEqual(self.test_partner.email, "Me".lower() + "@mail.org") + + def test_multi_email_local_normalization(self): + """Test normalization of the local part of multiple addresses.""" + self.test_partner.write({"email": "You@mAiL.net,mE@mail.com"}) + self.assertEqual( + self.test_partner.email, + "You".lower() + "@mail.net," + "mE".lower() + "@mail.com", + ) + + def disallow_duplicates(self): + self.env.company.partner_email_check_filter_duplicates = True + + def test_duplicate_addresses_disallowed(self): + self.disallow_duplicates() + self.test_partner.write({"email": "email@domain.tld"}) + with self.assertRaises(UserError): + self.env["res.partner"].create( + {"name": "alsotest", "email": "email@domain.tld"} + ) + + def test_duplicate_after_normalization_addresses_disallowed(self): + self.disallow_duplicates() + self.env["res.partner"].create( + {"name": "alsotest", "email": "email@doMAIN.tld"} + ) + with self.assertRaises(UserError): + self.test_partner.email = "email@domain.tld" + + def test_multiple_addresses_disallowed_when_duplicates_filtered(self): + self.disallow_duplicates() + with self.assertRaises(UserError): + self.test_partner.email = "foo@bar.org,email@domain.tld" + + def test_duplicate_addresses_disallowed_copy_partner(self): + self.disallow_duplicates() + self.test_partner.write({"email": "email@domain.tld"}) + partner_copy = self.test_partner.copy() + self.assertFalse(partner_copy.email) + + def test_duplicate_addresses_allowed_by_default(self): + self.env["res.partner"].create( + {"name": "alsotest", "email": "email@domain.tld"} + ) + self.test_partner.email = "email@domain.tld" + + def check_deliverability(self): + self.env.company.partner_email_check_check_deliverability = True + + def test_deliverable_addresses_allowed(self): + self.check_deliverability() + # We only need a resolving domain, not a real user + self.test_partner.email = "gooddomain-icraglusrk@gmail.com" + self.assertTrue(self.test_partner.email) + + def test_nondeliverable_addresses_not_allowed(self): + self.check_deliverability() + with self.assertRaises(ValidationError): + # This domain may resolve by mistake on certain network setups + # At least until a new version of email-validator is released + # See https://github.com/JoshData/python-email-validator/pull/30 + self.test_partner.email = "cezrik@acoa.nrdkt" + + @mute_logger("odoo.addons.partner_email_check.models.res_partner") + def test_lacking_dependency_does_not_halt_execution(self): + with patch( + "odoo.addons.partner_email_check.models.res_partner." "validate_email", None + ): + self.test_partner.email = "notatallvalid@@domain" + + @mute_logger("odoo.addons.partner_email_check.models.res_partner") + def test_lacking_dependency_keeps_uniqueness_constraint_working(self): + self.disallow_duplicates() + with patch( + "odoo.addons.partner_email_check.models.res_partner." "validate_email", None + ): + self.env["res.partner"].create( + {"name": "alsotest", "email": "email@domain.tld"} + ) + with self.assertRaises(UserError): + self.test_partner.email = "email@domain.tld" + + def test_invalid_email_addresses_allowed(self): + self.env.company.partner_email_check_syntax = False + self.test_partner.email = "bad@email@domain..com" + self.assertTrue(self.test_partner.email) diff --git a/partner_email_check/views/base_config_view.xml b/partner_email_check/views/base_config_view.xml new file mode 100644 index 000000000..b45ba42da --- /dev/null +++ b/partner_email_check/views/base_config_view.xml @@ -0,0 +1,69 @@ + + + + partner_email_check + res.config.settings + + + +

Email validation

+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 000000000..bcfab71c0 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +# generated from manifests external_dependencies +email-validator diff --git a/setup/partner_email_check/odoo/addons/partner_email_check b/setup/partner_email_check/odoo/addons/partner_email_check new file mode 120000 index 000000000..145abe60a --- /dev/null +++ b/setup/partner_email_check/odoo/addons/partner_email_check @@ -0,0 +1 @@ +../../../../partner_email_check \ No newline at end of file diff --git a/setup/partner_email_check/setup.py b/setup/partner_email_check/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/partner_email_check/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)