|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<odoo> |
| 3 | + <data noupdate="1"> |
| 4 | + <record id="mail_template_totp_mail_code" model="mail.template"> |
| 5 | + <field name="name">TOTP for users: Authentication by email</field> |
| 6 | + <field name="model_id" ref="base.model_res_users" /> |
| 7 | + <field name="subject">Your two-factor authentication code</field> |
| 8 | + <field name="email_to">{{ object.email_formatted }}</field> |
| 9 | + <field name="email_from">"{{ object.company_id.name }}" <{{ (object.company_id.email or user.email) }}></field> |
| 10 | + <field name="lang">{{ object.partner_id.lang }}</field> |
| 11 | + <field name="auto_delete" eval="True"/> |
| 12 | + <field name="body_html" type="html"> |
| 13 | +<div style="margin: 0px; padding: 0px; font-size: 13px;"> |
| 14 | + Dear <t t-out="object.partner_id.name or ''"></t><br/><br/> |
| 15 | + <p>Someone is trying to log in into your account with a new device.</p> |
| 16 | + <ul> |
| 17 | + <t t-set="not_available">N/A</t> |
| 18 | + <li>Location: <t t-out="ctx.get('location') or not_available"/></li> |
| 19 | + <li>Device: <t t-out="ctx.get('device') or not_available"/></li> |
| 20 | + <li>Browser: <t t-out="ctx.get('browser') or not_available"/></li> |
| 21 | + <li>IP address: <t t-out="ctx.get('ip') or not_available"/></li> |
| 22 | + </ul> |
| 23 | + <p>If this is you, please enter the following code to complete the login:</p> |
| 24 | + <t t-set="code_expiration" t-value="object._get_totp_mail_code()"/> |
| 25 | + <t t-set="code" t-value="code_expiration[0]"/> |
| 26 | + <t t-set="expiration" t-value="code_expiration[1]"/> |
| 27 | + <div style="margin: 16px 0px 16px 0px; text-align: center;"> |
| 28 | + <span t-out="code" style="background-color:#faf9fa; border: 1px solid #dad8de; padding: 8px 16px 8px 16px; font-size: 24px; color: #875A7B; border-radius: 5px;"/> |
| 29 | + </div> |
| 30 | + <small>Please note that this code expires in <t t-out="expiration"/>.</small> |
| 31 | + |
| 32 | + <p style="margin: 16px 0px 16px 0px;"> |
| 33 | + If you did NOT initiate this log-in, |
| 34 | + you should immediately change your password to ensure account security. |
| 35 | + </p> |
| 36 | + |
| 37 | + <p style="margin: 16px 0px 16px 0px;"> |
| 38 | + We also strongly recommend enabling the two-factor authentication using an authenticator app to help secure your account. |
| 39 | + </p> |
| 40 | + |
| 41 | + <p style="margin: 16px 0px 16px 0px; text-align: center;"> |
| 42 | + <a t-att-href="object.get_totp_invite_url()" |
| 43 | + style="background-color:#875A7B; padding: 8px 16px 8px 16px; text-decoration: none; color: #fff; border-radius: 5px;"> |
| 44 | + Activate my two-factor authentication |
| 45 | + </a> |
| 46 | + </p> |
| 47 | +</div> |
| 48 | + </field> |
| 49 | + </record> |
| 50 | + </data> |
| 51 | +</odoo> |
0 commit comments