Files
odoo_source/addons/portal/portal_data.xml
T
fka-odoo 85ca7f57c4 [IMP] portal: convert hardcoded email sent for new
portal users into a mail.template.

A new field is used in the wizard_user model, that is the portal
user itself. It was not stored previously probably because of the
old wizard limitations (links to existing records). Storing it
directly eases the process of retrieving the portal user.
2015-08-11 16:13:31 +02:00

56 lines
2.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<!-- The portal group add flag is_portal -->
<record id="base.group_portal" model="res.groups">
<field name="is_portal" eval="True"/>
</record>
<record id="mail_template_data_portal_welcome" model="mail.template">
<field name="name">Welcome New Portal User</field>
<field name="model_id" ref="portal.model_portal_wizard_user"/>
<field name="email_from">${(user.email or '')|safe}</field>
<field name="email_to">${object.partner_id.email}</field>
<field name="subject">Your Odoo account at ${user.company_id.name|safe}</field>
<field name="lang">${object.partner_id.lang}</field>
<field name="auto_delete" eval="True"/>
<field name="user_signature" eval="True"/>
<field name="body_html"><![CDATA[
<p>
Dear ${object.user_id.name or ''},
</p>
<p>
You have been given access to ${user.company_id.name}'s ${object.wizard_id.portal_id.name}.
</p>
<p>
Your login account data is:
</p>
<ul>
<li>Username: ${object.user_id.login or ''}</li>
</ul>
<ul>
<li>Portal: <a href="${'portal_url' in ctx and ctx['portal_url'] or ''}">${'portal_url' in ctx and ctx['portal_url'] or ''}</a></li>
</ul>
<ul>
<li>Database: ${'dbname' in ctx and ctx['dbname'] or ''}</li>
</ul>
<p>
You can set or change your password via the following url:
</p>
<ul>
<li><a href="${object.user_id.signup_url}">${object.user_id.signup_url}</a></li>
</ul>
<p>
${object.wizard_id.welcome_message or ''}
</p>
<p>---<br />
Odoo - Open Source Business Applications<br />
http://www.odoo.com<br />
</p>
]]>
</field>
</record>
</data>
</openerp>