Files
odoo_source/addons/website_profile/controllers/portal.py
T
Fabio Barbero 2d65d022d9 [IMP] website_slides: change confirmation messages for email
Purpose
=======
Clean up messages related to email verification.

Specification
=============
Rephrase messages, add confirmation of email sent and let user change
email.
Do not show "Validation Email sent" if the current user changed their
email address.

PR: https://github.com/odoo/odoo/pull/77617
Task-2647065

closes odoo/odoo#77617

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-10-12 11:44:40 +00:00

15 lines
529 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.portal.controllers import portal
from odoo.http import request
class CustomerPortal(portal.CustomerPortal):
def on_account_update(self, values, partner):
super().on_account_update(values, partner)
# Do not show "Validation Email sent" if the current user changed their email address
if values["email"] != partner.email:
request.session['validation_email_sent'] = False