I have created a website from Odoo's website builder. Each time a user submit a form, the user should receive an email, but the email is being sent to the Admin email used, instead of the current logged in user.
I have created a Server Action whereby i'm using:
To(Emails) : ${(user.email and '%s <%s>' % (user.name, user.email) or '')|safe}
This: ${(user.email and '%s <%s>' % (user.name, user.email) or '')|safe} is supposed to get me the current logged in user email, but the email is not being sent to the current user's email, but rather to the Admin email. In other words, the above expression is getting the Administrator email, but not the current user's email, perhaps getting the Admin as the current user even though another user is logged in.
I need to send this automatic email on each form submission to the specific logged in user.