From 008cf41e94ff9cbb9f11af2338c7ba05ea3d32e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kh=C3=B4i=20=28Ki=C3=AAn=20Kim=29?= Date: Tue, 15 Oct 2024 12:46:10 +0700 Subject: [PATCH] [MIG] partner_email_check: Migration to 18.0 --- partner_email_check/README.rst | 9 +++++++++ partner_email_check/__manifest__.py | 2 +- partner_email_check/models/res_partner.py | 8 ++++---- partner_email_check/readme/CONTRIBUTORS.md | 1 + partner_email_check/readme/CREDITS.md | 3 +++ partner_email_check/static/description/index.html | 14 ++++++++++++-- requirements.txt | 2 ++ 7 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 partner_email_check/readme/CREDITS.md create mode 100644 requirements.txt diff --git a/partner_email_check/README.rst b/partner_email_check/README.rst index 87971d538bb..cbc049df5e3 100644 --- a/partner_email_check/README.rst +++ b/partner_email_check/README.rst @@ -87,6 +87,15 @@ Contributors - Vo Hoang Dat - Jean-Charles Drubay - Diogo Cordeiro +- Khoi (Kien Kim) + +Other credits +------------- + +The migration of this module from 17.0 to 18.0 was financially supported +by: + +- Camptocamp. Maintainers ----------- diff --git a/partner_email_check/__manifest__.py b/partner_email_check/__manifest__.py index f3f1c9ef901..145a106bbe3 100644 --- a/partner_email_check/__manifest__.py +++ b/partner_email_check/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Email Format Checker", - "version": "17.0.1.0.0", + "version": "18.0.1.0.0", "summary": "Validate email address field", "author": "Komit, Odoo Community Association (OCA)", "website": "https://github.com/OCA/partner-contact", diff --git a/partner_email_check/models/res_partner.py b/partner_email_check/models/res_partner.py index b0ca853d5ad..a7dbbee8bb2 100644 --- a/partner_email_check/models/res_partner.py +++ b/partner_email_check/models/res_partner.py @@ -44,7 +44,7 @@ def _check_email_unique(self): for rec in self.filtered("email"): if "," in rec.email: raise UserError( - _( + self.env._( "Field contains multiple email addresses. This is " "not supported when duplicate email addresses are " "not allowed." @@ -52,7 +52,7 @@ def _check_email_unique(self): ) if self.search_count([("email", "=", rec.email), ("id", "!=", rec.id)]): raise UserError( - _("Email '%s' is already in use.") % rec.email.strip() + self.env._("Email '%s' is already in use.", rec.email.strip()) ) def _normalize_email(self, email): @@ -72,11 +72,11 @@ def _normalize_email(self, email): ) except EmailSyntaxError: raise ValidationError( - _("%s is an invalid email") % email.strip() + self.env._("%s is an invalid email", email.strip()) ) from EmailSyntaxError except EmailUndeliverableError: raise ValidationError( - _("Cannot deliver to email address %s") % email.strip() + self.env._("Cannot deliver to email address %s", email.strip()) ) from EmailUndeliverableError return result.normalized.lower() diff --git a/partner_email_check/readme/CONTRIBUTORS.md b/partner_email_check/readme/CONTRIBUTORS.md index 2ac79a5fd9f..b2e837683e0 100644 --- a/partner_email_check/readme/CONTRIBUTORS.md +++ b/partner_email_check/readme/CONTRIBUTORS.md @@ -1,3 +1,4 @@ - Vo Hoang Dat \<\> - Jean-Charles Drubay \<\> - Diogo Cordeiro \<\> +- Khoi (Kien Kim) \<\> diff --git a/partner_email_check/readme/CREDITS.md b/partner_email_check/readme/CREDITS.md new file mode 100644 index 00000000000..80354b7d282 --- /dev/null +++ b/partner_email_check/readme/CREDITS.md @@ -0,0 +1,3 @@ +The migration of this module from 17.0 to 18.0 was financially supported by: + +- Camptocamp. diff --git a/partner_email_check/static/description/index.html b/partner_email_check/static/description/index.html index f99f80a3769..ae4166f2de0 100644 --- a/partner_email_check/static/description/index.html +++ b/partner_email_check/static/description/index.html @@ -387,7 +387,8 @@

Email Format Checker

  • Credits
  • @@ -429,10 +430,19 @@

    Contributors

  • Vo Hoang Dat <dat.vh@komit-consulting.com>
  • Jean-Charles Drubay <jc@komit-consulting.com>
  • Diogo Cordeiro <dcordeiro@opensourceintegrators.com>
  • +
  • Khoi (Kien Kim) <khoikk@trobz.com>
  • + + +
    +

    Other credits

    +

    The migration of this module from 17.0 to 18.0 was financially supported +by:

    +
      +
    • Camptocamp.