Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[T1906] FEAT: Add new communication config & email template for MyCompassion user signup 1/2 #2004

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions partner_communication_compassion/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"data/project_lifecycle_emails.xml",
"data/other_emails.xml",
"data/depart_communications.xml",
"data/signup_email_confirmation.xml",
"data/communication_config.xml",
"data/utm_data.xml",
"views/communication_job_view.xml",
Expand Down
12 changes: 12 additions & 0 deletions partner_communication_compassion/data/communication_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -418,5 +418,17 @@
<field name="send_mode">digital</field>
<field name="model_id" ref="model_compassion_hold" />
</record>

<record
id="user_account_confirmation"
model="partner.communication.config"
>
<field name="name">Signup Account Confirmation</field>
<field name="send_mode">digital</field>
<field name="email_template_id" ref="set_password_email" />
<field name="print_if_not_email">False</field>
<field name="model_id" ref="base.model_res_partner" />
</record>

</data>
</odoo>
192 changes: 192 additions & 0 deletions partner_communication_compassion/data/signup_email_confirmation.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<data noupdate="0">
<!-- Email template for partner account confirmation -->
<record id="set_password_email" model="mail.template">
<field name="name">My Compassion account confirmation</field>
<field
name="model_id"
ref="partner_communication.model_partner_communication_job"
/>
<field name="subject">My Compassion account confirmation</field>
<field
name="email_from"
>"${object.company_id.name | safe}"&lt;${(object.company_id.email or '[email protected]') | safe}&gt;</field>
<field name="email_to">${object.partner_id.email | safe}</field>
<field name="body_html" type="html">
<span>
% set partner = object.partner_id
% set partner_name = partner.firstname and (partner.firstname + ' ' + partner.lastname) or partner.name
% set company = partner.company_id
% set signup_url = partner.signup_url
% set website_url = object.env['ir.config_parameter'].sudo().get_param('web.base.url')
</span>

<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;"
>Welcome to My Compassion</span><br />
<span
style="font-size: 20px; font-weight: bold;"
>
${object.name}
</span>
</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>
Dear ${partner.name},<br /><br />
You have recently created an account on Compassion.<br
/><br />
Your sign-in email is: <b
>${partner.email}</b><br /><br />
To activate your account, please click the button below and set a password within the next 24 hours.
<div style="margin: 16px 0px 16px 0px;">
<a
href="${signup_url}"
style="background-color: #875A7B; padding: 8px 16px 8px 16px; text-decoration: none; color: #fff; border-radius: 5px; font-size:13px;"
>
Activate my account
</a>
</div><br /><br />
If you do not expect this, you can safely ignore this email. <br
/> <br />

Thanks for joining us!<br />

<br />The ${object.company_id.name} Team
</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:${object.company_id.email}"
style="text-decoration:none; color: #454748;"
>${object.company_id.email}</a>
% endif
% if object.company_id.website
| <a
href="${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>
Loading