diff --git a/scheduler_error_mailer/README.rst b/scheduler_error_mailer/README.rst new file mode 100644 index 00000000000..ca7c8f655d9 --- /dev/null +++ b/scheduler_error_mailer/README.rst @@ -0,0 +1,99 @@ +====================== +Scheduler Error Mailer +====================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:f13d86592670711096f7ef648335a713566dde20d34a0de5a2be7855b46624ef + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/18.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-18-0/server-tools-18-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/builds?repo=OCA/server-tools&target_branch=18.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: + +1. Go to Settings -> Technical -> Automation -> Scheduled Actions +2. 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 to smash 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 + +- `Komit `__: + + - Cuong NGUYEN MINH TRAN MANH + +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 00000000000..e309f38992e --- /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 00000000000..7a6bb8814df --- /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": "18.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 00000000000..89b7a4ba4bc --- /dev/null +++ b/scheduler_error_mailer/data/ir_cron_email_tpl.xml @@ -0,0 +1,42 @@ + + + + + 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 :
  • +
  • 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 00000000000..0ecee5cc73d --- /dev/null +++ b/scheduler_error_mailer/demo/ir_cron_demo.xml @@ -0,0 +1,24 @@ + + + + + Test Scheduler Error Mailer + + + 1 + hours + + code + model._test_scheduler_failure() + + + diff --git a/scheduler_error_mailer/hooks.py b/scheduler_error_mailer/hooks.py new file mode 100644 index 00000000000..92b911be031 --- /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(env): + env = api.Environment(env.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 00000000000..ba5ed3f8fce --- /dev/null +++ b/scheduler_error_mailer/i18n/de.po @@ -0,0 +1,110 @@ +# 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 +#. odoo-python +#: 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 +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 00000000000..09f63139c6b --- /dev/null +++ b/scheduler_error_mailer/i18n/es.po @@ -0,0 +1,149 @@ +# 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: 2023-09-03 00:15+0000\n" +"Last-Translator: Ivorra78 \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" +"X-Generator: Weblate 4.17\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 intentó ejecutar el programador en la base de datos pero " +"falló. Aquí está el mensaje de error:

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

Puedes consultar los registros del servidor Odoo para obtener más " +"información sobre este fallo.

\n" +"\n" +"

Propiedades del planificador ::\n" +"

    \n" +"
  • Modelo:
  • \n" +"
  • Código Python:
  • \n" +"
  • Intervalo:
  • \n" +"
  • Número de llamadas:
  • \n" +"
  • Repetición perdida:
  • \n" +"
  • Usuario:
  • \n" +"
\n" +"\n" +"

\n" +"--
\n" +"Correo electrónico automático enviado por Odoo. No respondas.
\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 de error" + +#. module: scheduler_error_mailer +#: model:ir.model,name:scheduler_error_mailer.model_ir_cron +msgid "Scheduled Actions" +msgstr "Acciones programadas" + +#. module: scheduler_error_mailer +#: model:mail.template,name:scheduler_error_mailer.scheduler_error_mailer +msgid "Scheduler Error" +msgstr "Error de programación" + +#. 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 +#. odoo-python +#: 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 +msgid "Test Scheduler Error Mailer" +msgstr "Programador de pruebas Error Mailer" + +#. 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')}}] Programador '{{object.name or ''}}' FALLÓ" + +#~ msgid "Smart Search" +#~ msgstr "Búsqueda inteligente" + +#, 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 00000000000..b115f047464 --- /dev/null +++ b/scheduler_error_mailer/i18n/es_AR.po @@ -0,0 +1,219 @@ +# 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-06-09 16:09+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.17\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 +#. odoo-python +#: 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 +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 "Smart Search" +#~ msgstr "Búsqueda Inteligente" + +#~ 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 00000000000..f9d3a655d96 --- /dev/null +++ b/scheduler_error_mailer/i18n/fr.po @@ -0,0 +1,181 @@ +# 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 +#. odoo-python +#: 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 +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 00000000000..91ca9c8130a --- /dev/null +++ b/scheduler_error_mailer/i18n/hr.po @@ -0,0 +1,102 @@ +# 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 +#. odoo-python +#: 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 +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/it.po b/scheduler_error_mailer/i18n/it.po new file mode 100644 index 00000000000..99d3136a158 --- /dev/null +++ b/scheduler_error_mailer/i18n/it.po @@ -0,0 +1,128 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * scheduler_error_mailer +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-02-06 16:37+0000\n" +"Last-Translator: mymage \n" +"Language-Team: none\n" +"Language: it\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.17\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 ha tentato di eseguire lo schedulatore nel database ma ha " +"fallito. Questo è il messaggio di errore :

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

Per avere ulteiori informazioni su questo errore controllare i log del " +"server Odoo.

\n" +"\n" +"

Propietà dello schedulatore " +":

\n" +"
    \n" +"
  • Modello :
  • \n" +"
  • Codice Python :
  • \n" +"
  • Intervallo :
  • \n" +"
  • Numero di chiamate :
  • \n" +"
  • Ripetizione mancata :
  • \n" +"
  • Utente :
  • \n" +"
\n" +"\n" +"

\n" +"--
\n" +"E-mail automatica inviata da Odoo. Non rispondere.
\n" +"Database : \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 "Modello dell'e-mail di errore" + +#. module: scheduler_error_mailer +#: model:ir.model,name:scheduler_error_mailer.model_ir_cron +msgid "Scheduled Actions" +msgstr "Azioni pianificate" + +#. module: scheduler_error_mailer +#: model:mail.template,name:scheduler_error_mailer.scheduler_error_mailer +msgid "Scheduler Error" +msgstr "Errore schedulatore" + +#. 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 "" +"Selezionale il modello di e-mail che sarà inviato quando lo schedulatore va " +"in errore." + +#. module: scheduler_error_mailer +#. odoo-python +#: code:addons/scheduler_error_mailer/models/ir_cron.py:0 +#, python-format +msgid "Task failure with UID = %d." +msgstr "Errore lavoro con UID = %d." + +#. module: scheduler_error_mailer +#: model:ir.actions.server,name:scheduler_error_mailer.test_scheduler_error_mailer_ir_actions_server +msgid "Test Scheduler Error Mailer" +msgstr "Test messaggi errore scedulatore" + +#. 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')}}] Schedulatore '{{object.name or ''}}' FALLITO" diff --git a/scheduler_error_mailer/i18n/pt.po b/scheduler_error_mailer/i18n/pt.po new file mode 100644 index 00000000000..68fbdb9e174 --- /dev/null +++ b/scheduler_error_mailer/i18n/pt.po @@ -0,0 +1,97 @@ +# 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 +#. odoo-python +#: 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 +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 00000000000..642c6b683a7 --- /dev/null +++ b/scheduler_error_mailer/i18n/pt_BR.po @@ -0,0 +1,187 @@ +# 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 +#. odoo-python +#: 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 +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 00000000000..065678977ae --- /dev/null +++ b/scheduler_error_mailer/i18n/scheduler_error_mailer.pot @@ -0,0 +1,86 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * scheduler_error_mailer +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.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 +#. odoo-python +#: 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 +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 00000000000..b245b960516 --- /dev/null +++ b/scheduler_error_mailer/i18n/sl.po @@ -0,0 +1,107 @@ +# 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 +#. odoo-python +#: 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 +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 00000000000..772b3f390a5 --- /dev/null +++ b/scheduler_error_mailer/i18n/zh_CN.po @@ -0,0 +1,218 @@ +# 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: 2024-06-16 11:08+0000\n" +"Last-Translator: xtanuiha \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 4.17\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 尝试在数据库 " +"中运行计划任务 ,但运行失败。以下是错误信息:

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

您可以通过查看Odoo服务器的日志来获取更多关于此失败的信息。

\n" +"\n" +"

计划任务 的属性如下:

\n" +"
    \n" +"
  • 模型 :
  • \n" +"
  • Python 代码 :
  • \n" +"
  • 间隔 :
  • \n" +"
  • 调用次数 :
  • \n" +"
  • 重复遗漏 :
  • \n" +"
  • 用户 :
  • \n" +"
\n" +"\n" +"

\n" +"--
\n" +"此邮件由Odoo自动发送,请勿回复。
\n" +"数据库 : \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 "错误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 +#. odoo-python +#: 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 +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 "[数据库 {{ctx.get('dbname')}}] 计划任务 '{{object.name or ''}}' 执行失败" + +#~ 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 00000000000..a8a3af766a5 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 00000000000..b365c0e973b --- /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 00000000000..e8017b882e9 --- /dev/null +++ b/scheduler_error_mailer/models/ir_cron.py @@ -0,0 +1,50 @@ +# 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 + ), + ) + + def _handle_callback_exception(self, cron_name, server_action_id, job_exception): + self.ensure_one() + if self.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 = self.email_template_id.with_context(**context).sudo() + template.send_mail(self.id, force_send=True) + + @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) + + @api.model + def _callback(self, cron_name, server_action_id): + try: + return super()._callback(cron_name, server_action_id) + except Exception as e: + self._handle_callback_exception(cron_name, server_action_id, e) diff --git a/scheduler_error_mailer/pyproject.toml b/scheduler_error_mailer/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/scheduler_error_mailer/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/scheduler_error_mailer/readme/CONFIGURE.md b/scheduler_error_mailer/readme/CONFIGURE.md new file mode 100644 index 00000000000..292ab0e0604 --- /dev/null +++ b/scheduler_error_mailer/readme/CONFIGURE.md @@ -0,0 +1,5 @@ +To configure this module, you need to: + +1. Go to Settings -\> Technical -\> Automation -\> Scheduled Actions +2. 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.md b/scheduler_error_mailer/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..e252e92acbd --- /dev/null +++ b/scheduler_error_mailer/readme/CONTRIBUTORS.md @@ -0,0 +1,10 @@ +- Sébastien BEAU \<\> +- David Beal \<\> +- Alexis de Lattre \<\> +- Sodexis \<\> +- Achraf Mhadhbi \<\> +- [Tecnativa](https://www.tecnativa.com): + - Cristina Martin R. + - Víctor Martínez +- [Komit](https://komit-consulting.com): + - Cuong NGUYEN MINH TRAN MANH diff --git a/scheduler_error_mailer/readme/DESCRIPTION.md b/scheduler_error_mailer/readme/DESCRIPTION.md new file mode 100644 index 00000000000..b47434046ba --- /dev/null +++ b/scheduler_error_mailer/readme/DESCRIPTION.md @@ -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 00000000000..6b22abf9732 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 00000000000..7c519d6e86a --- /dev/null +++ b/scheduler_error_mailer/static/description/index.html @@ -0,0 +1,448 @@ + + + + + +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 to smash 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 00000000000..6bd49cac1b7 --- /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 00000000000..609af88bdd6 --- /dev/null +++ b/scheduler_error_mailer/tests/test_scheduler_error_mailer.py @@ -0,0 +1,33 @@ +# 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.cron._handle_callback_exception( + self.cron.name, + self.cron.ir_actions_server_id.id, + Exception("hello world"), + ) + + def test_init_hook(self): + post_init_hook(self.env) + 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 00000000000..5ff6ac4be8c --- /dev/null +++ b/scheduler_error_mailer/views/ir_cron.xml @@ -0,0 +1,20 @@ + + + + + ir.cron.error.mailer.form + ir.cron + + + + + + + +