Files
odoo_source/addons/auth_totp_mail/data/mail_template_data.xml
T
David Beguin eb2e328275 [FIX-MOV] auth_totp, auth_totp_invite: move 2FA invite mail to new bridge module
Since 29db699e9b, auth_top depends of mail module, which lead to delay auth_totp
installation - not during DB creation anymore. As mail module is not installed
during DB creation, once an app that depends on mail is installed after DB
creation, auth_top module is finally installed and the session token now depends
auth_top module. As a result, the user is automatically logged out.

This commit moves the invite mail (and the dependance to 'mail' module) to a
new bridge module. Auth_totp module will now be reinstalled during DB creation
automatically.

Task-2638538
Parent Task-2487630
COM PR: odoo/odoo#76022
UPG PR: odoo/upgrade#2808

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-06 15:47:23 +00:00

32 lines
1.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="mail_template_totp_invite" model="mail.template">
<field name="name">TOTP on User: Invite by email</field>
<field name="model_id" ref="base.model_res_users" />
<field name="subject">Invitation to activate two-factor authentication on your Odoo account</field>
<field name="partner_to">${object.partner_id.id}</field>
<field name="lang">${object.partner_id.lang}</field>
<field name="auto_delete" eval="True"/>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px; font-size: 13px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Dear ${object.partner_id.name}<br/><br/>
${user.name} requested you activate two-factor authentication to protect your account.<br/><br/>
Two-factor Authentication ("2FA") is a system of double authentication.
The first one is done with your password and the second one with a code you get from a dedicated mobile app.
Popular ones include Authy, Google Authenticator or the Microsoft Authenticator.
<p style="margin: 16px 0px 16px 0px; text-align: center;">
<a href="${object.get_totp_invite_url()}"
style="background-color:#875A7B; padding: 8px 16px 8px 16px; text-decoration: none; color: #fff; border-radius: 5px;">
Activate my two-factor Authentication
</a>
</p>
</p>
</div>
</field>
</record>
</data>
</odoo>