Skip to content

Commit

Permalink
new: module with generic email template
Browse files Browse the repository at this point in the history
  • Loading branch information
lcbautista committed Jul 17, 2024
1 parent 69a8bf1 commit 2547459
Show file tree
Hide file tree
Showing 23 changed files with 591 additions and 0 deletions.
Empty file.
24 changes: 24 additions & 0 deletions poweremail_generic_template/__terp__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
{
"name": "poweremail_basic_template",
"description": """Implements a generic email template using the banners module""",
"version": "0-dev",
"author": "GISCE",
"category": "GISCEMaster",
"depends": [
"poweremail",
"report_banner"
],
"init_xml": [],
"demo_xml": [],
"update_xml": [
"data/banners/banner_generic_email_template_title.xml",
"data/banners/banner_generic_email_template_header.xml",
"data/banners/banner_generic_email_template_preheader.xml",
"data/banners/banner_generic_email_template_body.xml",
"data/banners/banner_generic_email_template_footer.xml",
"data/banners/banner_generic_email_template_css.xml",
],
"active": False,
"installable": True
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="report.banner" id="banner_generic_email_template_body">
<field name="name">Plantilla banner - Email genérico: body</field>
<field name="code">generic_email_template_body</field>
<field name="start_date">2000-01-01</field>
<field name="sequence">0</field>
<field name="res_model">no.required</field>
<field name="description">
Este banner sirve como plantilla para generar otros banners (duplicando)
que contengan el texto (body) de una plantilla en concreto utilizando
el correo genérico.

En el banner duplicado se debe configurar el dominio por objeto a la
plantilla de Poweremail correspondiente y el contenido del campo "Texto (HTML)".
</field>
<field name="html[en_US]" file="emails/generic/components/body/en.mako"/>
<field name="html[ca_ES]" file="emails/generic/components/body/ca.mako"/>
<field name="html[es_ES]" file="emails/generic/components/body/es.mako"/>
</record>
</data>
</openerp>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="report.banner" id="banner_generic_email_template_css">
<field name="name">Plantilla banner - Email genérico: CSS</field>
<field name="code">generic_email_template_css</field>
<field name="start_date">2000-01-01</field>
<field name="sequence">0</field>
<field name="res_model">no.required</field>
<field name="description">
Este banner sirve como plantilla para generar otros banners (duplicando)
que contengan el "CSS" de una plantilla en concreto utilizando
el correo genérico.

En el banner duplicado se debe configurar el dominio por objeto a la
plantilla de Poweremail correspondiente y el contenido del campo "Texto (HTML)".
</field>
<field name="html[en_US]" file="emails/generic/components/style.css"/>
<field name="html[ca_ES]" file="emails/generic/components/style.css"/>
<field name="html[es_ES]" file="emails/generic/components/style.css"/>
</record>
</data>
</openerp>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="report.banner" id="banner_generic_email_template_footer">
<field name="name">Plantilla banner - Email genérico: footer</field>
<field name="code">generic_email_template_footer</field>
<field name="start_date">2000-01-01</field>
<field name="sequence">0</field>
<field name="res_model">no.required</field>
<field name="description">
Este banner sirve como plantilla para generar otros banners (duplicando)
que contengan el pie de email (footer) de una plantilla en concreto utilizando
el correo genérico.

En el banner duplicado se debe configurar el dominio por objeto a la
plantilla de Poweremail correspondiente y el contenido del campo "Texto (HTML)".
</field>
<field name="html[en_US]" file="emails/generic/components/footer/en.mako"/>
<field name="html[ca_ES]" file="emails/generic/components/footer/en.mako"/>
<field name="html[es_ES]" file="emails/generic/components/footer/en.mako"/>
</record>
</data>
</openerp>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="report.banner" id="banner_generic_email_template_header">
<field name="name">Plantilla banner - Email genérico: header</field>
<field name="code">generic_email_template_header</field>
<field name="start_date">2000-01-01</field>
<field name="sequence">0</field>
<field name="res_model">no.required</field>
<field name="description">
Este banner sirve como plantilla para generar otros banners (duplicando)
que contengan la cabecera (header) de una plantilla en concreto utilizando
el correo genérico.

En el banner duplicado se debe configurar el dominio por objeto a la
plantilla de Poweremail correspondiente y el contenido del campo "Texto (HTML)".
</field>
<field name="html[en_US]" file="emails/generic/components/header/en.mako"/>
<field name="html[ca_ES]" file="emails/generic/components/header/ca.mako"/>
<field name="html[es_ES]" file="emails/generic/components/header/es.mako"/>
</record>
</data>
</openerp>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="report.banner" id="banner_generic_email_template_preheader">
<field name="name">Plantilla banner - Email genérico: preheader</field>
<field name="code">generic_email_template_preheader</field>
<field name="start_date">2000-01-01</field>
<field name="sequence">0</field>
<field name="res_model">no.required</field>
<field name="description">
Este banner sirve como plantilla para generar otros banners (duplicando)
que contengan el "preheader"* de una plantilla en concreto utilizando
el correo genérico.

En el banner duplicado se debe configurar el dominio por objeto a la
plantilla de Poweremail correspondiente y el contenido del campo "Texto (HTML)".

* algunos clientes de correo eléctronico utilizan este campo en la
previsualización del correo como complemento al asunto. Por ejemplo,
para el correo de la factura el asunto podría ser: "Nueva factura emitida"
y el preheader "El importe ha sido de X €".
</field>
<field name="html[en_US]" file="emails/generic/components/preheader/en.mako"/>
<field name="html[ca_ES]" file="emails/generic/components/preheader/ca.mako"/>
<field name="html[es_ES]" file="emails/generic/components/preheader/es.mako"/>
</record>
</data>
</openerp>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="report.banner" id="banner_generic_email_template_title">
<field name="name">Plantilla banner - Email genérico: título</field>
<field name="code">generic_email_template_title</field>
<field name="start_date">2000-01-01</field>
<field name="sequence">0</field>
<field name="res_model">no.required</field>
<field name="description">
Este banner sirve como plantilla para generar otros banners (duplicando)
que contengan el título (title) de una plantilla en concreto utilizando
el correo genérico.

En el banner duplicado se debe configurar el dominio por objeto a la
plantilla de Poweremail correspondiente y el contenido del campo "Texto (HTML)".
</field>
<field name="html[en_US]" file="emails/generic/components/title/en.mako"/>
<field name="html[ca_ES]" file="emails/generic/components/title/ca.mako"/>
<field name="html[es_ES]" file="emails/generic/components/title/es.mako"/>
</record>
</data>
</openerp>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<p>Hello!</p>
<p>This an example of the generic email.</p>
<p>Kind regards,</p>
</td>
</tr>
</table>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<p>Bon dia!</p>
<p>Això és un exemple del correu electrònic genèric.</p>
<p>Atentament,</p>
</td>
</tr>
</table>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<p>Hola!</p>
<p>Esto es un ejemplo del cuerpo del correo electrónico genérico.</p>
<p>Atentamente,</p>
</td>
</tr>
</table>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<% company = object.company_id %>
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="content-block">
<span class="apple-link">${company.partner_id.address[0].street}</span>
<br> 📞 ${company.partner_id.address[0].phone} / ${company.partner_id.address[0].mobile}
<br> 📨 ${company.partner_id.address[0].email}
</td>
</tr>
<tr>
<td class="content-block powered-by">
<a href="${company.partner_id.website}">${company.partner_id.name}</a>.
</td>
</tr>
</table>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="align-center" width="100%">
<img src="https://gisce.net/images/logo.png" height="100" alt="Logo empresa">
</td>
</tr>
</table>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="align-center" width="100%">
<img src="https://gisce.net/images/logo.png" height="100" alt="Company logo">
</td>
</tr>
</table>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="align-center" width="100%">
<img src="https://gisce.net/images/logo.png" height="100" alt="Logo empresa">
</td>
</tr>
</table>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Preheader no configurado
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
No preheader configured
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Preheader no configurado
Loading

0 comments on commit 2547459

Please sign in to comment.