Skip to content
Snippets Groups Projects

Fix/edit email templates

Merged konykon requested to merge fix/edit-email-templates into dev
All threads resolved!
@@ -20,20 +20,42 @@
<field name="auto_delete" eval="False"/>
<field name="lang">${(object.lang or object.company_id.default_lang_id.code or object.company_id.partner_id.lang)}</field>
<field name="is_cooperator_template" eval="True"/>
<field name="body_html"><![CDATA[
<field
name="body_html"
><![CDATA[
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; ">
<p>Hello,</p>
<p>Thank you for filling out the form and request to join the Community.</p>
<p>In the coming weeks we will contact you to indicate the next steps</p>
<p>Here is a copy of the data we received:</p>
<div id="field_list_div" style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 10px; color: rgb(34, 34, 34); background-color: #FFF; ">
<p> - Request to join: ${object.company_id.name}</p>
<p> - Firstname: ${object.firstname}</p>
<p> - Lastname: ${object.lastname}</p>
<p> - VAT: ${object.vat}</p>
<p> - Address: ${object.address}</p>
<p> - Zip code: ${object.zip_code}</p>
<p> - City: ${object.city}</p>
<p> - Country: ${object.country_id.name}</p>
<p> - Email: ${object.email}</p>
<p> - Phone: ${(object.phone or '')}</p>
<p> - Gender: ${dict(object.fields_get(allfields=['gender'])['gender']['selection'])[object.gender]}</p>
<p> - Birthdate: ${object.birthdate}</p>
<p> - Language: ${dict(object.fields_get(allfields=['lang'])['lang']['selection'])[object.lang]}</p>
<p> - Initial share amount: ${object.subscription_amount}</p>
% if object.payment_mode_id.payment_method_id.code == 'sepa_direct_debit':
<p> - Bank account: ${object.iban}</p>
<p> - I authorize bank receipts to be sent to this account: ${object.mandate_approved and 'SI' or 'NO'}</p>
% endif
</div>
<br />
<p>We keep in touch for any questions.</p>
<p>Yours faithfully,</p>
<p>Somcomunitats.coop team </p>
<p><a href="https://web-test.somcomunitats.coop/recursos/">Resources and FAQs</a></p>
</div>
]]> </field>
]]></field>
</record>
<function name="write" model="ir.model.data">
@@ -65,11 +87,15 @@
<field name="report_template"></field>
<!--
<field name="report_template" ref="action_cooperator_invoices" />
<field name="report_name">${(object.name or "capital_release_request").replace("/", "_")}${object.state == "draft" and "_draft" or ""}</field>
<field
name="report_name"
>${(object.name or "capital_release_request").replace("/", "_")}${object.state == "draft" and "_draft" or ""}</field>
-->
<field name="lang">${object.partner_id.lang}</field>
<field name="is_cooperator_template" eval="True"/>
<field name="body_html"><![CDATA[
<field
name="body_html"
><![CDATA[
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; ">
<p>Hello ${object.subscription_request.firstname},</p>
@@ -123,7 +149,7 @@
<img src=${object.company_id.logo_url}>
</div>
</div>
]]> </field>
]]></field>
</record>
<function name="write" model="ir.model.data">
@@ -156,11 +182,15 @@
<field name="report_template"></field>
<!--
<field name="report_template" ref="action_cooperator_report_certificat" />
<field name="report_name">Certificate ${(object.cooperator_register_number or '')}</field>
<field
name="report_name"
>Certificate ${(object.cooperator_register_number or '')}</field>
-->
<field name="lang">${object.lang}</field>
<field name="is_cooperator_template" eval="True"/>
<field name="body_html"><![CDATA[
<field
name="body_html"
><![CDATA[
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; ">
<p>Hello ${object.subscription_request_ids[0].firstname},</p>
@@ -202,7 +232,7 @@
<img src=${object.env.company.logo_url}>
</div>
</div>
]]> </field>
]]></field>
</record>
<function name="write" model="ir.model.data">
@@ -223,20 +253,45 @@
<field name="auto_delete" eval="False"/>
<field name="lang">${(object.lang or object.company_id.default_lang_id.code or object.company_id.partner_id.lang)}</field>
<field name="is_cooperator_template" eval="True"/>
<field name="body_html"><![CDATA[
<field
name="body_html"
><![CDATA[
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; ">
<p>Hello,</p>
<p>Thank you for filling out the form and request to join the Community.</p>
<p>In the coming weeks we will contact you to indicate the next steps</p>
<p>Here is a copy of the data we received:</p>
<div id="field_list_div" style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 10px; color: rgb(34, 34, 34); background-color: #FFF; ">
<p> - Request to join: ${object.company_id.name}</p>
<p> - Company Name: ${object.company_name}</p>
<p> - Company Email: ${object.company_email}</p>
<p> - VAT: ${object.vat}</p>
<p> - Address: ${object.address}</p>
<p> - Zip code: ${object.zip_code}</p>
<p> - City: ${object.city}</p>
<p> - Country: ${object.country_id.name}</p>
<p> - Firstname: ${object.firstname}</p>
<p> - Lastname: ${object.lastname}</p>
<p> - Function: ${object.contact_person_function}</p>
<p> - Email: ${object.email}</p>
<p> - Phone: ${(object.phone or '')}</p>
<p> - Gender: ${dict(object.fields_get(allfields=['gender'])['gender']['selection'])[object.gender]}</p>
<p> - Birthdate: ${object.birthdate}</p>
<p> - Language: ${dict(object.fields_get(allfields=['lang'])['lang']['selection'])[object.lang]}</p>
<p> - Initial share amount: ${object.subscription_amount}</p>
% if object.payment_mode_id.payment_method_id.code == 'sepa_direct_debit':
<p> - Bank account: ${object.iban}</p>
<p> - I authorize bank receipts to be sent to this account: ${object.mandate_approved and 'SI' or 'NO'}</p>
% endif
</div>
<br />
<p>We keep in touch for any questions.</p>
<p>Yours faithfully,</p>
<p>Somcomunitats.coop team </p>
<p><a href="https://web-test.somcomunitats.coop/recursos/">Resources and FAQs</a></p>
</div>
]]> </field>
]]></field>
</record>
<record id="email_template_confirmation_voluntary_share" model="mail.template">
@@ -250,7 +305,9 @@
<field name="auto_delete" eval="False"/>
<field name="lang">${(object.lang or object.company_id.default_lang_id.code or object.company_id.partner_id.lang)}</field>
<field name="is_cooperator_template" eval="True"/>
<field name="body_html"><![CDATA[
<field
name="body_html"
><![CDATA[
<p>Dear ${object.firstname},</p>
<p>
We confirm that we have correctly received your request to make a voluntary contribution to the capital
@@ -293,7 +350,7 @@
${object.company_id.name} team
</p>
<img src="/web/image/res.company/${object.company_id.id}/logo" style="width: 150px;height: 80px;"/>
]]> </field>
]]></field>
</record>
<record id="email_template_conditions_voluntary_share" model="mail.template">
@@ -307,7 +364,9 @@
<field name="auto_delete" eval="False"/>
<field name="lang">${(object.lang or object.company_id.default_lang_id.code or object.company_id.partner_id.lang)}</field>
<field name="is_cooperator_template" eval="True"/>
<field name="body_html"><![CDATA[
<field
name="body_html"
><![CDATA[
<p>Dear ${object.name},</p>
<p>
Last week we charged your account corresponding to your voluntary contribution to the share capital of the
@@ -337,7 +396,7 @@
${object.company_id.name} team
</p>
<img src="/web/image/res.company/${object.company_id.id}/logo" style="width: 150px;height: 80px;"/>
]]> </field>
]]></field>
</record>
</data>
Loading