From 624c7b2f39a9a1ec6c745890097bdd8bb79a27bd Mon Sep 17 00:00:00 2001
From: Yann Papouin
Date: Wed, 20 Oct 2021 11:04:28 +0000
Subject: [PATCH] Added translation using Weblate (French)
---
scheduler_error_mailer/__manifest__.py | 2 +-
.../data/ir_cron_email_tpl.xml | 2 +-
scheduler_error_mailer/i18n/de.po | 4 +-
scheduler_error_mailer/i18n/es.po | 4 +-
scheduler_error_mailer/i18n/fr.po | 173 ++++++++++++++++++
scheduler_error_mailer/i18n/hr.po | 4 +-
scheduler_error_mailer/i18n/pt.po | 23 ++-
scheduler_error_mailer/i18n/pt_BR.po | 124 ++++++++-----
.../i18n/scheduler_error_mailer.pot | 2 +-
scheduler_error_mailer/i18n/sl.po | 4 +-
scheduler_error_mailer/i18n/zh_CN.po | 115 ++++++++----
.../migrations/12.0.1.1.0/post-migration.py | 13 ++
scheduler_error_mailer/models/ir_cron.py | 2 +-
13 files changed, 375 insertions(+), 97 deletions(-)
create mode 100644 scheduler_error_mailer/i18n/fr.po
create mode 100644 scheduler_error_mailer/migrations/12.0.1.1.0/post-migration.py
diff --git a/scheduler_error_mailer/__manifest__.py b/scheduler_error_mailer/__manifest__.py
index 92e61ac59..1ddd01b19 100644
--- a/scheduler_error_mailer/__manifest__.py
+++ b/scheduler_error_mailer/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'Scheduler Error Mailer',
- 'version': '12.0.1.0.0',
+ 'version': '12.0.1.1.0',
'category': 'Extra Tools',
'license': 'AGPL-3',
'author': "Akretion,Sodexis,Odoo Community Association (OCA)",
diff --git a/scheduler_error_mailer/data/ir_cron_email_tpl.xml b/scheduler_error_mailer/data/ir_cron_email_tpl.xml
index a6696e59f..14563fba6 100644
--- a/scheduler_error_mailer/data/ir_cron_email_tpl.xml
+++ b/scheduler_error_mailer/data/ir_cron_email_tpl.xml
@@ -18,7 +18,7 @@
Odoo tried to run the scheduler ${object.name or ''} in the database ${ctx.get('dbname')} but it failed. Here is the error message :
-${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to get the error message from the context.'}
+${ctx.get('job_exception') or 'Failed to get the error message from the context.'}
You may check the logs of the Odoo server to get more information about this failure.
diff --git a/scheduler_error_mailer/i18n/de.po b/scheduler_error_mailer/i18n/de.po
index 62e2afddb..444f2a1d1 100644
--- a/scheduler_error_mailer/i18n/de.po
+++ b/scheduler_error_mailer/i18n/de.po
@@ -31,8 +31,8 @@ msgid ""
"message :
\n"
"\n"
"\n"
-"${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to "
-"get the error message from the context.'}\n"
+"${ctx.get('job_exception') or 'Failed to get the error message from the "
+"context.'}\n"
"\n"
"\n"
"You may check the logs of the Odoo server to get more information about "
diff --git a/scheduler_error_mailer/i18n/es.po b/scheduler_error_mailer/i18n/es.po
index e920355fc..162536d5e 100644
--- a/scheduler_error_mailer/i18n/es.po
+++ b/scheduler_error_mailer/i18n/es.po
@@ -32,8 +32,8 @@ msgid ""
"message :
\n"
"\n"
"\n"
-"${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to "
-"get the error message from the context.'}\n"
+"${ctx.get('job_exception') or 'Failed to get the error message from the "
+"context.'}\n"
"\n"
"\n"
"You may check the logs of the Odoo server to get more information about "
diff --git a/scheduler_error_mailer/i18n/fr.po b/scheduler_error_mailer/i18n/fr.po
new file mode 100644
index 000000000..ad43b27f3
--- /dev/null
+++ b/scheduler_error_mailer/i18n/fr.po
@@ -0,0 +1,173 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * scheduler_error_mailer
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 12.0\n"
+"Report-Msgid-Bugs-To: \n"
+"PO-Revision-Date: 2021-10-20 11:12+0000\n"
+"Last-Translator: Yann Papouin \n"
+"Language-Team: none\n"
+"Language: fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: nplurals=2; plural=n > 1;\n"
+"X-Generator: Weblate 4.3.2\n"
+
+#. module: scheduler_error_mailer
+#: model:mail.template,body_html:scheduler_error_mailer.scheduler_error_mailer
+msgid ""
+"\n"
+" \n"
+"\n"
+"\n"
+"
Odoo tried to run the scheduler ${object.name or ''} in the "
+"database ${ctx.get('dbname')} but it failed. Here is the error "
+"message :
\n"
+"\n"
+"
\n"
+"${ctx.get('job_exception') or 'Failed to get the error message from the "
+"context.'}\n"
+"\n"
+"\n"
+"
You may check the logs of the Odoo server to get more information about "
+"this failure.
\n"
+"\n"
+"
Properties of the scheduler ${object.name or ''} :
\n"
+"
\n"
+"- Model : ${object.model or ''}
\n"
+"- Method : ${object.function or ''}
\n"
+"- Arguments : ${object.args or ''}
\n"
+"- Interval : ${object.interval_number or '0'} ${object.interval_type or ''}"
+"
\n"
+"- Number of calls : ${object.numbercall or '0'}
\n"
+"- Repeat missed : ${object.doall}
\n"
+"- User : ${object.user_id.name or ''}
\n"
+"
\n"
+"\n"
+"
\n"
+"--
\n"
+"Automatic e-mail sent by Odoo. Do not reply.
\n"
+"Database : ${ctx.get('dbname')}\n"
+"
\n"
+"
\n"
+" \n"
+" "
+msgstr ""
+
+#. module: scheduler_error_mailer
+#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__email_template_id
+msgid "Error E-mail Template"
+msgstr "Modèle d’e-mail d’erreur"
+
+#. module: scheduler_error_mailer
+#: model:ir.model,name:scheduler_error_mailer.model_ir_cron
+msgid "Scheduled Actions"
+msgstr "Actions planifiées"
+
+#. module: scheduler_error_mailer
+#: model:ir.model.fields,help:scheduler_error_mailer.field_ir_cron__email_template_id
+msgid "Select the email template that will be sent when this scheduler fails."
+msgstr ""
+"Sélectionnez le modèle d’e-mail qui sera envoyé en cas d’échec de ce "
+"planificateur."
+
+#. module: scheduler_error_mailer
+#: code:addons/scheduler_error_mailer/models/ir_cron.py:55
+#, python-format
+msgid "Task failure with UID = %d."
+msgstr "Échec de la tâche avec UID = %d."
+
+#. module: scheduler_error_mailer
+#: model:ir.actions.server,name:scheduler_error_mailer.test_scheduler_error_mailer_ir_actions_server
+#: model:ir.cron,cron_name:scheduler_error_mailer.test_scheduler_error_mailer
+#: model:ir.cron,name:scheduler_error_mailer.test_scheduler_error_mailer
+msgid "Test Scheduler Error Mailer"
+msgstr "Test du mailer d’erreur du planificateur"
+
+#. module: scheduler_error_mailer
+#: model:mail.template,subject:scheduler_error_mailer.scheduler_error_mailer
+msgid "[DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED"
+msgstr "[DB ${ctx.get('dbname')}] Planificateur '${object.name or ''}' ECHEC"
+
+#~ msgid ""
+#~ "\n"
+#~ " \n"
+#~ "\n"
+#~ "\n"
+#~ "
Odoo tried to run the scheduler ${object.name or ''} in the "
+#~ "database ${ctx.get('dbname')} but it failed. Here is the error "
+#~ "message :
\n"
+#~ "\n"
+#~ "
\n"
+#~ "${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed "
+#~ "to get the error message from the context.'}\n"
+#~ "\n"
+#~ "\n"
+#~ "
You may check the logs of the Odoo server to get more information "
+#~ "about this failure.
\n"
+#~ "\n"
+#~ "
Properties of the scheduler ${object.name or ''} :
\n"
+#~ "
\n"
+#~ "- Model : ${object.model or ''}
\n"
+#~ "- Method : ${object.function or ''}
\n"
+#~ "- Arguments : ${object.args or ''}
\n"
+#~ "- Interval : ${object.interval_number or '0'} ${object.interval_type or "
+#~ "''}
\n"
+#~ "- Number of calls : ${object.numbercall or '0'}
\n"
+#~ "- Repeat missed : ${object.doall}
\n"
+#~ "- User : ${object.user_id.name or ''}
\n"
+#~ "
\n"
+#~ "\n"
+#~ "
\n"
+#~ "--
\n"
+#~ "Automatic e-mail sent by Odoo. Do not reply.
\n"
+#~ "Database : ${ctx.get('dbname')}\n"
+#~ "
\n"
+#~ "
\n"
+#~ " \n"
+#~ " "
+#~ msgstr ""
+#~ "\n"
+#~ " \n"
+#~ "\n"
+#~ "\n"
+#~ "
Odoo a essayé d’exécuter le planificateur ${object.name ou ''}"
+#~ "em> dans la base de données ${ctx.get('dbname')} mais cela a "
+#~ "échoué. Voici le message d’erreur :
\n"
+#~ "\n"
+#~ "
\n"
+#~ "${ctx.get('job_exception') et ctx.get('job_exception').value ou "
+#~ "'Impossible d’obtenir le message d’erreur du contexte.'}\n"
+#~ "\n"
+#~ "\n"
+#~ "
Vous pouvez consulter les journaux du serveur Odoo pour obtenir plus "
+#~ "d’informations sur cette défaillance.
\n"
+#~ "\n"
+#~ "
Propriétés du planificateur ${object.name ou ''} :
\n"
+#~ "
\n"
+#~ "- Modèle : ${object.model ou ''}
\n"
+#~ "- Méthode : ${object.function ou ''}
\n"
+#~ "- Arguments : ${object.args ou ''}
\n"
+#~ "- Intervalle : ${object.interval_number ou '0'} ${object.interval_type "
+#~ "ou ''}
\n"
+#~ "- Nombre d’appels : ${object.numbercall ou '0'}
\n"
+#~ "- Recommencer les manqués : ${object.doall}
\n"
+#~ "- Utilisateur : ${object.user_id.name ou ''}
\n"
+#~ "
\n"
+#~ "\n"
+#~ "
\n"
+#~ "--
\n"
+#~ "E-mail automatique envoyé par Odoo. Ne pas répondre.
\n"
+#~ "Base de données : ${ctx.get('dbname')}\n"
+#~ "
\n"
+#~ "
\n"
+#~ " \n"
+#~ " "
diff --git a/scheduler_error_mailer/i18n/hr.po b/scheduler_error_mailer/i18n/hr.po
index 6d2977391..d3bfaeceb 100644
--- a/scheduler_error_mailer/i18n/hr.po
+++ b/scheduler_error_mailer/i18n/hr.po
@@ -32,8 +32,8 @@ msgid ""
"message :
\n"
"\n"
"\n"
-"${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to "
-"get the error message from the context.'}\n"
+"${ctx.get('job_exception') or 'Failed to get the error message from the "
+"context.'}\n"
"\n"
"\n"
"You may check the logs of the Odoo server to get more information about "
diff --git a/scheduler_error_mailer/i18n/pt.po b/scheduler_error_mailer/i18n/pt.po
index 5a4f479c7..f946200c9 100644
--- a/scheduler_error_mailer/i18n/pt.po
+++ b/scheduler_error_mailer/i18n/pt.po
@@ -1,6 +1,6 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
-# * scheduler_error_mailer
+# * scheduler_error_mailer
#
msgid ""
msgstr ""
@@ -18,24 +18,31 @@ msgstr ""
#. module: scheduler_error_mailer
#: model:mail.template,body_html:scheduler_error_mailer.scheduler_error_mailer
-msgid "\n"
-" \n"
-"
\n"
+msgid ""
"\n"
-"
Odoo tried to run the scheduler ${object.name or ''} in the database ${ctx.get('dbname')} but it failed. Here is the error message :
\n"
+" \n"
+"
\n"
+"\n"
+"
Odoo tried to run the scheduler ${object.name or ''} in the "
+"database ${ctx.get('dbname')} but it failed. Here is the error "
+"message :
\n"
"\n"
"
\n"
-"${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to get the error message from the context.'}\n"
+"${ctx.get('job_exception') or 'Failed to get the error message from the "
+"context.'}\n"
"\n"
"\n"
-"
You may check the logs of the Odoo server to get more information about this failure.
\n"
+"
You may check the logs of the Odoo server to get more information about "
+"this failure.
\n"
"\n"
"
Properties of the scheduler ${object.name or ''} :
\n"
"
\n"
"- Model : ${object.model or ''}
\n"
"- Method : ${object.function or ''}
\n"
"- Arguments : ${object.args or ''}
\n"
-"- Interval : ${object.interval_number or '0'} ${object.interval_type or ''}
\n"
+"- Interval : ${object.interval_number or '0'} ${object.interval_type or ''}"
+"
\n"
"- Number of calls : ${object.numbercall or '0'}
\n"
"- Repeat missed : ${object.doall}
\n"
"- User : ${object.user_id.name or ''}
\n"
diff --git a/scheduler_error_mailer/i18n/pt_BR.po b/scheduler_error_mailer/i18n/pt_BR.po
index 96858c42d..6ecf740aa 100644
--- a/scheduler_error_mailer/i18n/pt_BR.po
+++ b/scheduler_error_mailer/i18n/pt_BR.po
@@ -11,8 +11,8 @@ msgstr ""
"POT-Creation-Date: 2016-08-06 02:49+0000\n"
"PO-Revision-Date: 2019-09-03 01:23+0000\n"
"Last-Translator: Rodrigo Macedo \n"
-"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/"
-"23907/pt_BR/)\n"
+"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/"
+"teams/23907/pt_BR/)\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -33,8 +33,8 @@ msgid ""
"message :\n"
"\n"
"\n"
-"${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to "
-"get the error message from the context.'}\n"
+"${ctx.get('job_exception') or 'Failed to get the error message from the "
+"context.'}\n"
"\n"
"\n"
"You may check the logs of the Odoo server to get more information about "
@@ -61,43 +61,6 @@ msgid ""
" \n"
" "
msgstr ""
-"\n"
-" \n"
-"
\n"
-"\n"
-"
Odoo tentou executar o agendador${object.name ou ''}no banco de "
-"dados${ctx.get ('dbname')}, mas falhou. Aqui está a mensagem de "
-"erro:
\n"
-"\n"
-"
\n"
-"${ctx.get ('job_exception') e ctx.get ('job_exception'). value ou 'Falha ao "
-"obter a mensagem de erro do contexto.'}\n"
-"\n"
-"\n"
-"
Você pode verificar os logs do servidor Odoo para obter mais informações "
-"sobre esta falha.
\n"
-"\n"
-"
Propriedades do planejador${object.name ou''}:
\n"
-"
\n"
-"- Modelo: ${object.model ou ''}
\n"
-"- Método: ${object.function ou ''}
\n"
-"- Argumentos: ${object.args ou ''}
\n"
-"- Intervalo: ${object.interval_number ou '0'} ${object.interval_type ou "
-"''}
\n"
-"- Número de chamadas: ${object.numbercall ou '0'}
\n"
-"- Repetição perdida: ${object.doall}
\n"
-"- Usuário: ${object.user_id.name ou ''}
\n"
-"
\n"
-"\n"
-"
\n"
-"--
\n"
-"Email automático enviado pelo Odoo. Não responda.
\n"
-"Banco de Dados: ${ctx.get ('dbname')}\n"
-"
\n"
-"
\n"
-" \n"
-" "
#. module: scheduler_error_mailer
#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__email_template_id
@@ -133,6 +96,85 @@ msgstr "Teste Agendado de Erro do Remetente"
msgid "[DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED"
msgstr "[DB ${ctx.get('dbname')}] Agendador '${object.name or ''}' FALHOU"
+#~ msgid ""
+#~ "\n"
+#~ " \n"
+#~ "\n"
+#~ "\n"
+#~ "
Odoo tried to run the scheduler ${object.name or ''} in the "
+#~ "database ${ctx.get('dbname')} but it failed. Here is the error "
+#~ "message :
\n"
+#~ "\n"
+#~ "
\n"
+#~ "${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed "
+#~ "to get the error message from the context.'}\n"
+#~ "\n"
+#~ "\n"
+#~ "
You may check the logs of the Odoo server to get more information "
+#~ "about this failure.
\n"
+#~ "\n"
+#~ "
Properties of the scheduler ${object.name or ''} :
\n"
+#~ "
\n"
+#~ "- Model : ${object.model or ''}
\n"
+#~ "- Method : ${object.function or ''}
\n"
+#~ "- Arguments : ${object.args or ''}
\n"
+#~ "- Interval : ${object.interval_number or '0'} ${object.interval_type or "
+#~ "''}
\n"
+#~ "- Number of calls : ${object.numbercall or '0'}
\n"
+#~ "- Repeat missed : ${object.doall}
\n"
+#~ "- User : ${object.user_id.name or ''}
\n"
+#~ "
\n"
+#~ "\n"
+#~ "
\n"
+#~ "--
\n"
+#~ "Automatic e-mail sent by Odoo. Do not reply.
\n"
+#~ "Database : ${ctx.get('dbname')}\n"
+#~ "
\n"
+#~ "
\n"
+#~ " \n"
+#~ " "
+#~ msgstr ""
+#~ "\n"
+#~ " \n"
+#~ "\n"
+#~ "\n"
+#~ "
Odoo tentou executar o agendador${object.name ou ''}no banco "
+#~ "de dados${ctx.get ('dbname')}, mas falhou. Aqui está a mensagem "
+#~ "de erro:
\n"
+#~ "\n"
+#~ "
\n"
+#~ "${ctx.get ('job_exception') e ctx.get ('job_exception'). value ou 'Falha "
+#~ "ao obter a mensagem de erro do contexto.'}\n"
+#~ "\n"
+#~ "\n"
+#~ "
Você pode verificar os logs do servidor Odoo para obter mais "
+#~ "informações sobre esta falha.
\n"
+#~ "\n"
+#~ "
Propriedades do planejador${object.name ou''}:
\n"
+#~ "
\n"
+#~ "- Modelo: ${object.model ou ''}
\n"
+#~ "- Método: ${object.function ou ''}
\n"
+#~ "- Argumentos: ${object.args ou ''}
\n"
+#~ "- Intervalo: ${object.interval_number ou '0'} ${object.interval_type "
+#~ "ou ''}
\n"
+#~ "- Número de chamadas: ${object.numbercall ou '0'}
\n"
+#~ "- Repetição perdida: ${object.doall}
\n"
+#~ "- Usuário: ${object.user_id.name ou ''}
\n"
+#~ "
\n"
+#~ "\n"
+#~ "
\n"
+#~ "--
\n"
+#~ "Email automático enviado pelo Odoo. Não responda.
\n"
+#~ "Banco de Dados: ${ctx.get ('dbname')}\n"
+#~ "
\n"
+#~ "
\n"
+#~ " \n"
+#~ " "
+
#, fuzzy
#~ msgid "Email Template"
#~ msgstr "Modelo de Erro de E-mail"
diff --git a/scheduler_error_mailer/i18n/scheduler_error_mailer.pot b/scheduler_error_mailer/i18n/scheduler_error_mailer.pot
index 72fd51ff7..9b3ae95d1 100644
--- a/scheduler_error_mailer/i18n/scheduler_error_mailer.pot
+++ b/scheduler_error_mailer/i18n/scheduler_error_mailer.pot
@@ -22,7 +22,7 @@ msgid "\n"
"Odoo tried to run the scheduler ${object.name or ''} in the database ${ctx.get('dbname')} but it failed. Here is the error message :
\n"
"\n"
"\n"
-"${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to get the error message from the context.'}\n"
+"${ctx.get('job_exception') or 'Failed to get the error message from the context.'}\n"
"\n"
"\n"
"You may check the logs of the Odoo server to get more information about this failure.
\n"
diff --git a/scheduler_error_mailer/i18n/sl.po b/scheduler_error_mailer/i18n/sl.po
index 96b252f6b..b53fdd937 100644
--- a/scheduler_error_mailer/i18n/sl.po
+++ b/scheduler_error_mailer/i18n/sl.po
@@ -32,8 +32,8 @@ msgid ""
"message :\n"
"\n"
"\n"
-"${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to "
-"get the error message from the context.'}\n"
+"${ctx.get('job_exception') or 'Failed to get the error message from the "
+"context.'}\n"
"\n"
"\n"
"You may check the logs of the Odoo server to get more information about "
diff --git a/scheduler_error_mailer/i18n/zh_CN.po b/scheduler_error_mailer/i18n/zh_CN.po
index 5335ed154..024e63f3f 100644
--- a/scheduler_error_mailer/i18n/zh_CN.po
+++ b/scheduler_error_mailer/i18n/zh_CN.po
@@ -33,8 +33,8 @@ msgid ""
"message :
\n"
"\n"
"\n"
-"${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to "
-"get the error message from the context.'}\n"
+"${ctx.get('job_exception') or 'Failed to get the error message from the "
+"context.'}\n"
"\n"
"\n"
"You may check the logs of the Odoo server to get more information about "
@@ -61,40 +61,6 @@ msgid ""
" \n"
" "
msgstr ""
-"\n"
-" \n"
-"
\n"
-"\n"
-"
Odoo试图运行调度程序 ${object.name or ''} 在数据库中 "
-"${ctx.get('dbname')} 但它失败了。这是错误消息 :
\n"
-"\n"
-"
\n"
-"${ctx.get('job_exception') and ctx.get('job_exception').value or "
-"'无法从上下文中获取错误消息.'}\n"
-"\n"
-"\n"
-"
您可以检查Odoo服务器的日志以获取有关此故障的更多信息.
\n"
-"\n"
-"
调度程序的属性 ${object.name or ''} :
\n"
-"
\n"
-"- 模型: ${object.model or ''}
\n"
-"- 方法 : ${object.function or ''}
\n"
-"- 参数: ${object.args or ''}
\n"
-"- 间隔: ${object.interval_number or '0'} ${object.interval_type or ''}
\n"
-"- 通话次数: ${object.numbercall or '0'}
\n"
-"- 重复错过了: ${object.doall}
\n"
-"- 用户: ${object.user_id.name or ''}
\n"
-"
\n"
-"\n"
-"
\n"
-"--
\n"
-"Odoo发送的自动电子邮件。请勿回复。
\n"
-"数据库: ${ctx.get('dbname')}\n"
-"
\n"
-"
\n"
-" \n"
-" "
#. module: scheduler_error_mailer
#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__email_template_id
@@ -129,6 +95,83 @@ msgstr "测试调度程序错误邮件程序"
msgid "[DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED"
msgstr "[DB ${ctx.get('dbname')}] 调度'${object.name or ''}' 失败"
+#~ msgid ""
+#~ "\n"
+#~ " \n"
+#~ "\n"
+#~ "\n"
+#~ "
Odoo tried to run the scheduler ${object.name or ''} in the "
+#~ "database ${ctx.get('dbname')} but it failed. Here is the error "
+#~ "message :
\n"
+#~ "\n"
+#~ "
\n"
+#~ "${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed "
+#~ "to get the error message from the context.'}\n"
+#~ "\n"
+#~ "\n"
+#~ "
You may check the logs of the Odoo server to get more information "
+#~ "about this failure.
\n"
+#~ "\n"
+#~ "
Properties of the scheduler ${object.name or ''} :
\n"
+#~ "
\n"
+#~ "- Model : ${object.model or ''}
\n"
+#~ "- Method : ${object.function or ''}
\n"
+#~ "- Arguments : ${object.args or ''}
\n"
+#~ "- Interval : ${object.interval_number or '0'} ${object.interval_type or "
+#~ "''}
\n"
+#~ "- Number of calls : ${object.numbercall or '0'}
\n"
+#~ "- Repeat missed : ${object.doall}
\n"
+#~ "- User : ${object.user_id.name or ''}
\n"
+#~ "
\n"
+#~ "\n"
+#~ "
\n"
+#~ "--
\n"
+#~ "Automatic e-mail sent by Odoo. Do not reply.
\n"
+#~ "Database : ${ctx.get('dbname')}\n"
+#~ "
\n"
+#~ "
\n"
+#~ " \n"
+#~ " "
+#~ msgstr ""
+#~ "\n"
+#~ " \n"
+#~ "\n"
+#~ "\n"
+#~ "
Odoo试图运行调度程序 ${object.name or ''} 在数据库中 "
+#~ "${ctx.get('dbname')} 但它失败了。这是错误消息 :
\n"
+#~ "\n"
+#~ "
\n"
+#~ "${ctx.get('job_exception') and ctx.get('job_exception').value or '无法从上"
+#~ "下文中获取错误消息.'}\n"
+#~ "\n"
+#~ "\n"
+#~ "
您可以检查Odoo服务器的日志以获取有关此故障的更多信息.
\n"
+#~ "\n"
+#~ "
调度程序的属性 ${object.name or ''} :
\n"
+#~ "
\n"
+#~ "- 模型: ${object.model or ''}
\n"
+#~ "- 方法 : ${object.function or ''}
\n"
+#~ "- 参数: ${object.args or ''}
\n"
+#~ "- 间隔: ${object.interval_number or '0'} ${object.interval_type or ''}"
+#~ "li>\n"
+#~ "
- 通话次数: ${object.numbercall or '0'}
\n"
+#~ "- 重复错过了: ${object.doall}
\n"
+#~ "- 用户: ${object.user_id.name or ''}
\n"
+#~ "
\n"
+#~ "\n"
+#~ "
\n"
+#~ "--
\n"
+#~ "Odoo发送的自动电子邮件。请勿回复。
\n"
+#~ "数据库: ${ctx.get('dbname')}\n"
+#~ "
\n"
+#~ "
\n"
+#~ " \n"
+#~ " "
+
#, fuzzy
#~ msgid "Email Template"
#~ msgstr "错误E-mail 模板"
diff --git a/scheduler_error_mailer/migrations/12.0.1.1.0/post-migration.py b/scheduler_error_mailer/migrations/12.0.1.1.0/post-migration.py
new file mode 100644
index 000000000..90b9f1bf2
--- /dev/null
+++ b/scheduler_error_mailer/migrations/12.0.1.1.0/post-migration.py
@@ -0,0 +1,13 @@
+# Copyright 2021 Tecnativa - Víctor Martínez
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openupgradelib import openupgrade
+
+
+@openupgrade.migrate()
+def migrate(env, version):
+ template = env.ref("scheduler_error_mailer.scheduler_error_mailer")
+ template.body_html = template.body_html.replace(
+ "${ctx.get('job_exception') and ctx.get('job_exception').value",
+ "${ctx.get('job_exception')"
+ )
diff --git a/scheduler_error_mailer/models/ir_cron.py b/scheduler_error_mailer/models/ir_cron.py
index 2bce89dd4..9a9ed7a96 100644
--- a/scheduler_error_mailer/models/ir_cron.py
+++ b/scheduler_error_mailer/models/ir_cron.py
@@ -34,7 +34,7 @@ class IrCron(models.Model):
# we put the job_exception in context to be able to print it inside
# the email template
context = {
- 'job_exception': job_exception,
+ 'job_exception': str(job_exception),
'dbname': self._cr.dbname,
}