Skip to content

Commit

Permalink
Merge pull request #47 from gisce/ADD_template_generic_button
Browse files Browse the repository at this point in the history
Añadir plantilla botón genérico
  • Loading branch information
lcbautista authored Aug 13, 2024
2 parents 5f9732b + f709f8a commit 1dd1469
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions poweremail_generic_template/__terp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"data/banners/banner_generic_email_template_footer.xml",
"data/banners/banner_generic_email_template_css.xml",
"data/banners/banner_generic_email_template_company.xml",
"data/banners/banner_generic_email_template_button.xml",
],
"active": False,
"installable": True
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="report.banner" id="banner_generic_email_template_button">
<field name="name">Email genérico: boton (button)</field>
<field name="code">generic_email_template_button</field>
<field name="start_date">2000-01-01</field>
<field name="sequence">0</field>
<field name="res_model">no.required</field>
<field name="description">Componente que constituye el boton en el email genérico.</field>
<field name="html[en_US]" file="emails/generic/components/button/en.mako"/>
<field name="html[ca_ES]" file="emails/generic/components/button/en.mako"/>
<field name="html[es_ES]" file="emails/generic/components/button/en.mako"/>
</record>
</data>
</openerp>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<table role="presentation" border="0" cellpadding="0" cellspacing="0" class="btn btn-primary">
<tbody>
<tr>
<td align="center">
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td><a href="${env['button_url']}" target="_blank">${env['button_text']}</a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
1 change: 1 addition & 0 deletions poweremail_generic_template/emails/generic/index.mako
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ env['company'] = company
ctx = {
'lang': lang,
'raise_exception': True,
'banners': banners,
}
ctx.update(env)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# -*- coding: utf-8 -*-
from oopgrade.oopgrade import load_data
from tools import config


def up(cursor, installed_version):
if not installed_version or config.updating_all:
return
load_data(cursor, 'poweremail_generic_template', 'data/banners/banner_generic_email_template_button.xml')

def down(cursor, installed_version):
pass

migrate = up

0 comments on commit 1dd1469

Please sign in to comment.