Files
odoo_source/addons/auth_totp_mail/data/mail_template_data.xml
T
Thibault Delavallée be398b428a [FIX] auth_*, sale: improve 'from' of templates by adding company fallback
Emails on Sale Order, Invoice, Recovery cart. When no sales on sale.order
use "COMPANY" <email of company> as fallback before the current user.
Reason is that odoobot is often used in automatized actions and having
it as email_from is not really user friendly.

Also add company fallback in auth modules email templates (if not already
using it) for the same reason.

Task-3346388

closes odoo/odoo#124472

X-original-commit: 597fc004148bf39e8f56e36e840aa6788872f237
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-06-09 18:30:31 +02:00

33 lines
1.7 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">Settings: 2Fa Invitation</field>
<field name="model_id" ref="base.model_res_users" />
<field name="email_from">{{ (object.company_id.email_formatted or user.email_formatted) }}</field>
<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 <t t-out="object.partner_id.name or ''"></t><br/><br/>
<t t-out="user.name or ''"></t> 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 t-att-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>