diff --git a/scheduler_error_mailer/README.rst b/scheduler_error_mailer/README.rst new file mode 100644 index 000000000..f21012f47 --- /dev/null +++ b/scheduler_error_mailer/README.rst @@ -0,0 +1,92 @@ +====================== +Scheduler Error Mailer +====================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github + :target: https://github.com/OCA/server-tools/tree/16.0/scheduler_error_mailer + :alt: OCA/server-tools +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-scheduler_error_mailer + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/server-tools&target_branch=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module adds the possibility to send an e-mail when a scheduler raises +an error. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +To configure this module, you need to: + +#. Go to Settings -> Technical -> Automation -> Scheduled Actions +#. Choose the scheduled Actions you want to send the error email and select the E-mail Template in the Error E-mail Template field. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Akretion +* Sodexis + +Contributors +~~~~~~~~~~~~ + +* Sébastien BEAU +* David Beal +* Alexis de Lattre +* Sodexis +* Achraf Mhadhbi + +* `Tecnativa `_: + + * Cristina Martin R. + * Víctor Martínez + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/server-tools `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/scheduler_error_mailer/__init__.py b/scheduler_error_mailer/__init__.py new file mode 100644 index 000000000..e309f3899 --- /dev/null +++ b/scheduler_error_mailer/__init__.py @@ -0,0 +1,4 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import models +from .hooks import post_init_hook diff --git a/scheduler_error_mailer/__manifest__.py b/scheduler_error_mailer/__manifest__.py new file mode 100644 index 000000000..8d12c8894 --- /dev/null +++ b/scheduler_error_mailer/__manifest__.py @@ -0,0 +1,20 @@ +# Copyright 2012-2013 Akretion Sébastien BEAU,David Beal,Alexis de Lattre +# Copyright 2016 Sodexis +# Copyright 2018 bloopark systems () +# Copyright 2019 Tecnativa - Cristina Martin R. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Scheduler Error Mailer", + "version": "16.0.1.0.0", + "category": "Extra Tools", + "license": "AGPL-3", + "author": "Akretion,Sodexis,Odoo Community Association (OCA)", + "website": "https://github.com/OCA/server-tools", + "depends": ["mail"], + "data": ["data/ir_cron_email_tpl.xml", "views/ir_cron.xml"], + "demo": ["demo/ir_cron_demo.xml"], + "images": ["images/scheduler_error_mailer.jpg"], + "installable": True, + "post_init_hook": "post_init_hook", +} diff --git a/scheduler_error_mailer/data/ir_cron_email_tpl.xml b/scheduler_error_mailer/data/ir_cron_email_tpl.xml new file mode 100644 index 000000000..53f8efd09 --- /dev/null +++ b/scheduler_error_mailer/data/ir_cron_email_tpl.xml @@ -0,0 +1,44 @@ + + + + + Scheduler Error + {{object.user_id.email or ''}} + {{object.user_id.email or ''}} + [DB {{ctx.get('dbname')}}] Scheduler '{{object.name or ''}}' FAILED + + + + + +

Odoo tried to run the scheduler in the database but it failed. Here is the error message :

+ + + + + +

You may check the logs of the Odoo server to get more information about this failure.

+ +

Properties of the scheduler :

+
    +
  • Model :
  • +
  • Python code :
  • +
  • Interval :
  • +
  • Number of calls :
  • +
  • Repeat missed :
  • +
  • User :
  • +
+ +

+--
+Automatic e-mail sent by Odoo. Do not reply.
+Database : +

+ + ]]> +
+
+
diff --git a/scheduler_error_mailer/demo/ir_cron_demo.xml b/scheduler_error_mailer/demo/ir_cron_demo.xml new file mode 100644 index 000000000..cb850e036 --- /dev/null +++ b/scheduler_error_mailer/demo/ir_cron_demo.xml @@ -0,0 +1,27 @@ + + + + + Test Scheduler Error Mailer + + + 1 + hours + -1 + + + + code + model._test_scheduler_failure() + + + diff --git a/scheduler_error_mailer/hooks.py b/scheduler_error_mailer/hooks.py new file mode 100644 index 000000000..ac6a6b593 --- /dev/null +++ b/scheduler_error_mailer/hooks.py @@ -0,0 +1,14 @@ +# Copyright 2023 Hunki Enterprises BV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo import SUPERUSER_ID, api + + +def post_init_hook(cr, registry): + env = api.Environment(cr, SUPERUSER_ID, {}) + env["ir.cron"].with_context(active_test=False).search([]).write( + { + "email_template_id": env.ref( + "scheduler_error_mailer.scheduler_error_mailer" + ).id + } + ) diff --git a/scheduler_error_mailer/i18n/de.po b/scheduler_error_mailer/i18n/de.po new file mode 100644 index 000000000..6b2b94251 --- /dev/null +++ b/scheduler_error_mailer/i18n/de.po @@ -0,0 +1,111 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * scheduler_error_mailer +# +# Translators: +# Niki Waibel , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-08 03:37+0000\n" +"PO-Revision-Date: 2017-02-08 03:37+0000\n" +"Last-Translator: Niki Waibel , 2017\n" +"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" +"Language: de\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" + +#. 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 " +"in the database but it failed. " +"Here is the error message :

\n" +"\n" +"\n" +"\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 :\n" +"

    \n" +"
  • Model :
  • \n" +"
  • Python code :
  • \n" +"
  • Interval :
  • \n" +"
  • Number of calls :
  • \n" +"
  • Repeat missed :
  • \n" +"
  • User :
  • \n" +"
\n" +"\n" +"

\n" +"--
\n" +"Automatic e-mail sent by Odoo. Do not reply.
\n" +"Database : \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 "Fehler e-Mail Vorlage" + +#. module: scheduler_error_mailer +#: model:ir.model,name:scheduler_error_mailer.model_ir_cron +msgid "Scheduled Actions" +msgstr "" + +#. module: scheduler_error_mailer +#: model:mail.template,name:scheduler_error_mailer.scheduler_error_mailer +msgid "Scheduler Error" +msgstr "" + +#. 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 "" +"Wähle die e-Mail Vorlage welche bei einem Fehler dieses Schedulers gesendet " +"wird." + +#. module: scheduler_error_mailer +#: code:addons/scheduler_error_mailer/models/ir_cron.py:0 +#, python-format +msgid "Task failure with UID = %d." +msgstr "Task Fehler von 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 "" + +#. 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 "" + +#~ msgid "[DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED" +#~ msgstr "[DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FEHLER" + +#, fuzzy +#~ msgid "Email Template" +#~ msgstr "Fehler e-Mail Vorlage" + +#~ msgid "ir.cron" +#~ msgstr "ir.cron" diff --git a/scheduler_error_mailer/i18n/es.po b/scheduler_error_mailer/i18n/es.po new file mode 100644 index 000000000..16799c865 --- /dev/null +++ b/scheduler_error_mailer/i18n/es.po @@ -0,0 +1,109 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * scheduler_error_mailer +# +# Translators: +# OCA Transbot , 2017 +# Fernando Lara , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-22 00:55+0000\n" +"PO-Revision-Date: 2017-02-22 00:55+0000\n" +"Last-Translator: Fernando Lara , 2017\n" +"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" +"Language: es\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" + +#. 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 " +"in the database but it failed. " +"Here is the error message :

\n" +"\n" +"\n" +"\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 :\n" +"

    \n" +"
  • Model :
  • \n" +"
  • Python code :
  • \n" +"
  • Interval :
  • \n" +"
  • Number of calls :
  • \n" +"
  • Repeat missed :
  • \n" +"
  • User :
  • \n" +"
\n" +"\n" +"

\n" +"--
\n" +"Automatic e-mail sent by Odoo. Do not reply.
\n" +"Database : \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 "Plantilla de correo electrónico de error" + +#. module: scheduler_error_mailer +#: model:ir.model,name:scheduler_error_mailer.model_ir_cron +msgid "Scheduled Actions" +msgstr "" + +#. module: scheduler_error_mailer +#: model:mail.template,name:scheduler_error_mailer.scheduler_error_mailer +msgid "Scheduler Error" +msgstr "" + +#. 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 "" +"Seleccione la plantilla de correo electrónico que se enviará cuando falla " +"este planificador." + +#. module: scheduler_error_mailer +#: code:addons/scheduler_error_mailer/models/ir_cron.py:0 +#, python-format +msgid "Task failure with UID = %d." +msgstr "Error de Tarea con 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 "" + +#. 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 "" + +#, fuzzy +#~ msgid "Email Template" +#~ msgstr "Plantilla de correo electrónico de error" + +#~ msgid "ir.cron" +#~ msgstr "ir.cron" diff --git a/scheduler_error_mailer/i18n/es_AR.po b/scheduler_error_mailer/i18n/es_AR.po new file mode 100644 index 000000000..bfdb9f982 --- /dev/null +++ b/scheduler_error_mailer/i18n/es_AR.po @@ -0,0 +1,216 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * scheduler_error_mailer +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-03-04 18:23+0000\n" +"Last-Translator: Ignacio Buioli \n" +"Language-Team: none\n" +"Language: es_AR\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.14.1\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 " +"in the database but it failed. " +"Here is the error message :

\n" +"\n" +"\n" +"\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 :\n" +"

    \n" +"
  • Model :
  • \n" +"
  • Python code :
  • \n" +"
  • Interval :
  • \n" +"
  • Number of calls :
  • \n" +"
  • Repeat missed :
  • \n" +"
  • User :
  • \n" +"
\n" +"\n" +"

\n" +"--
\n" +"Automatic e-mail sent by Odoo. Do not reply.
\n" +"Database : \n" +"

\n" +"
\n" +" \n" +" " +msgstr "" +"\n" +" \n" +"
\n" +"\n" +"

Odoo trató de ejecutar el planificador en la base de datos pero " +"falló. Acá está el mensaje de error :

\n" +"\n" +"\n" +"\n" +"\n" +"\n" +"

Puede consultar los registros del servidor Odoo para obtener más " +"información sobre esta falla.

\n" +"\n" +"

Propiedad del planificador :

" +"\n" +"
    \n" +"
  • Modelo :
  • \n" +"
  • Código Python :
  • \n" +"
  • Intervalo :
  • \n" +"
  • Número de ejecuciones :
  • \n" +"
  • Repetir perdidos :
  • \n" +"
  • Usuario :
  • \n" +"
\n" +"\n" +"

\n" +"--
\n" +"Email enviado automáticamente por Odoo. No responder.
\n" +"Base de datos : \n" +"

\n" +"
\n" +" \n" +" " + +#. 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 "Plantilla de correo electrónico del error" + +#. module: scheduler_error_mailer +#: model:ir.model,name:scheduler_error_mailer.model_ir_cron +msgid "Scheduled Actions" +msgstr "Acciones Automatizadas" + +#. module: scheduler_error_mailer +#: model:mail.template,name:scheduler_error_mailer.scheduler_error_mailer +msgid "Scheduler Error" +msgstr "Error del Planificador" + +#. 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 "" +"Seleccione la plantilla de correo electrónico que se enviará cuando falla " +"este planificador." + +#. module: scheduler_error_mailer +#: code:addons/scheduler_error_mailer/models/ir_cron.py:0 +#, python-format +msgid "Task failure with UID = %d." +msgstr "Error de Tarea con 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 "Probar el Mail de Errores del Planificador" + +#. 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')}}] Planificador '{{object.name or ''}}' FALLIDO" + +#~ 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_id.name or ''}
  • \n" +#~ "
  • Python code : ${object.code 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 tried to run the scheduler ${object.name or ''} en la " +#~ "base de datos ${ctx.get('dbname')} pero falló. Acá está el " +#~ "mensaje de error:

\n" +#~ "\n" +#~ "\n" +#~ "${ctx.get('job_exception') or 'No se pudo obtener el mensaje de error del " +#~ "contexto.'}\n" +#~ "\n" +#~ "\n" +#~ "

Puede revisar los registros del servidor de Odoo para obtener más " +#~ "información acerca de este fallo.

\n" +#~ "\n" +#~ "

Propiedades del planificador ${object.name or ''} :

\n" +#~ "
    \n" +#~ "
  • Modelo : ${object.model_id.name or ''}
  • \n" +#~ "
  • Código de Python : ${object.code or ''}
  • \n" +#~ "
  • Intervalo : ${object.interval_number or '0'} ${object.interval_type " +#~ "or ''}
  • \n" +#~ "
  • Número de llamados : ${object.numbercall or '0'}
  • \n" +#~ "
  • Repetir perdidos : ${object.doall}
  • \n" +#~ "
  • Usuario : ${object.user_id.name or ''}
  • \n" +#~ "
\n" +#~ "\n" +#~ "

\n" +#~ "--
\n" +#~ "Email enviado automáticamente por Odoo. No responder.
\n" +#~ "Base de datos : ${ctx.get('dbname')}\n" +#~ "

\n" +#~ "
\n" +#~ " \n" +#~ " " + +#~ msgid "[DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED" +#~ msgstr "[DB ${ctx.get('dbname')}] Planificador '${object.name or ''}' FALLÓ" diff --git a/scheduler_error_mailer/i18n/fr.po b/scheduler_error_mailer/i18n/fr.po new file mode 100644 index 000000000..5b025ffe8 --- /dev/null +++ b/scheduler_error_mailer/i18n/fr.po @@ -0,0 +1,182 @@ +# 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 " +"in the database but it failed. " +"Here is the error message :

\n" +"\n" +"\n" +"\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 :\n" +"

    \n" +"
  • Model :
  • \n" +"
  • Python code :
  • \n" +"
  • Interval :
  • \n" +"
  • Number of calls :
  • \n" +"
  • Repeat missed :
  • \n" +"
  • User :
  • \n" +"
\n" +"\n" +"

\n" +"--
\n" +"Automatic e-mail sent by Odoo. Do not reply.
\n" +"Database : \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:mail.template,name:scheduler_error_mailer.scheduler_error_mailer +msgid "Scheduler Error" +msgstr "" + +#. 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:0 +#, 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 "" + +#~ 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 ''} 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 new file mode 100644 index 000000000..014f527ae --- /dev/null +++ b/scheduler_error_mailer/i18n/hr.po @@ -0,0 +1,103 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * scheduler_error_mailer +# +# Translators: +# Bole , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-03-02 18:41+0000\n" +"PO-Revision-Date: 2018-03-02 18:41+0000\n" +"Last-Translator: Bole , 2018\n" +"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" +"Language: hr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 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 " +"in the database but it failed. " +"Here is the error message :

\n" +"\n" +"\n" +"\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 :\n" +"

    \n" +"
  • Model :
  • \n" +"
  • Python code :
  • \n" +"
  • Interval :
  • \n" +"
  • Number of calls :
  • \n" +"
  • Repeat missed :
  • \n" +"
  • User :
  • \n" +"
\n" +"\n" +"

\n" +"--
\n" +"Automatic e-mail sent by Odoo. Do not reply.
\n" +"Database : \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 "" + +#. module: scheduler_error_mailer +#: model:ir.model,name:scheduler_error_mailer.model_ir_cron +msgid "Scheduled Actions" +msgstr "" + +#. module: scheduler_error_mailer +#: model:mail.template,name:scheduler_error_mailer.scheduler_error_mailer +msgid "Scheduler Error" +msgstr "" + +#. 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 "" + +#. module: scheduler_error_mailer +#: code:addons/scheduler_error_mailer/models/ir_cron.py:0 +#, python-format +msgid "Task failure with UID = %d." +msgstr "" + +#. 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 "" + +#. 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 "" + +#~ msgid "ir.cron" +#~ msgstr "ir.cron" diff --git a/scheduler_error_mailer/i18n/pt.po b/scheduler_error_mailer/i18n/pt.po new file mode 100644 index 000000000..8908124b5 --- /dev/null +++ b/scheduler_error_mailer/i18n/pt.po @@ -0,0 +1,98 @@ +# 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: 2019-08-14 12:44+0000\n" +"Last-Translator: Pedro Castro Silva \n" +"Language-Team: none\n" +"Language: pt\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 3.7.1\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 " +"in the database but it failed. " +"Here is the error message :

\n" +"\n" +"\n" +"\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 :\n" +"

    \n" +"
  • Model :
  • \n" +"
  • Python code :
  • \n" +"
  • Interval :
  • \n" +"
  • Number of calls :
  • \n" +"
  • Repeat missed :
  • \n" +"
  • User :
  • \n" +"
\n" +"\n" +"

\n" +"--
\n" +"Automatic e-mail sent by Odoo. Do not reply.
\n" +"Database : \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 "Modelo do E-mail de Erro" + +#. module: scheduler_error_mailer +#: model:ir.model,name:scheduler_error_mailer.model_ir_cron +msgid "Scheduled Actions" +msgstr "Ações Agendadas" + +#. module: scheduler_error_mailer +#: model:mail.template,name:scheduler_error_mailer.scheduler_error_mailer +msgid "Scheduler Error" +msgstr "" + +#. 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 "" +"Selecione o modelo de email que será enviado quando este agendador falhar." + +#. module: scheduler_error_mailer +#: code:addons/scheduler_error_mailer/models/ir_cron.py:0 +#, python-format +msgid "Task failure with UID = %d." +msgstr "Falha na tarefa com 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 "Testar o Envio de E-mails de Erro do Agendador" + +#. 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 "" diff --git a/scheduler_error_mailer/i18n/pt_BR.po b/scheduler_error_mailer/i18n/pt_BR.po new file mode 100644 index 000000000..825a0c835 --- /dev/null +++ b/scheduler_error_mailer/i18n/pt_BR.po @@ -0,0 +1,188 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * scheduler_error_mailer +# +# Translators: +# OCA Transbot , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"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: pt_BR\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 3.8\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 " +"in the database but it failed. " +"Here is the error message :

\n" +"\n" +"\n" +"\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 :\n" +"

    \n" +"
  • Model :
  • \n" +"
  • Python code :
  • \n" +"
  • Interval :
  • \n" +"
  • Number of calls :
  • \n" +"
  • Repeat missed :
  • \n" +"
  • User :
  • \n" +"
\n" +"\n" +"

\n" +"--
\n" +"Automatic e-mail sent by Odoo. Do not reply.
\n" +"Database : \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 "Modelo de Erro de E-mail" + +#. module: scheduler_error_mailer +#: model:ir.model,name:scheduler_error_mailer.model_ir_cron +msgid "Scheduled Actions" +msgstr "Ações Agendadas" + +#. module: scheduler_error_mailer +#: model:mail.template,name:scheduler_error_mailer.scheduler_error_mailer +msgid "Scheduler Error" +msgstr "" + +#. 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 "" +"Selecione o modelo de email que será enviado quando o agendador falhar." + +#. module: scheduler_error_mailer +#: code:addons/scheduler_error_mailer/models/ir_cron.py:0 +#, python-format +msgid "Task failure with UID = %d." +msgstr "Tarefa falhou com 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 "Teste Agendado de Erro do Remetente" + +#. 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 "" + +#~ 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 new file mode 100644 index 000000000..3bc4c0155 --- /dev/null +++ b/scheduler_error_mailer/i18n/scheduler_error_mailer.pot @@ -0,0 +1,87 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * scheduler_error_mailer +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \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 in the database but it failed. Here is the error message :

\n" +"\n" +"\n" +"\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 :

\n" +"
    \n" +"
  • Model :
  • \n" +"
  • Python code :
  • \n" +"
  • Interval :
  • \n" +"
  • Number of calls :
  • \n" +"
  • Repeat missed :
  • \n" +"
  • User :
  • \n" +"
\n" +"\n" +"

\n" +"--
\n" +"Automatic e-mail sent by Odoo. Do not reply.
\n" +"Database : \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 "" + +#. module: scheduler_error_mailer +#: model:ir.model,name:scheduler_error_mailer.model_ir_cron +msgid "Scheduled Actions" +msgstr "" + +#. module: scheduler_error_mailer +#: model:mail.template,name:scheduler_error_mailer.scheduler_error_mailer +msgid "Scheduler Error" +msgstr "" + +#. 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 "" + +#. module: scheduler_error_mailer +#: code:addons/scheduler_error_mailer/models/ir_cron.py:0 +#, python-format +msgid "Task failure with UID = %d." +msgstr "" + +#. 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 "" + +#. 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 "" diff --git a/scheduler_error_mailer/i18n/sl.po b/scheduler_error_mailer/i18n/sl.po new file mode 100644 index 000000000..130e5aed6 --- /dev/null +++ b/scheduler_error_mailer/i18n/sl.po @@ -0,0 +1,108 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * scheduler_error_mailer +# +# Translators: +# OCA Transbot , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-06 02:49+0000\n" +"PO-Revision-Date: 2016-08-06 02:49+0000\n" +"Last-Translator: OCA Transbot , 2016\n" +"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3);\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 " +"in the database but it failed. " +"Here is the error message :

\n" +"\n" +"\n" +"\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 :\n" +"

    \n" +"
  • Model :
  • \n" +"
  • Python code :
  • \n" +"
  • Interval :
  • \n" +"
  • Number of calls :
  • \n" +"
  • Repeat missed :
  • \n" +"
  • User :
  • \n" +"
\n" +"\n" +"

\n" +"--
\n" +"Automatic e-mail sent by Odoo. Do not reply.
\n" +"Database : \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 "Predloga obvestila o napaki" + +#. module: scheduler_error_mailer +#: model:ir.model,name:scheduler_error_mailer.model_ir_cron +msgid "Scheduled Actions" +msgstr "" + +#. module: scheduler_error_mailer +#: model:mail.template,name:scheduler_error_mailer.scheduler_error_mailer +msgid "Scheduler Error" +msgstr "" + +#. 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 "Izberite predlogo za razpošiljanje ob napakah razporejevalca." + +#. module: scheduler_error_mailer +#: code:addons/scheduler_error_mailer/models/ir_cron.py:0 +#, python-format +msgid "Task failure with UID = %d." +msgstr "Napaka pri opravilu 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 "" + +#. 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 "" + +#~ msgid "[DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED" +#~ msgstr "" +#~ "[DB ${ctx.get('dbname')}] Razporejevalec '${object.name or ''}' NEUSPEŠEN" + +#, fuzzy +#~ msgid "Email Template" +#~ msgstr "Predloga obvestila o napaki" diff --git a/scheduler_error_mailer/i18n/zh_CN.po b/scheduler_error_mailer/i18n/zh_CN.po new file mode 100644 index 000000000..3e4e0fa9e --- /dev/null +++ b/scheduler_error_mailer/i18n/zh_CN.po @@ -0,0 +1,185 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * scheduler_error_mailer +# +# Translators: +# Jeffery Chenn , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-31 11:58+0000\n" +"PO-Revision-Date: 2019-08-31 06:18+0000\n" +"Last-Translator: 黎伟杰 <674416404@qq.com>\n" +"Language-Team: Chinese (China) (https://www.transifex.com/oca/teams/23907/" +"zh_CN/)\n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Weblate 3.8\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 " +"in the database but it failed. " +"Here is the error message :

\n" +"\n" +"\n" +"\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 :\n" +"

    \n" +"
  • Model :
  • \n" +"
  • Python code :
  • \n" +"
  • Interval :
  • \n" +"
  • Number of calls :
  • \n" +"
  • Repeat missed :
  • \n" +"
  • User :
  • \n" +"
\n" +"\n" +"

\n" +"--
\n" +"Automatic e-mail sent by Odoo. Do not reply.
\n" +"Database : \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 "错误E-mail 模板" + +#. module: scheduler_error_mailer +#: model:ir.model,name:scheduler_error_mailer.model_ir_cron +msgid "Scheduled Actions" +msgstr "安排的动作" + +#. module: scheduler_error_mailer +#: model:mail.template,name:scheduler_error_mailer.scheduler_error_mailer +msgid "Scheduler Error" +msgstr "" + +#. 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 "选择此调度程序失败时将发送的电子邮件模板。" + +#. module: scheduler_error_mailer +#: code:addons/scheduler_error_mailer/models/ir_cron.py:0 +#, python-format +msgid "Task failure with UID = %d." +msgstr "任务失败 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 "测试调度程序错误邮件程序" + +#. 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 "" + +#~ 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 ''}\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/images/scheduler_error_mailer.jpg b/scheduler_error_mailer/images/scheduler_error_mailer.jpg new file mode 100644 index 000000000..a8a3af766 Binary files /dev/null and b/scheduler_error_mailer/images/scheduler_error_mailer.jpg differ diff --git a/scheduler_error_mailer/models/__init__.py b/scheduler_error_mailer/models/__init__.py new file mode 100644 index 000000000..b365c0e97 --- /dev/null +++ b/scheduler_error_mailer/models/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import ir_cron diff --git a/scheduler_error_mailer/models/ir_cron.py b/scheduler_error_mailer/models/ir_cron.py new file mode 100644 index 000000000..7bb8f6c70 --- /dev/null +++ b/scheduler_error_mailer/models/ir_cron.py @@ -0,0 +1,52 @@ +# Copyright 2012-2013 Akretion Sébastien BEAU,David Beal,Alexis de Lattre +# Copyright 2016 Sodexis +# Copyright 2018 bloopark systems () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +import logging + +from odoo import _, api, fields, models +from odoo.exceptions import UserError + +_logger = logging.getLogger(__name__) + + +class IrCron(models.Model): + _inherit = "ir.cron" + + email_template_id = fields.Many2one( + comodel_name="mail.template", + domain=[("model_id.model", "=", "ir.cron")], + string="Error E-mail Template", + help="Select the email template that will be sent when " + "this scheduler fails.", + default=lambda self: self.env.ref( + "scheduler_error_mailer.scheduler_error_mailer", False + ), + ) + + @api.model + def _handle_callback_exception( + self, cron_name, server_action_id, job_id, job_exception + ): + res = super()._handle_callback_exception( + cron_name, server_action_id, job_id, job_exception + ) + my_cron = self.browse(job_id) + + if my_cron.email_template_id: + # we put the job_exception in context to be able to print it inside + # the email template + context = {"job_exception": str(job_exception), "dbname": self._cr.dbname} + + _logger.debug("Sending scheduler error email with context=%s", context) + + template = my_cron.email_template_id.with_context(**context).sudo() + template.send_mail(my_cron.id, force_send=True) + + return res + + @api.model + def _test_scheduler_failure(self): + """This function is used to test and debug this module.""" + raise UserError(_("Task failure with UID = %d.") % self._uid) diff --git a/scheduler_error_mailer/readme/CONFIGURE.rst b/scheduler_error_mailer/readme/CONFIGURE.rst new file mode 100644 index 000000000..baf4c1a6d --- /dev/null +++ b/scheduler_error_mailer/readme/CONFIGURE.rst @@ -0,0 +1,4 @@ +To configure this module, you need to: + +#. Go to Settings -> Technical -> Automation -> Scheduled Actions +#. Choose the scheduled Actions you want to send the error email and select the E-mail Template in the Error E-mail Template field. diff --git a/scheduler_error_mailer/readme/CONTRIBUTORS.rst b/scheduler_error_mailer/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..afcb6d058 --- /dev/null +++ b/scheduler_error_mailer/readme/CONTRIBUTORS.rst @@ -0,0 +1,10 @@ +* Sébastien BEAU +* David Beal +* Alexis de Lattre +* Sodexis +* Achraf Mhadhbi + +* `Tecnativa `_: + + * Cristina Martin R. + * Víctor Martínez diff --git a/scheduler_error_mailer/readme/DESCRIPTION.rst b/scheduler_error_mailer/readme/DESCRIPTION.rst new file mode 100644 index 000000000..6e097d81f --- /dev/null +++ b/scheduler_error_mailer/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module adds the possibility to send an e-mail when a scheduler raises +an error. diff --git a/scheduler_error_mailer/static/description/icon.png b/scheduler_error_mailer/static/description/icon.png new file mode 100644 index 000000000..6b22abf97 Binary files /dev/null and b/scheduler_error_mailer/static/description/icon.png differ diff --git a/scheduler_error_mailer/static/description/index.html b/scheduler_error_mailer/static/description/index.html new file mode 100644 index 000000000..889f87e5f --- /dev/null +++ b/scheduler_error_mailer/static/description/index.html @@ -0,0 +1,439 @@ + + + + + + +Scheduler Error Mailer + + + +
+

Scheduler Error Mailer

+ + +

Beta License: AGPL-3 OCA/server-tools Translate me on Weblate Try me on Runboat

+

This module adds the possibility to send an e-mail when a scheduler raises +an error.

+

Table of contents

+ +
+

Configuration

+

To configure this module, you need to:

+
    +
  1. Go to Settings -> Technical -> Automation -> Scheduled Actions
  2. +
  3. Choose the scheduled Actions you want to send the error email and select the E-mail Template in the Error E-mail Template field.
  4. +
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Akretion
  • +
  • Sodexis
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/server-tools project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/scheduler_error_mailer/tests/__init__.py b/scheduler_error_mailer/tests/__init__.py new file mode 100644 index 000000000..6bd49cac1 --- /dev/null +++ b/scheduler_error_mailer/tests/__init__.py @@ -0,0 +1 @@ +from . import test_scheduler_error_mailer diff --git a/scheduler_error_mailer/tests/test_scheduler_error_mailer.py b/scheduler_error_mailer/tests/test_scheduler_error_mailer.py new file mode 100644 index 000000000..7f26a41f2 --- /dev/null +++ b/scheduler_error_mailer/tests/test_scheduler_error_mailer.py @@ -0,0 +1,31 @@ +# Copyright 2023 Hunki Enterprises BV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from unittest.mock import patch + +from odoo.tests.common import TransactionCase + +from odoo.addons.scheduler_error_mailer.hooks import post_init_hook + + +class TestSchedulerErrorMailer(TransactionCase): + def setUp(self): + super().setUp() + self.cron = self.env.ref("scheduler_error_mailer.test_scheduler_error_mailer") + + def test_error_cron(self): + with self.assertLogs( + "odoo.addons.scheduler_error_mailer.models.ir_cron", "DEBUG" + ), patch.object(self.env.cr, "rollback"): + self.env["ir.cron"]._handle_callback_exception( + self.cron.name, + self.cron.ir_actions_server_id.id, + self.cron.id, + Exception("hello world"), + ) + + def test_init_hook(self): + post_init_hook(self.env.cr, self.env.registry) + self.assertFalse( + self.env["ir.cron"].search([("email_template_id", "=", False)]) + ) diff --git a/scheduler_error_mailer/views/ir_cron.xml b/scheduler_error_mailer/views/ir_cron.xml new file mode 100644 index 000000000..d22099c74 --- /dev/null +++ b/scheduler_error_mailer/views/ir_cron.xml @@ -0,0 +1,20 @@ + + + + + ir.cron.error.mailer.form + ir.cron + + + + + + + + diff --git a/setup/scheduler_error_mailer/odoo/addons/scheduler_error_mailer b/setup/scheduler_error_mailer/odoo/addons/scheduler_error_mailer new file mode 120000 index 000000000..b1968f746 --- /dev/null +++ b/setup/scheduler_error_mailer/odoo/addons/scheduler_error_mailer @@ -0,0 +1 @@ +../../../../scheduler_error_mailer \ No newline at end of file diff --git a/setup/scheduler_error_mailer/setup.py b/setup/scheduler_error_mailer/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/scheduler_error_mailer/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)