[IMP] sql_export_mail : Add migration script to fix email template

This commit is contained in:
Florian da Costa
2023-06-19 10:32:30 +02:00
committed by BT-ssteiner
parent 6298b598e2
commit 8f0adb5fbf
6 changed files with 97 additions and 130 deletions

View File

@@ -1,7 +1,7 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "SQL Export Mail",
"version": "16.0.1.0.0",
"version": "16.0.1.0.1",
"category": "Generic Modules",
"summary": "Send csv file generated by sql query by mail.",
"author": "Akretion,GRAP,Odoo Community Association (OCA)",

View File

@@ -17,50 +17,21 @@ msgstr ""
#. module: sql_export_mail
#: model:mail.template,body_html:sql_export_mail.sql_export_mailer
msgid ""
"<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-"
"serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n"
"\n"
"<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n"
"\n"
"<p>You will find the report ${object.name or ''} as an attachment of the mail.</p>\n"
" <p>You will find the report <t t-out=\"object.name or ''\"></t> as an "
"attachment of the mail.</p>\n"
"\n"
"</div>\n"
" "
msgstr ""
#. module: sql_export_mail
#: model:mail.template,subject:sql_export_mail.sql_export_mailer
msgid "${object.name or ''}"
msgstr ""
#. module: sql_export_mail
#: model:ir.model.fields,help:sql_export_mail.field_sql_export__mail_user_ids
msgid ""
"Add the users who want to receive the report by e-mail. You need to link the"
" sql query with a cron to send mail automatically"
msgstr ""
#. module: sql_export_mail
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export__assigned_attachment_ids
msgid "Assigned Attachments"
msgstr ""
#. module: sql_export_mail
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export__changeset_change_ids
msgid "Changeset Changes"
msgstr ""
#. module: sql_export_mail
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export__changeset_ids
msgid "Changesets"
msgstr ""
#. module: sql_export_mail
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export__count_pending_changeset_changes
msgid "Count Pending Changeset Changes"
msgstr ""
#. module: sql_export_mail
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export__count_pending_changesets
msgid "Count Pending Changesets"
"Add the users who want to receive the report by e-mail. You need to link the "
"sql query with a cron to send mail automatically"
msgstr ""
#. module: sql_export_mail
@@ -74,22 +45,13 @@ msgstr ""
msgid "Crons"
msgstr ""
#. module: sql_export_mail
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export__display_name
msgid "Display Name"
msgstr ""
#. module: sql_export_mail
#: model:ir.model.fields.selection,name:sql_export_mail.selection__sql_export__mail_condition__not_empty
msgid "File Not Empty"
msgstr ""
#. module: sql_export_mail
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export__id
msgid "ID"
msgstr ""
#. module: sql_export_mail
#. odoo-python
#: code:addons/sql_export_mail/models/sql_export.py:0
#, python-format
msgid ""
@@ -98,8 +60,8 @@ msgid ""
msgstr ""
#. module: sql_export_mail
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export____last_update
msgid "Last Modified on"
#: model_terms:ir.ui.view,arch_db:sql_export_mail.sql_export_mail_view_form
msgid "Mail"
msgstr ""
#. module: sql_export_mail
@@ -107,27 +69,23 @@ msgstr ""
msgid "Mail Condition"
msgstr ""
#. module: sql_export_mail
#: model:mail.template,name:sql_export_mail.sql_export_mailer
msgid "SQL Export"
msgstr ""
#. module: sql_export_mail
#: model:ir.model,name:sql_export_mail.model_sql_export
msgid "SQL export"
msgstr ""
#. module: sql_export_mail
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export__smart_search
msgid "Smart Search"
msgstr ""
#. module: sql_export_mail
#. odoo-python
#: code:addons/sql_export_mail/models/sql_export.py:0
#, python-format
msgid "The user does not have any e-mail address."
msgstr ""
#. module: sql_export_mail
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export__user_can_see_changeset
msgid "User Can See Changeset"
msgstr ""
#. module: sql_export_mail
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export__mail_user_ids
msgid "User to notify"
@@ -137,3 +95,8 @@ msgstr ""
#: model_terms:ir.ui.view,arch_db:sql_export_mail.sql_export_mail_view_form
msgid "Users Notified by e-mail"
msgstr ""
#. module: sql_export_mail
#: model:mail.template,subject:sql_export_mail.sql_export_mailer
msgid "{{object.name or ''}}"
msgstr ""

View File

@@ -18,32 +18,16 @@ msgstr ""
#. module: sql_export_mail
#: model:mail.template,body_html:sql_export_mail.sql_export_mailer
#, fuzzy
msgid ""
"\n"
"<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-"
"serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n"
"\n"
"<p>You will find the report ${object.name or ''} as an attachment of the "
"mail.</p>\n"
" <p>You will find the report <t t-out=\"object.name or ''\"></t> as an "
"attachment of the mail.</p>\n"
"\n"
"</div>\n"
" "
msgstr ""
"\n"
"<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-"
"serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n"
"\n"
"<p>Vous trouverez le rapport ${object.name or ''} en pièce jointe de ce mail."
"</p>\n"
"\n"
"</div>\n"
" "
#. module: sql_export_mail
#: model:mail.template,subject:sql_export_mail.sql_export_mailer
msgid "${object.name or ''}"
msgstr "${object.name or ''}"
#. module: sql_export_mail
#: model:ir.model.fields,help:sql_export_mail.field_sql_export__mail_user_ids
@@ -54,31 +38,6 @@ msgstr ""
"Ajoutez les utilisateurs voulant recevoir le rapport par mail. Vous devez "
"ensuite créer une tâche planifiée pour envoyer le mail automatiquement."
#. module: sql_export_mail
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export__assigned_attachment_ids
msgid "Assigned Attachments"
msgstr ""
#. module: sql_export_mail
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export__changeset_change_ids
msgid "Changeset Changes"
msgstr ""
#. module: sql_export_mail
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export__changeset_ids
msgid "Changesets"
msgstr ""
#. module: sql_export_mail
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export__count_pending_changeset_changes
msgid "Count Pending Changeset Changes"
msgstr ""
#. module: sql_export_mail
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export__count_pending_changesets
msgid "Count Pending Changesets"
msgstr ""
#. module: sql_export_mail
#: model_terms:ir.ui.view,arch_db:sql_export_mail.sql_export_mail_view_form
msgid "Create Cron"
@@ -90,22 +49,13 @@ msgstr "Créer une tâche planfiée"
msgid "Crons"
msgstr "Tâches planifiées"
#. module: sql_export_mail
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export__display_name
msgid "Display Name"
msgstr ""
#. module: sql_export_mail
#: model:ir.model.fields.selection,name:sql_export_mail.selection__sql_export__mail_condition__not_empty
msgid "File Not Empty"
msgstr "Fichier non vide."
#. module: sql_export_mail
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export__id
msgid "ID"
msgstr ""
#. module: sql_export_mail
#. odoo-python
#: code:addons/sql_export_mail/models/sql_export.py:0
#, python-format
msgid ""
@@ -116,8 +66,8 @@ msgstr ""
"mail si celle-ci contient des paramètres."
#. module: sql_export_mail
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export____last_update
msgid "Last Modified on"
#: model_terms:ir.ui.view,arch_db:sql_export_mail.sql_export_mail_view_form
msgid "Mail"
msgstr ""
#. module: sql_export_mail
@@ -126,27 +76,23 @@ msgstr ""
msgid "Mail Condition"
msgstr "Condition d'envoi par mail"
#. module: sql_export_mail
#: model:mail.template,name:sql_export_mail.sql_export_mailer
msgid "SQL Export"
msgstr ""
#. module: sql_export_mail
#: model:ir.model,name:sql_export_mail.model_sql_export
msgid "SQL export"
msgstr "Export SQL"
#. module: sql_export_mail
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export__smart_search
msgid "Smart Search"
msgstr ""
#. module: sql_export_mail
#. odoo-python
#: code:addons/sql_export_mail/models/sql_export.py:0
#, python-format
msgid "The user does not have any e-mail address."
msgstr "L'utilisateur selectionné n'a pas d'addresse mail."
#. module: sql_export_mail
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export__user_can_see_changeset
msgid "User Can See Changeset"
msgstr ""
#. module: sql_export_mail
#: model:ir.model.fields,field_description:sql_export_mail.field_sql_export__mail_user_ids
msgid "User to notify"
@@ -156,3 +102,35 @@ msgstr "Utilisateurs à notifier par mail"
#: model_terms:ir.ui.view,arch_db:sql_export_mail.sql_export_mail_view_form
msgid "Users Notified by e-mail"
msgstr "Utilisateurs notifiés par mail"
#. module: sql_export_mail
#: model:mail.template,subject:sql_export_mail.sql_export_mailer
msgid "{{object.name or ''}}"
msgstr ""
#, fuzzy
#~ msgid ""
#~ "\n"
#~ "<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-"
#~ "serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; "
#~ "\">\n"
#~ "\n"
#~ "<p>You will find the report ${object.name or ''} as an attachment of the "
#~ "mail.</p>\n"
#~ "\n"
#~ "</div>\n"
#~ " "
#~ msgstr ""
#~ "\n"
#~ "<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-"
#~ "serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; "
#~ "\">\n"
#~ "\n"
#~ "<p>Vous trouverez le rapport ${object.name or ''} en pièce jointe de ce "
#~ "mail.</p>\n"
#~ "\n"
#~ "</div>\n"
#~ " "
#~ msgid "${object.name or ''}"
#~ msgstr "${object.name or ''}"

View File

@@ -16,20 +16,14 @@ msgstr ""
#. module: sql_export_mail
#: model:mail.template,body_html:sql_export_mail.sql_export_mailer
msgid ""
"\n"
"<div style=\"font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n"
"\n"
"<p>You will find the report ${object.name or ''} as an attachment of the mail.</p>\n"
" <p>You will find the report <t t-out=\"object.name or ''\"></t> as an attachment of the mail.</p>\n"
"\n"
"</div>\n"
" "
msgstr ""
#. module: sql_export_mail
#: model:mail.template,subject:sql_export_mail.sql_export_mailer
msgid "${object.name or ''}"
msgstr ""
#. module: sql_export_mail
#: model:ir.model.fields,help:sql_export_mail.field_sql_export__mail_user_ids
msgid ""
@@ -98,3 +92,8 @@ msgstr ""
#: model_terms:ir.ui.view,arch_db:sql_export_mail.sql_export_mail_view_form
msgid "Users Notified by e-mail"
msgstr ""
#. module: sql_export_mail
#: model:mail.template,subject:sql_export_mail.sql_export_mailer
msgid "{{object.name or ''}}"
msgstr ""

View File

@@ -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>

View File

@@ -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"
)