[IMP]pms_api_rest: added services to reset user password

This commit is contained in:
braisab
2023-05-22 20:34:11 +02:00
committed by Darío Lodeiros
parent cbeaadb765
commit b94dd00615
8 changed files with 208 additions and 2 deletions

View File

@@ -42,6 +42,7 @@
"data/pms_precheckin_invitation_email_template.xml",
"data/pms_data.xml",
"data/traveller_report_paperformat.xml",
"data/pms_reset_password_email.xml",
"report/pms_folio.xml",
"report/pms_folio_templates.xml",
"report/traveller_report_action.xml",

View File

@@ -0,0 +1,109 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="pms_reset_password_email" model="mail.template">
<field name="name">Pms Reset Password</field>
<field name="model_id" ref="base.model_res_users"/>
<field name="subject">Restablecer Contraseña</field>
<field name="email_from">"${object.company_id.name | safe}" &lt;${(object.company_id.email or user.email) | safe}&gt;</field>
<field name="email_to">${object.email_formatted | safe}</field>
<field name="body_html" type="html">
<table border="0" cellpadding="0" cellspacing="0" style="padding-top: 16px; background-color: #F1F1F1; font-family:Verdana, Arial,sans-serif; color: #454748; width: 100%; border-collapse:separate;"><tr><td align="center">
<table border="0" cellpadding="0" cellspacing="0" width="590" style="padding: 16px; background-color: white; color: #454748; border-collapse:separate;">
<tbody>
<!-- HEADER -->
<tr>
<td align="center" style="min-width: 590px;">
<table border="0" cellpadding="0" cellspacing="0" width="590" style="min-width: 590px; background-color: white; padding: 0px 8px 0px 8px; border-collapse:separate;">
<tr><td valign="middle">
<span style="font-size: 10px;">Tu Cuenta en Roomdoo</span><br/>
<span style="font-size: 20px; font-weight: bold;">
${object.name}
</span>
</td><td valign="middle" align="right">
<img src="/logo.png?company=${object.company_id.id}" style="padding: 0px; margin: 0px; height: auto; width: 80px;" alt="${object.company_id.name}"/>
</td></tr>
<tr><td colspan="2" style="text-align:center;">
<hr width="100%" style="background-color:rgb(204,204,204);border:medium none;clear:both;display:block;font-size:0px;min-height:1px;line-height:0; margin: 16px 0px 16px 0px;"/>
</td></tr>
</table>
</td>
</tr>
<!-- CONTENT -->
<tr>
<td align="center" style="min-width: 590px;">
<table border="0" cellpadding="0" cellspacing="0" width="590" style="min-width: 590px; background-color: white; padding: 0px 8px 0px 8px; border-collapse:separate;">
<tr><td valign="top" style="font-size: 13px;">
<div>
${object.name},<br/><br/>
Se solicitó un restablecimiento de contraseña para la cuenta de Roomdoo vinculada a este correo electrónico.
Puede cambiar su contraseña siguiendo este enlace que permanecerá válido durante 15 minutos:<br/>
<!-- % if object.partner_id.signup_expiration &gt; datetime.datetime.now():-->
<div style="margin: 16px 0px 16px 0px;">
<a href="${object.company_id.url_app}/reset-password?token=${object.signup_token}"
style="background-color: #875A7B; padding: 8px 16px 8px 16px; text-decoration: none; color: #fff; border-radius: 5px; font-size:13px;">
Reestablecer contraseña
</a>
</div>
<!-- % else:-->
<!-- <div style="margin: 16px 0px 16px 0px;">-->
<!-- <a href="http://localhost:8080/reset-password"-->
<!-- style="background-color: #875A7B; padding: 8px 16px 8px 16px; text-decoration: none; color: #fff; border-radius: 5px; font-size:13px;">-->
<!-- Reestablecer contraseña-->
<!-- </a>-->
<!-- </div>-->
<!-- % endif-->
Puede ignorar este correo electrónico si no lo esperaba.<br/><br/>
Gracias,
% if user.signature:
<br/>
${user.signature | safe}
% endif
</div>
</td></tr>
<tr><td style="text-align:center;">
<hr width="100%" style="background-color:rgb(204,204,204);border:medium none;clear:both;display:block;font-size:0px;min-height:1px;line-height:0; margin: 16px 0px 16px 0px;"/>
</td></tr>
</table>
</td>
</tr>
<!-- FOOTER -->
<tr>
<td align="center" style="min-width: 590px;">
<table border="0" cellpadding="0" cellspacing="0" width="590" style="min-width: 590px; background-color: white; font-size: 11px; padding: 0px 8px 0px 8px; border-collapse:separate;">
<tr><td valign="middle" align="left">
${object.company_id.name}
</td></tr>
<tr><td valign="middle" align="left" style="opacity: 0.7;">
${object.company_id.phone}
% if object.company_id.email
| <a href="'mailto:%s' % ${object.company_id.email}" style="text-decoration:none; color: #454748;">${object.company_id.email}</a>
% endif
% if object.company_id.website
| <a href="'%s' % ${object.company_id.website}" style="text-decoration:none; color: #454748;">
${object.company_id.website}
</a>
% endif
</td></tr>
</table>
</td>
</tr>
</tbody>
</table>
</td></tr>
<!-- POWERED BY -->
<tr><td align="center" style="min-width: 590px;">
<table border="0" cellpadding="0" cellspacing="0" width="590" style="min-width: 590px; background-color: #F1F1F1; color: #454748; padding: 8px; border-collapse:separate;">
<tr><td style="text-align: center; font-size: 13px;">
Powered by <a target="_blank" href="https://www.odoo.com?utm_source=db&amp;utm_medium=auth" style="color: #875A7B;">Odoo</a>
</td></tr>
</table>
</td></tr>
</table>
</field>
<field name="lang">${object.lang}</field>
<field name="auto_delete" eval="True"/>
</record>
</data>
</odoo>