Files
odoo_source/addons/website_slides/data/mail_data.xml
T
Aurélien Warnon e5536fc07b [IMP] website_slides: add invite wizard for 'invite' slide_channel
Purpose
=======

Currently, the slide_channels having a visibility configured as 'invite' could
only add members manually.

This commit adds an 'Invite' button on top of the slide channel form that opens
a wizard allowing to send emails to contacts and also make them members of the
related slide channel.
2019-02-11 17:47:22 +00:00

89 lines
4.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="slide_template_published" model="mail.template">
<field name="name">Slide Published</field>
<field name="model_id" ref="model_slide_slide"/>
<field name="subject">New ${object.slide_type} published on ${object.channel_id.name}</field>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Hello<br/><br/>
A new ${object.slide_type} <strong>${object.name}</strong> has been published on ${object.channel_id.name} at ${format_tz(object.write_date, tz=user.tz)}
<div style="margin: 16px 8px 16px 8px; text-align: center;">
<a href="${object.website_url}">
<img alt="${object.name}" src="${ctx['base_url']}/web/image/slide.slide/${object.id}/image" style="height:auto; width:150px; margin: 16px;"/>
</a>
</div>
<div style="margin: 16px 8px 16px 8px; text-align: center;">
<a href="${object.website_url}"
style="background-color: #875a7b; padding: 8px 16px 8px 16px; text-decoration: none; color: #fff; border-radius: 5px;">View <strong>${object.name}</strong></a>
</div>
</p>
</div>
</field>
<field name="auto_delete" eval="True"/>
<field name="user_signature" eval="True"/>
</record>
<record id="slide_template_shared" model="mail.template">
<field name="name">Slide Shared</field>
<field name="model_id" ref="model_slide_slide"/>
<field name="subject">${user.name} shared a ${object.slide_type} with you!</field>
<field name="email_from">${(user.email or '')|safe}</field>
<field name="email_to">${ctx['email']}</field>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Hello<br/><br/>
${user.name} shared the ${object.slide_type} <strong>${object.name}</strong> with you!
<div style="margin: 16px 8px 16px 8px; text-align: center;">
<a href="${object.website_url}">
<img alt="${object.name}" src="${ctx['base_url']}/web/image/slide.slide/${object.id}/image" style="height:auto; width:150px; margin: 16px;"/>
</a>
</div>
<div style="margin: 16px 8px 16px 8px; text-align: center;">
<a href="${object.website_url}"
style="background-color: #875a7b; padding: 8px 16px 8px 16px; text-decoration: none; color: #fff; border-radius: 5px;">View <strong>${object.name}</strong></a>
</div>
</p>
</div>
</field>
<field name="auto_delete" eval="True"/>
<field name="user_signature" eval="True"/>
</record>
<!-- Channel subtypes -->
<record id="mt_channel_slide_published" model="mail.message.subtype">
<field name="name">Presentation Published</field>
<field name="res_model">slide.channel</field>
<field name="default" eval="True"/>
<field name="description">Presentation Published</field>
</record>
<!-- Slide channel invite feature -->
<record id="mail_template_slide_channel_invite" model="mail.template">
<field name="name">Channel: Invite by email</field>
<field name="model_id" ref="model_slide_channel_partner" />
<field name="subject">You have been invited to join ${object.channel_id.name}</field>
<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 or 'participant'}<br/><br/>
You have been invited to join a new course: ${object.channel_id.name}.
<div style="margin: 16px 0px 16px 0px;">
<a href="${(object.channel_id.website_url) | safe}"
style="background-color: #875A7B; padding: 8px 16px 8px 16px; text-decoration: none; color: #fff; border-radius: 5px; font-size:13px;">
Click here to start the course.
</a>
</div>
Enjoy this exclusive content !
</p>
</div>
</field>
<field name="auto_delete" eval="True"/>
<field name="user_signature" eval="False"/>
</record>
</data>
</odoo>