diff --git a/website_event_attendee_fields/models/event_registration.py b/website_event_attendee_fields/models/event_registration.py index c7c99d3..fb82970 100644 --- a/website_event_attendee_fields/models/event_registration.py +++ b/website_event_attendee_fields/models/event_registration.py @@ -1,6 +1,7 @@ import logging from odoo import _, api, models +from odoo.tools.mail import email_normalize _logger = logging.getLogger(__name__) @@ -109,6 +110,9 @@ def _prepare_partner(self, vals): if fn in vals: del vals[fn] + if res.get("email"): + res["email"] = email_normalize(res["email"]) + _logger.debug("registration vals after removing: %s", vals) _logger.debug("partner values: %s", res) return res diff --git a/website_event_attendee_fields/static/src/js/test_tour.js b/website_event_attendee_fields/static/src/js/test_tour.js index 510ecee..fcd5ece 100644 --- a/website_event_attendee_fields/static/src/js/test_tour.js +++ b/website_event_attendee_fields/static/src/js/test_tour.js @@ -44,7 +44,7 @@ odoo.define("website_event_attendee_fields.test_tour", function (require) { $("input[name='2-name']").val("Att2"); $("input[name='2-phone']").val("222 222"); - $("input[name='2-email']").val("att2@example.com"); + $("input[name='2-email']").val("Att2@example.com"); $("select[name='2-country_id']").val("1"); $("input[name='2-function']").val("JOB2"); },