Skip to content

Commit

Permalink
add generic template button
Browse files Browse the repository at this point in the history
  • Loading branch information
roniFCA committed Aug 13, 2024
1 parent 5f9732b commit 2d083e9
Show file tree
Hide file tree
Showing 5 changed files with 35 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,3 @@
<a href="${env['button_url']}">
<button>${env['button_text']}</button>
</a>
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 2d083e9

Please sign in to comment.