Skip to content

Commit

Permalink
[IMP] sql_export_mail : Add migration script to fix email template
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-dacosta committed Jun 19, 2023
1 parent 66a68ec commit 755bd3b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
19 changes: 19 additions & 0 deletions sql_export_mail/migrations/16.0.1.0.0/noupdate_changes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version='1.0' encoding='utf-8' ?>
<odoo>

<record id="sql_export_mailer" model="mail.template">
<field name="email_to">{{object.get_email_address_for_template()}}</field>
<field name="subject">{{object.name or ''}}</field>
<field name="body_html" type="html">
<div
style="font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; "
>

<p>You will find the report <t
t-out="object.name or ''"
/> as an attachment of the mail.</p>

</div>
</field>
</record>
</odoo>
8 changes: 8 additions & 0 deletions sql_export_mail/migrations/16.0.1.0.0/post-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(env, version):
openupgrade.load_data(
env.cr, "sql_export_mail", "migrations/16.0.1.0.0/noupdate_changes.xml"
)

0 comments on commit 755bd3b

Please sign in to comment.