From abac24150e8ad612903ccc67b81c73a504a940d5 Mon Sep 17 00:00:00 2001 From: sebastien beau Date: Thu, 24 Feb 2011 16:51:23 +0100 Subject: [PATCH 01/29] [INIT] intial import --- scheduler_error_mailer/__init__.py | 23 +++++++++++ scheduler_error_mailer/__openerp__.py | 38 ++++++++++++++++++ scheduler_error_mailer/ir_cron.py | 55 +++++++++++++++++++++++++++ scheduler_error_mailer/ir_cron.xml | 28 ++++++++++++++ 4 files changed, 144 insertions(+) create mode 100644 scheduler_error_mailer/__init__.py create mode 100644 scheduler_error_mailer/__openerp__.py create mode 100644 scheduler_error_mailer/ir_cron.py create mode 100644 scheduler_error_mailer/ir_cron.xml diff --git a/scheduler_error_mailer/__init__.py b/scheduler_error_mailer/__init__.py new file mode 100644 index 00000000000..78a455ba842 --- /dev/null +++ b/scheduler_error_mailer/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Asterisk Click2Dial module for OpenERP +# Copyright (C) 2010 Sébastien BEAU +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +import ir_cron + diff --git a/scheduler_error_mailer/__openerp__.py b/scheduler_error_mailer/__openerp__.py new file mode 100644 index 00000000000..aead8b9fd54 --- /dev/null +++ b/scheduler_error_mailer/__openerp__.py @@ -0,0 +1,38 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Model module for OpenERP +# Copyright (C) 2010 Sébastien BEAU +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + + +{ + 'name': 'Scheduler Error Mailer', + 'version': '0.1', + 'category': 'Generic Modules/Others', + 'license': 'AGPL-3', + 'description': """This module dfkdsjfkdsjkfjksadd the posibility to send a email when a scheduler raise an error""", + 'author': 'Akretion', + 'website': 'http://www.akretion.com/', + 'depends': ['poweremail'], + 'init_xml': [], + 'update_xml': ['ir_cron.xml'], + 'demo_xml': [], + 'installable': True, + 'active': False, +} + diff --git a/scheduler_error_mailer/ir_cron.py b/scheduler_error_mailer/ir_cron.py new file mode 100644 index 00000000000..510f11c8f94 --- /dev/null +++ b/scheduler_error_mailer/ir_cron.py @@ -0,0 +1,55 @@ +# -*- encoding: utf-8 -*- +################################################################################# +# # +# Model module for OpenERP # +# Copyright (C) 2010 Sébastien BEAU # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU Affero General Public License as # +# published by the Free Software Foundation, either version 3 of the # +# License, or (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU Affero General Public License for more details. # +# # +# You should have received a copy of the GNU Affero General Public License # +# along with this program. If not, see . # +# # +################################################################################# + +from osv import osv, fields +import netsvc + + +class ir_cron(osv.osv, netsvc.Agent): + _inherit = "ir.cron" + + _columns = { + 'email_to' : fields.char('TO', size=256, help="If an error occure with this scheduler an email will be send"), + 'message' : fields.text('Message', help="If an error occure with this scheduler this message will be send via email"), + 'send_email' : fields.boolean('Active'), + 'email_account' : fields.many2one('poweremail.core_accounts', 'FROM') + } + + def _handle_callback_exception(self, cr, uid, model, func, args, job_id, job_exception): + res = super(ir_cron, self)._handle_callback_exception(cr, uid, model, func, args, job_id, job_exception) + job = self.read(cr, uid, job_id, ['send_email', 'message', 'email_TO', 'email_account', 'name']) + #TODO USE POWEREMAIL TEMPLATE + if job['send_email']: + addresses = {'To' : job['email_TO']} + mail_obj = self.pool.get('poweremail.mailbox') + id = mail_obj.create(cr, uid, { + 'pem_to' : job['email_TO'], + 'pem_subject' : "OPENERP : error when excecuting scheduler " + job["name"], + 'pem_body_text' : job['message'], + 'pem_account_id' : job['email_account'][0], + 'mail_type' : 'text/plain', + 'folder' : 'outbox', + 'state' :'na', + }) + mail_obj.send_this_mail(cr, uid, [id]) + return res +ir_cron() + diff --git a/scheduler_error_mailer/ir_cron.xml b/scheduler_error_mailer/ir_cron.xml new file mode 100644 index 00000000000..33a6d3dfebe --- /dev/null +++ b/scheduler_error_mailer/ir_cron.xml @@ -0,0 +1,28 @@ + + + + + + + ir.cron.error.mailer.form + ir.cron + + form + + + + + + + + + + + + + + From 25df1741fcbd3cfc3e9b94dc5263df1114754eda Mon Sep 17 00:00:00 2001 From: David BEAL Date: Mon, 4 Jun 2012 13:13:04 +0200 Subject: [PATCH 02/29] Now uses an email template instead of a simple mail Add a default e-mail template Add the code we used to test the failure of scheduler (the import directive is commented) --- scheduler_error_mailer/__init__.py | 6 +- scheduler_error_mailer/__openerp__.py | 19 +++-- scheduler_error_mailer/ir_cron.py | 76 +++++++++---------- scheduler_error_mailer/ir_cron.xml | 8 +- scheduler_error_mailer/ir_cron_email_tpl.xml | 32 ++++++++ scheduler_error_mailer/test_fail_scheduler.py | 39 ++++++++++ 6 files changed, 123 insertions(+), 57 deletions(-) create mode 100644 scheduler_error_mailer/ir_cron_email_tpl.xml create mode 100644 scheduler_error_mailer/test_fail_scheduler.py diff --git a/scheduler_error_mailer/__init__.py b/scheduler_error_mailer/__init__.py index 78a455ba842..82ee32f7030 100644 --- a/scheduler_error_mailer/__init__.py +++ b/scheduler_error_mailer/__init__.py @@ -1,8 +1,9 @@ # -*- coding: utf-8 -*- ############################################################################## # -# Asterisk Click2Dial module for OpenERP -# Copyright (C) 2010 Sébastien BEAU +# Scheduler error mailer module for OpenERP +# Copyright (C) 2012 Akretion +# @author: Sébastien Beau # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -20,4 +21,5 @@ ############################################################################## import ir_cron +# import test_fail_scheduler diff --git a/scheduler_error_mailer/__openerp__.py b/scheduler_error_mailer/__openerp__.py index aead8b9fd54..c477c4e641d 100644 --- a/scheduler_error_mailer/__openerp__.py +++ b/scheduler_error_mailer/__openerp__.py @@ -1,8 +1,11 @@ # -*- encoding: utf-8 -*- ############################################################################## # -# Model module for OpenERP -# Copyright (C) 2010 Sébastien BEAU +# Scheduler error mailer module for OpenERP +# Copyright (C) 2012 Akretion +# @author: Sébastien Beau +# @author David Beal +# @author Alexis de Lattre # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -21,16 +24,16 @@ { - 'name': 'Scheduler Error Mailer', - 'version': '0.1', - 'category': 'Generic Modules/Others', + 'name': 'Scheduler error mailer', + 'version': '1.0', + 'category': 'Extra Tools', 'license': 'AGPL-3', - 'description': """This module dfkdsjfkdsjkfjksadd the posibility to send a email when a scheduler raise an error""", + 'description': """This module adds the possibility to send an e-mail when a scheduler raises an error""", 'author': 'Akretion', 'website': 'http://www.akretion.com/', - 'depends': ['poweremail'], + 'depends': ['email_template'], 'init_xml': [], - 'update_xml': ['ir_cron.xml'], + 'update_xml': ['ir_cron.xml', 'ir_cron_email_tpl.xml'], 'demo_xml': [], 'installable': True, 'active': False, diff --git a/scheduler_error_mailer/ir_cron.py b/scheduler_error_mailer/ir_cron.py index 510f11c8f94..8782eb0b7b5 100644 --- a/scheduler_error_mailer/ir_cron.py +++ b/scheduler_error_mailer/ir_cron.py @@ -1,55 +1,49 @@ # -*- encoding: utf-8 -*- ################################################################################# -# # -# Model module for OpenERP # -# Copyright (C) 2010 Sébastien BEAU # -# # -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU Affero General Public License as # -# published by the Free Software Foundation, either version 3 of the # -# License, or (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU Affero General Public License for more details. # -# # -# You should have received a copy of the GNU Affero General Public License # -# along with this program. If not, see . # -# # -################################################################################# +# +# Scheduler error mailer module for OpenERP +# Copyright (C) 2012 Akretion +# @author: Sébastien Beau +# @author David Beal +# @author Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## from osv import osv, fields -import netsvc +from datetime import datetime -class ir_cron(osv.osv, netsvc.Agent): +class ir_cron(osv.osv): _inherit = "ir.cron" _columns = { - 'email_to' : fields.char('TO', size=256, help="If an error occure with this scheduler an email will be send"), - 'message' : fields.text('Message', help="If an error occure with this scheduler this message will be send via email"), - 'send_email' : fields.boolean('Active'), - 'email_account' : fields.many2one('poweremail.core_accounts', 'FROM') + 'email_template' : fields.many2one('email.template', 'E-mail template'), } + def _handle_callback_exception(self, cr, uid, model, func, args, job_id, job_exception): + res = super(ir_cron, self)._handle_callback_exception(cr, uid, model, func, args, job_id, job_exception) - job = self.read(cr, uid, job_id, ['send_email', 'message', 'email_TO', 'email_account', 'name']) - #TODO USE POWEREMAIL TEMPLATE - if job['send_email']: - addresses = {'To' : job['email_TO']} - mail_obj = self.pool.get('poweremail.mailbox') - id = mail_obj.create(cr, uid, { - 'pem_to' : job['email_TO'], - 'pem_subject' : "OPENERP : error when excecuting scheduler " + job["name"], - 'pem_body_text' : job['message'], - 'pem_account_id' : job['email_account'][0], - 'mail_type' : 'text/plain', - 'folder' : 'outbox', - 'state' :'na', - }) - mail_obj.send_this_mail(cr, uid, [id]) - return res -ir_cron() + my_cron = self.browse(cr, uid, job_id) + + if my_cron.email_template.id: + # we put the job_exception in context to be able to get it inside the mail template + context = {'job_exception': job_exception} + id_mail_messsage = self.pool.get('email.template').send_mail(cr, uid, + my_cron.email_template.id, my_cron.id, force_send=True, context=context) + + return res diff --git a/scheduler_error_mailer/ir_cron.xml b/scheduler_error_mailer/ir_cron.xml index 33a6d3dfebe..da3e844d8c5 100644 --- a/scheduler_error_mailer/ir_cron.xml +++ b/scheduler_error_mailer/ir_cron.xml @@ -1,7 +1,6 @@ @@ -16,10 +15,7 @@ - - - - + diff --git a/scheduler_error_mailer/ir_cron_email_tpl.xml b/scheduler_error_mailer/ir_cron_email_tpl.xml new file mode 100644 index 00000000000..5406d9aaf5b --- /dev/null +++ b/scheduler_error_mailer/ir_cron_email_tpl.xml @@ -0,0 +1,32 @@ + + + + + + + + + Scheduler error + ${object.user_id.user_email or ''} + [DB ${object._cr.dbname}] Scheduler '${object.name or ''}' FAILED + ${object.user_id.user_email or ''} + + + + + + diff --git a/scheduler_error_mailer/test_fail_scheduler.py b/scheduler_error_mailer/test_fail_scheduler.py new file mode 100644 index 00000000000..937f88e6e3d --- /dev/null +++ b/scheduler_error_mailer/test_fail_scheduler.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Scheduler error mailer module for OpenERP +# Copyright (C) 2012 Akretion +# @author David Beal +# @author Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from osv import fields, osv +from tools.translate import _ + +class test_fail_scheduler(osv.osv_memory): + _name = "test.fail.scheduler" + _description = "Test scheduler failure" + + def test_fail(self, cr, uid, context=None): + """ This a test fail, only for debugging purpose + DO NOT UNCOMMENT IMPORT IN init.py IN PRODUCTION ENVIRONNEMENT + """ + + raise osv.except_osv(_('Error :'), _("task failure")) + # context['tytytyty'] + +test_fail_scheduler() From b005511235335c376a6af074496ea8d6a9652b92 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Sun, 29 Sep 2013 23:54:55 +0200 Subject: [PATCH 03/29] Port to OpenERP 7.0. Add logo and screenshot. Add demo scheduler and test/debug function. --- scheduler_error_mailer/__init__.py | 9 ++- scheduler_error_mailer/__openerp__.py | 23 +++--- .../images/scheduler_error_mailer.jpg | Bin 0 -> 29784 bytes scheduler_error_mailer/ir_cron.py | 47 ++++++++---- scheduler_error_mailer/ir_cron.xml | 34 ++++----- scheduler_error_mailer/ir_cron_demo.xml | 27 +++++++ scheduler_error_mailer/ir_cron_email_tpl.xml | 68 +++++++++++------- .../static/src/img/icon.png | Bin 0 -> 5032 bytes scheduler_error_mailer/test_fail_scheduler.py | 39 ---------- 9 files changed, 140 insertions(+), 107 deletions(-) create mode 100644 scheduler_error_mailer/images/scheduler_error_mailer.jpg create mode 100644 scheduler_error_mailer/ir_cron_demo.xml create mode 100644 scheduler_error_mailer/static/src/img/icon.png delete mode 100644 scheduler_error_mailer/test_fail_scheduler.py diff --git a/scheduler_error_mailer/__init__.py b/scheduler_error_mailer/__init__.py index 82ee32f7030..36504c54b95 100644 --- a/scheduler_error_mailer/__init__.py +++ b/scheduler_error_mailer/__init__.py @@ -1,9 +1,10 @@ # -*- coding: utf-8 -*- ############################################################################## # -# Scheduler error mailer module for OpenERP -# Copyright (C) 2012 Akretion +# Scheduler Error Mailer module for OpenERP +# Copyright (C) 2012-2013 Akretion (http://www.akretion.com/) # @author: Sébastien Beau +# @author Alexis de Lattre # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -20,6 +21,4 @@ # ############################################################################## -import ir_cron -# import test_fail_scheduler - +from . import ir_cron diff --git a/scheduler_error_mailer/__openerp__.py b/scheduler_error_mailer/__openerp__.py index c477c4e641d..b1cb4dfe666 100644 --- a/scheduler_error_mailer/__openerp__.py +++ b/scheduler_error_mailer/__openerp__.py @@ -1,8 +1,8 @@ # -*- encoding: utf-8 -*- ############################################################################## # -# Scheduler error mailer module for OpenERP -# Copyright (C) 2012 Akretion +# Scheduler Error Mailer module for OpenERP +# Copyright (C) 2012-2013 Akretion (http://www.akretion.com/) # @author: Sébastien Beau # @author David Beal # @author Alexis de Lattre @@ -24,18 +24,25 @@ { - 'name': 'Scheduler error mailer', + 'name': 'Scheduler Error Mailer', + 'summary': 'Send an e-mail when a scheduler fails', 'version': '1.0', 'category': 'Extra Tools', 'license': 'AGPL-3', - 'description': """This module adds the possibility to send an e-mail when a scheduler raises an error""", + 'description': """ +Scheduler Error Mailer +====================== + +This module adds the possibility to send an e-mail when a scheduler raises an error.""", 'author': 'Akretion', 'website': 'http://www.akretion.com/', 'depends': ['email_template'], - 'init_xml': [], - 'update_xml': ['ir_cron.xml', 'ir_cron_email_tpl.xml'], - 'demo_xml': [], + 'data': [ + 'ir_cron.xml', + 'ir_cron_email_tpl.xml', + ], + 'demo': ['ir_cron_demo.xml'], + 'images': ['images/scheduler_error_mailer.jpg'], 'installable': True, 'active': False, } - 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 0000000000000000000000000000000000000000..a8a3af766a54c209723d9be24d05c1302ad01bbb GIT binary patch literal 29784 zcmeEu1z254n&`RM#YqSnG)QoQOM-^r2^QQfxVv8@5Fj{#5Zv8^OMu|+PH?!m2Df*+ zdwM46H?uqYX7_#X?e^s>s?I4n_4{9c)j4-lcZ*__y#N3IOgt2>w3kt_>iA z%@Yyy>ks(L4+IB~fQSS}MnOe`HK@D?z=7c5;Sk^v5fKnztvzA&0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15|D@noa=h^Wm#swM&VsgxD|(AW?mfuzC~z z1@CP3ThAU|fdY13odApdx6YTFkU0fdoqhn0LQ;Q$TmZ1lUtTu>cnALI=U;U~PSiAW zV*cJeTUmf@)l9a|Lde=_L4yX0Ja41wNCyG*3giK-W>x`X(y0%>?=7XFF|&dNz^l5j z0~izIg%6{~*>r%KhCN*F%aqA`Way^hk(H1lkZfwQ?El+F$9LHd)SPXL|sw|q!oTAqWi2aL4K_+`726- z|JQT=p`iB9atr^4-~Y?}2)A519>-l{cI5m~UHxzB^NIlRPlijV_~a-eAMvDa7cFnh N(RfMZ6wk-L{{YH#n!f-5 literal 0 HcmV?d00001 diff --git a/scheduler_error_mailer/ir_cron.py b/scheduler_error_mailer/ir_cron.py index 8782eb0b7b5..80b427c31ed 100644 --- a/scheduler_error_mailer/ir_cron.py +++ b/scheduler_error_mailer/ir_cron.py @@ -1,8 +1,8 @@ # -*- encoding: utf-8 -*- ################################################################################# # -# Scheduler error mailer module for OpenERP -# Copyright (C) 2012 Akretion +# Scheduler Error Mailer module for OpenERP +# Copyright (C) 2012-2013 Akretion (http://www.akretion.com/) # @author: Sébastien Beau # @author David Beal # @author Alexis de Lattre @@ -22,28 +22,49 @@ # ############################################################################## -from osv import osv, fields -from datetime import datetime +from openerp.osv import orm, fields +from openerp.tools.translate import _ +import logging +logger = logging.getLogger(__name__) -class ir_cron(osv.osv): +class ir_cron(orm.Model): _inherit = "ir.cron" _columns = { - 'email_template' : fields.many2one('email.template', 'E-mail template'), + 'email_template': fields.many2one('email.template', + 'Error E-mail Template', + help="Select the email template that will be sent when this scheduler fails."), } - def _handle_callback_exception(self, cr, uid, model, func, args, job_id, job_exception): + def _handle_callback_exception(self, cr, uid, model_name, method_name, args, job_id, job_exception): - res = super(ir_cron, self)._handle_callback_exception(cr, uid, model, func, args, job_id, job_exception) + res = super(ir_cron, self)._handle_callback_exception(cr, uid, + model_name, method_name, args, job_id, job_exception) my_cron = self.browse(cr, uid, job_id) - if my_cron.email_template.id: - # we put the job_exception in context to be able to get it inside the mail template - context = {'job_exception': job_exception} - id_mail_messsage = self.pool.get('email.template').send_mail(cr, uid, - my_cron.email_template.id, my_cron.id, force_send=True, context=context) + if my_cron.email_template: + # we put the job_exception in context to be able to print it inside + # the email template + context = { + 'job_exception': job_exception, + 'dbname': cr.dbname, + } + + logger.debug("Sending scheduler error email with context=%s" % context) + self.pool['email.template'].send_mail(cr, uid, + my_cron.email_template.id, my_cron.id, force_send=True, + context=context) return res + + +class res_users(orm.Model): + _inherit = 'res.users' + + def test_scheduler_failure(self, cr, uid, context=None): + """This function is used to test and debug this module""" + raise orm.except_orm(_('Error :'), _("Task failure with UID = %d." % uid)) + diff --git a/scheduler_error_mailer/ir_cron.xml b/scheduler_error_mailer/ir_cron.xml index da3e844d8c5..ee1bcfd6d9b 100644 --- a/scheduler_error_mailer/ir_cron.xml +++ b/scheduler_error_mailer/ir_cron.xml @@ -1,24 +1,24 @@ - - - ir.cron.error.mailer.form - ir.cron - - form - - - - - - - - - - + + + + + ir.cron.error.mailer.form + ir.cron + + + + + + + + + + diff --git a/scheduler_error_mailer/ir_cron_demo.xml b/scheduler_error_mailer/ir_cron_demo.xml new file mode 100644 index 00000000000..d8453b4bf83 --- /dev/null +++ b/scheduler_error_mailer/ir_cron_demo.xml @@ -0,0 +1,27 @@ + + + + + + + + + Test Scheduler Error Mailer + + + 1 + hours + -1 + + + + + + + + + diff --git a/scheduler_error_mailer/ir_cron_email_tpl.xml b/scheduler_error_mailer/ir_cron_email_tpl.xml index 5406d9aaf5b..d0bd7859bbf 100644 --- a/scheduler_error_mailer/ir_cron_email_tpl.xml +++ b/scheduler_error_mailer/ir_cron_email_tpl.xml @@ -1,32 +1,50 @@ - - - - - Scheduler error - ${object.user_id.user_email or ''} - [DB ${object._cr.dbname}] Scheduler '${object.name or ''}' FAILED - ${object.user_id.user_email or ''} - - - - - + + + + + Scheduler Error + ${object.user_id.user_email or ''} + ${object.user_id.user_email or ''} + [DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED + + + + +

OpenERP tried to run the scheduler ${object.name or ''} in the database ${ctx.get('dbname')} but it failed. Here is the error message :

+ + +${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to get the error message from the context.'} + + +

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

+ +

Properties of the scheduler ${object.name or ''} :

+
    +
  • Model : ${object.model or ''}
  • +
  • Method : ${object.function or ''}
  • +
  • Arguments : ${object.args or ''}
  • +
  • Interval : ${object.interval_number or '0'} ${object.interval_type or ''}
  • +
  • Number of calls : ${object.numbercall or '0'}
  • +
  • Repeat missed : ${object.doall}
  • +
  • User : ${object.user_id.name or ''}
  • +
+ +

+--
+Automatic e-mail sent by OpenERP. Do not reply.
+Database : ${ctx.get('dbname')} +

+ + ]]>
+
+ +
diff --git a/scheduler_error_mailer/static/src/img/icon.png b/scheduler_error_mailer/static/src/img/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..6b22abf97322d7e40e7a605b813376aad99937f9 GIT binary patch literal 5032 zcmV;Z6IbksP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i*xB z6(=*Y@A`@W000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}000vMNkl#5cOe8=;CX#^25E5~SfW@cOsc0P@tE;W8b)Z`H_4ReN z#p-*O$CFYJ94Q(>W<*8QMnMq>QwRb9j6(*JkU94zcfR-cJMWK>5JD0nQ{P&Tz1CUx zx6bd}efIbJ+h?D%_kk;NMXtydxg!66MH!@{N{hlJ>RziSBu)Ka_S;I}U4&mP&g z@8J1Nykz3Ut5VIDWfQI8S4HY{a_@K59*@7QvvYg3*L(ltd-gP4b^?~={1^F4c(UMd1KeLIRK7d(6a zu!MP`TJ3<|p$Ngo#>Vw`Zr?uhd?#LAUHw*0R8&re**sd7`k%_I(MY+Wp|^~Rh!C4j zocR2bd%%l%dDCVmBov2gwFCaaud1v&d2+!6yLLU<-6w>Qz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N;)wgy- zM@NU~=;#m*heO!yc44>MMSFX@XlrZhYOS@Rz5SSIYb_H;j(j2-8!AO}bF(NZ+12@r zU(8M(GzQF_JJ%Q;6Z3O`kGE`TczMp_g=f?bYiljHep*~G)#H)B&)1)-D5j?gzC0d! zN?k9{dA#uBEn6A@Vr;RqdnY+*DQT1+FURS0;&Qq0dcCK=wxSFeClo~?sOa(gBdM%X z2?-gAB%2XJ^b~mpT>_td_F1s0v2l~n?Y?QX2wJG9C&9oOgW$RKNgaW zP;dg?KMC$;P&}=kRRP6w+onw$emG^ywGV`bh8eq!)yNtSA3aQ*Ew0}kVW88Ys;bo2 z*Q3#Bh>AL0m9pFI{<5-tOV6v)a-raROA+i?1b37|OLyNZulyzKhU;fmCnP3Ym0l(F z>e_0Wnw!WRmD!W}_D<8g>H(+wgb=j1x6|3#Nm^Rk8S~cER6AdPeMz?Vp9vn|l%99` zl5j?Tf9f|WA&J(uRw}-&Al?>#7TCVeE|&|t-A-<9?iqR{NkW!ob-;?yCj@L|J|WC_3DkJszP8a@i zgF)ObHvxYDS&}h_n2EARF)n8u)-WsOUzek(%2|3q`u+sG4jUK1FV96ncVIgN6^r1G zbCGZiS{A@BUx$so!S{{mZT2?oopuVR6!ru-pU-zj^zYpgViQP;Pom1+T6;0--OxoJoaJ$|8g6>P2#bhBRDTR|wCkX@t z7f!%nB=onX4MxI%-~m;10Ze4l77I;K=jtFJCh%L@Yk|I-<9Dxolay~ zMyJ#DyOj+EeD9m*Q(hrgR#p$wUg#cv3dF{tjxU9l?yasL(F1zB-K9NvV1KZ_uC7HD zDneCHWm3JqIH&s*MFqN-1PE0ix`N2*K5@EF6@u!jO0C0TS1;M6;{}M3uCs&X)U$lP yv1*|EnN!URIR7saFr*9I3zQ&NEv<0000 -# @author Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from osv import fields, osv -from tools.translate import _ - -class test_fail_scheduler(osv.osv_memory): - _name = "test.fail.scheduler" - _description = "Test scheduler failure" - - def test_fail(self, cr, uid, context=None): - """ This a test fail, only for debugging purpose - DO NOT UNCOMMENT IMPORT IN init.py IN PRODUCTION ENVIRONNEMENT - """ - - raise osv.except_osv(_('Error :'), _("task failure")) - # context['tytytyty'] - -test_fail_scheduler() From 952c73a9f1212f9afc7442ba5bad5e8e6ca939e9 Mon Sep 17 00:00:00 2001 From: Sandy Carter Date: Fri, 14 Mar 2014 13:45:14 -0400 Subject: [PATCH 04/29] Generate .pot files --- .../i18n/scheduler_error_mailer.pot | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 scheduler_error_mailer/i18n/scheduler_error_mailer.pot 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..c83ab22af5c --- /dev/null +++ b/scheduler_error_mailer/i18n/scheduler_error_mailer.pot @@ -0,0 +1,16 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-03-14 17:41+0000\n" +"PO-Revision-Date: 2014-03-14 17:41+0000\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" + From 9fa95c67ab4b64086872edd687f9ff770b9e2be6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Sat, 12 Jul 2014 12:02:52 +0200 Subject: [PATCH 05/29] move all modules to __unported__ on master branch and set installable=False --- scheduler_error_mailer/__init__.py | 24 ------ scheduler_error_mailer/__openerp__.py | 48 ------------ .../i18n/scheduler_error_mailer.pot | 16 ---- .../images/scheduler_error_mailer.jpg | Bin 29784 -> 0 bytes scheduler_error_mailer/ir_cron.py | 70 ------------------ scheduler_error_mailer/ir_cron.xml | 24 ------ scheduler_error_mailer/ir_cron_demo.xml | 27 ------- scheduler_error_mailer/ir_cron_email_tpl.xml | 50 ------------- .../static/src/img/icon.png | Bin 5032 -> 0 bytes 9 files changed, 259 deletions(-) delete mode 100644 scheduler_error_mailer/__init__.py delete mode 100644 scheduler_error_mailer/__openerp__.py delete mode 100644 scheduler_error_mailer/i18n/scheduler_error_mailer.pot delete mode 100644 scheduler_error_mailer/images/scheduler_error_mailer.jpg delete mode 100644 scheduler_error_mailer/ir_cron.py delete mode 100644 scheduler_error_mailer/ir_cron.xml delete mode 100644 scheduler_error_mailer/ir_cron_demo.xml delete mode 100644 scheduler_error_mailer/ir_cron_email_tpl.xml delete mode 100644 scheduler_error_mailer/static/src/img/icon.png diff --git a/scheduler_error_mailer/__init__.py b/scheduler_error_mailer/__init__.py deleted file mode 100644 index 36504c54b95..00000000000 --- a/scheduler_error_mailer/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Scheduler Error Mailer module for OpenERP -# Copyright (C) 2012-2013 Akretion (http://www.akretion.com/) -# @author: Sébastien Beau -# @author Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from . import ir_cron diff --git a/scheduler_error_mailer/__openerp__.py b/scheduler_error_mailer/__openerp__.py deleted file mode 100644 index b1cb4dfe666..00000000000 --- a/scheduler_error_mailer/__openerp__.py +++ /dev/null @@ -1,48 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Scheduler Error Mailer module for OpenERP -# Copyright (C) 2012-2013 Akretion (http://www.akretion.com/) -# @author: Sébastien Beau -# @author David Beal -# @author Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - - -{ - 'name': 'Scheduler Error Mailer', - 'summary': 'Send an e-mail when a scheduler fails', - 'version': '1.0', - 'category': 'Extra Tools', - 'license': 'AGPL-3', - 'description': """ -Scheduler Error Mailer -====================== - -This module adds the possibility to send an e-mail when a scheduler raises an error.""", - 'author': 'Akretion', - 'website': 'http://www.akretion.com/', - 'depends': ['email_template'], - 'data': [ - 'ir_cron.xml', - 'ir_cron_email_tpl.xml', - ], - 'demo': ['ir_cron_demo.xml'], - 'images': ['images/scheduler_error_mailer.jpg'], - 'installable': True, - 'active': False, -} diff --git a/scheduler_error_mailer/i18n/scheduler_error_mailer.pot b/scheduler_error_mailer/i18n/scheduler_error_mailer.pot deleted file mode 100644 index c83ab22af5c..00000000000 --- a/scheduler_error_mailer/i18n/scheduler_error_mailer.pot +++ /dev/null @@ -1,16 +0,0 @@ -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# -msgid "" -msgstr "" -"Project-Id-Version: OpenERP Server 7.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-03-14 17:41+0000\n" -"PO-Revision-Date: 2014-03-14 17:41+0000\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" - diff --git a/scheduler_error_mailer/images/scheduler_error_mailer.jpg b/scheduler_error_mailer/images/scheduler_error_mailer.jpg deleted file mode 100644 index a8a3af766a54c209723d9be24d05c1302ad01bbb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 29784 zcmeEu1z254n&`RM#YqSnG)QoQOM-^r2^QQfxVv8@5Fj{#5Zv8^OMu|+PH?!m2Df*+ zdwM46H?uqYX7_#X?e^s>s?I4n_4{9c)j4-lcZ*__y#N3IOgt2>w3kt_>iA z%@Yyy>ks(L4+IB~fQSS}MnOe`HK@D?z=7c5;Sk^v5fKnztvzA&0K$Dl>_@D^NDt)o zz!bJPY(9}`$du2^T5uJH52)Dn?R-&C@$d-CqXIFR6$mrPk#N^cU%+m78>e@PVV{_~9==l4|>Dl?kHd4$h5K+6iRl5 z16+N(VN^USjwR~DUqJg6vVRUR-~S`X{tDRN;Fgybiq!>iL6 zbHid%4TtSpQ(%PfRLP=GiFq%GpjajayecUx-I!I|AB?w3#!tMw&N68vl63Xs*|Tz z?*6q^!43$Ffy77zINCfWo`! zD@jb6szN_o`N}}1d>r~1t1JjEvqnuPGSSbkd5|>GF&{OEG-lZ_SUH|Eilw;IR+rdY za=+6Jm)d%}M)SMHI1!UF+EqclOO&X)3d$oJfC`$8(zSTfZtwQ?Q1XfYIF*?0hJ*qN zJSzLeI77jwU5Z1F*qyG9HJrLcT!d08()pB7YH8W+8tsk!W2OClgVDk_^`Epd0^j%o zl7#Ty5+pa~5v5hNqbKg%mDOS6h9Ucb3n(6kz9NW=P`<;?(f9!t4XtzKZN-}U$Vxm9 zR<_8LIKbcCm$%b8HBDjC=H+*3bN{-^fMu5FQa)oWEkH=fN)zW}vw#T5@+*ToK=Z*J zAdIW4CDgU^I3ypNH~@i;#LnG|GchJBmBM2<-us(SZWQ4P@+zW!GZIZIx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B;oFjBnX42wthVC;~l=lM)0NanT9se@9{rg{>7 zN!ePHGx6D*rtf#C*ZEa2rlx!Op}`Ia9?oV^;x_LMyCD8gFo_zox zRdXSWe%yI0Gq=4Pyr>CHt`#308t13*;aj+F_l)1G9!SH<&l}BT&=;8M5t!Nu8yb6% z*|IcuJJqu`c3Regs}nYS!LRAvJbVxLE%QL~z88seYSva*SIv#(`7>T-xb`w*aL0}(zd7FP=%8Im9r2*uzOvzK#{i05D_^_JI=AxU3N(Mx?-c$TV zGc1=|3&!I%P&V(QUY(pvM=sO>iK6BbQLx%0Nc-VHd8sE9uaF}RgjR0|ovGV0b6kfUZn|T&&F-%VzrS(L+%OmbbvCnNYXB$a z!y@Sdvzd zeR!g`BrG)9@P1XBF6!2-N22FUq(6g=15|D@noa=h^Wm#swM&VsgxD|(AW?mfuzC~z z1@CP3ThAU|fdY13odApdx6YTFkU0fdoqhn0LQ;Q$TmZ1lUtTu>cnALI=U;U~PSiAW zV*cJeTUmf@)l9a|Lde=_L4yX0Ja41wNCyG*3giK-W>x`X(y0%>?=7XFF|&dNz^l5j z0~izIg%6{~*>r%KhCN*F%aqA`Way^hk(H1lkZfwQ?El+F$9LHd)SPXL|sw|q!oTAqWi2aL4K_+`726- z|JQT=p`iB9atr^4-~Y?}2)A519>-l{cI5m~UHxzB^NIlRPlijV_~a-eAMvDa7cFnh N(RfMZ6wk-L{{YH#n!f-5 diff --git a/scheduler_error_mailer/ir_cron.py b/scheduler_error_mailer/ir_cron.py deleted file mode 100644 index 80b427c31ed..00000000000 --- a/scheduler_error_mailer/ir_cron.py +++ /dev/null @@ -1,70 +0,0 @@ -# -*- encoding: utf-8 -*- -################################################################################# -# -# Scheduler Error Mailer module for OpenERP -# Copyright (C) 2012-2013 Akretion (http://www.akretion.com/) -# @author: Sébastien Beau -# @author David Beal -# @author Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import orm, fields -from openerp.tools.translate import _ -import logging - -logger = logging.getLogger(__name__) - -class ir_cron(orm.Model): - _inherit = "ir.cron" - - _columns = { - 'email_template': fields.many2one('email.template', - 'Error E-mail Template', - help="Select the email template that will be sent when this scheduler fails."), - } - - - def _handle_callback_exception(self, cr, uid, model_name, method_name, args, job_id, job_exception): - - res = super(ir_cron, self)._handle_callback_exception(cr, uid, - model_name, method_name, args, job_id, job_exception) - - my_cron = self.browse(cr, uid, job_id) - - if my_cron.email_template: - # we put the job_exception in context to be able to print it inside - # the email template - context = { - 'job_exception': job_exception, - 'dbname': cr.dbname, - } - - logger.debug("Sending scheduler error email with context=%s" % context) - self.pool['email.template'].send_mail(cr, uid, - my_cron.email_template.id, my_cron.id, force_send=True, - context=context) - - return res - - -class res_users(orm.Model): - _inherit = 'res.users' - - def test_scheduler_failure(self, cr, uid, context=None): - """This function is used to test and debug this module""" - raise orm.except_orm(_('Error :'), _("Task failure with UID = %d." % uid)) - diff --git a/scheduler_error_mailer/ir_cron.xml b/scheduler_error_mailer/ir_cron.xml deleted file mode 100644 index ee1bcfd6d9b..00000000000 --- a/scheduler_error_mailer/ir_cron.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - ir.cron.error.mailer.form - ir.cron - - - - - - - - - - - diff --git a/scheduler_error_mailer/ir_cron_demo.xml b/scheduler_error_mailer/ir_cron_demo.xml deleted file mode 100644 index d8453b4bf83..00000000000 --- a/scheduler_error_mailer/ir_cron_demo.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - Test Scheduler Error Mailer - - - 1 - hours - -1 - - - - - - - - - diff --git a/scheduler_error_mailer/ir_cron_email_tpl.xml b/scheduler_error_mailer/ir_cron_email_tpl.xml deleted file mode 100644 index d0bd7859bbf..00000000000 --- a/scheduler_error_mailer/ir_cron_email_tpl.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - Scheduler Error - ${object.user_id.user_email or ''} - ${object.user_id.user_email or ''} - [DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED - - - - -

OpenERP tried to run the scheduler ${object.name or ''} in the database ${ctx.get('dbname')} but it failed. Here is the error message :

- - -${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to get the error message from the context.'} - - -

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

- -

Properties of the scheduler ${object.name or ''} :

-
    -
  • Model : ${object.model or ''}
  • -
  • Method : ${object.function or ''}
  • -
  • Arguments : ${object.args or ''}
  • -
  • Interval : ${object.interval_number or '0'} ${object.interval_type or ''}
  • -
  • Number of calls : ${object.numbercall or '0'}
  • -
  • Repeat missed : ${object.doall}
  • -
  • User : ${object.user_id.name or ''}
  • -
- -

---
-Automatic e-mail sent by OpenERP. Do not reply.
-Database : ${ctx.get('dbname')} -

- - ]]>
-
- -
-
diff --git a/scheduler_error_mailer/static/src/img/icon.png b/scheduler_error_mailer/static/src/img/icon.png deleted file mode 100644 index 6b22abf97322d7e40e7a605b813376aad99937f9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5032 zcmV;Z6IbksP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i*xB z6(=*Y@A`@W000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}000vMNkl#5cOe8=;CX#^25E5~SfW@cOsc0P@tE;W8b)Z`H_4ReN z#p-*O$CFYJ94Q(>W<*8QMnMq>QwRb9j6(*JkU94zcfR-cJMWK>5JD0nQ{P&Tz1CUx zx6bd}efIbJ+h?D%_kk;NMXtydxg!66MH!@{N{hlJ>RziSBu)Ka_S;I}U4&mP&g z@8J1Nykz3Ut5VID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!jO0C0TS1;M6;{}M3uCs&X)U$lP yv1*|EnN!URIR7saFr*9I3zQ&NEv<0000 Date: Tue, 16 Sep 2014 13:03:36 +0200 Subject: [PATCH 06/29] [MIG] scheduler_error_mailer: Migration to v8 --- scheduler_error_mailer/__init__.py | 24 ++++++ scheduler_error_mailer/__openerp__.py | 48 +++++++++++ .../i18n/scheduler_error_mailer.pot | 76 ++++++++++++++++++ .../images/scheduler_error_mailer.jpg | Bin 0 -> 29784 bytes scheduler_error_mailer/ir_cron.py | 75 +++++++++++++++++ scheduler_error_mailer/ir_cron.xml | 24 ++++++ scheduler_error_mailer/ir_cron_demo.xml | 26 ++++++ scheduler_error_mailer/ir_cron_email_tpl.xml | 50 ++++++++++++ .../static/description/icon.png | Bin 0 -> 5032 bytes 9 files changed, 323 insertions(+) create mode 100644 scheduler_error_mailer/__init__.py create mode 100644 scheduler_error_mailer/__openerp__.py create mode 100644 scheduler_error_mailer/i18n/scheduler_error_mailer.pot create mode 100644 scheduler_error_mailer/images/scheduler_error_mailer.jpg create mode 100644 scheduler_error_mailer/ir_cron.py create mode 100644 scheduler_error_mailer/ir_cron.xml create mode 100644 scheduler_error_mailer/ir_cron_demo.xml create mode 100644 scheduler_error_mailer/ir_cron_email_tpl.xml create mode 100644 scheduler_error_mailer/static/description/icon.png diff --git a/scheduler_error_mailer/__init__.py b/scheduler_error_mailer/__init__.py new file mode 100644 index 00000000000..36504c54b95 --- /dev/null +++ b/scheduler_error_mailer/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Scheduler Error Mailer module for OpenERP +# Copyright (C) 2012-2013 Akretion (http://www.akretion.com/) +# @author: Sébastien Beau +# @author Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from . import ir_cron diff --git a/scheduler_error_mailer/__openerp__.py b/scheduler_error_mailer/__openerp__.py new file mode 100644 index 00000000000..d8dd3eb3638 --- /dev/null +++ b/scheduler_error_mailer/__openerp__.py @@ -0,0 +1,48 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Scheduler Error Mailer module for OpenERP +# Copyright (C) 2012-2013 Akretion (http://www.akretion.com/) +# @author: Sébastien Beau +# @author David Beal +# @author Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + + +{ + 'name': 'Scheduler Error Mailer', + 'summary': 'Send an e-mail when a scheduler fails', + 'version': '8.0.1.0.0', + 'category': 'Extra Tools', + 'license': 'AGPL-3', + 'description': """ +Scheduler Error Mailer +====================== + +This module adds the possibility to send an e-mail when a scheduler raises +an error.""", + 'author': "Akretion,Odoo Community Association (OCA)", + 'website': 'http://www.akretion.com/', + 'depends': ['email_template'], + 'data': [ + 'ir_cron.xml', + 'ir_cron_email_tpl.xml', + ], + 'demo': ['ir_cron_demo.xml'], + 'images': ['images/scheduler_error_mailer.jpg'], + 'installable': True, +} 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..95fe5ca847c --- /dev/null +++ b/scheduler_error_mailer/i18n/scheduler_error_mailer.pot @@ -0,0 +1,76 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * scheduler_error_mailer +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0rc1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-09-18 11:55+0000\n" +"PO-Revision-Date: 2014-09-18 11:55+0000\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:email.template,body_html:scheduler_error_mailer.scheduler_error_mailer +msgid "\n" +"
\n" +"\n" +"

OpenERP 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 OpenERP 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 OpenERP. Do not reply.
\n" +"Database : ${ctx.get('dbname')}\n" +"

\n" +"
\n" +" " +msgstr "" + +#. module: scheduler_error_mailer +#: code:addons/scheduler_error_mailer/ir_cron.py:74 +#, python-format +msgid "Error :" +msgstr "" + +#. module: scheduler_error_mailer +#: field:ir.cron,email_template:0 +msgid "Error E-mail Template" +msgstr "" + +#. module: scheduler_error_mailer +#: help:ir.cron,email_template:0 +msgid "Select the email template that will be sent when this scheduler fails." +msgstr "" + +#. module: scheduler_error_mailer +#: code:addons/scheduler_error_mailer/ir_cron.py:75 +#, python-format +msgid "Task failure with UID = %d." +msgstr "" + +#. module: scheduler_error_mailer +#: model:email.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/images/scheduler_error_mailer.jpg b/scheduler_error_mailer/images/scheduler_error_mailer.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a8a3af766a54c209723d9be24d05c1302ad01bbb GIT binary patch literal 29784 zcmeEu1z254n&`RM#YqSnG)QoQOM-^r2^QQfxVv8@5Fj{#5Zv8^OMu|+PH?!m2Df*+ zdwM46H?uqYX7_#X?e^s>s?I4n_4{9c)j4-lcZ*__y#N3IOgt2>w3kt_>iA z%@Yyy>ks(L4+IB~fQSS}MnOe`HK@D?z=7c5;Sk^v5fKnztvzA&0K$Dl>_@D^NDt)o zz!bJPY(9}`$du2^T5uJH52)Dn?R-&C@$d-CqXIFR6$mrPk#N^cU%+m78>e@PVV{_~9==l4|>Dl?kHd4$h5K+6iRl5 z16+N(VN^USjwR~DUqJg6vVRUR-~S`X{tDRN;Fgybiq!>iL6 zbHid%4TtSpQ(%PfRLP=GiFq%GpjajayecUx-I!I|AB?w3#!tMw&N68vl63Xs*|Tz z?*6q^!43$Ffy77zINCfWo`! zD@jb6szN_o`N}}1d>r~1t1JjEvqnuPGSSbkd5|>GF&{OEG-lZ_SUH|Eilw;IR+rdY za=+6Jm)d%}M)SMHI1!UF+EqclOO&X)3d$oJfC`$8(zSTfZtwQ?Q1XfYIF*?0hJ*qN zJSzLeI77jwU5Z1F*qyG9HJrLcT!d08()pB7YH8W+8tsk!W2OClgVDk_^`Epd0^j%o zl7#Ty5+pa~5v5hNqbKg%mDOS6h9Ucb3n(6kz9NW=P`<;?(f9!t4XtzKZN-}U$Vxm9 zR<_8LIKbcCm$%b8HBDjC=H+*3bN{-^fMu5FQa)oWEkH=fN)zW}vw#T5@+*ToK=Z*J zAdIW4CDgU^I3ypNH~@i;#LnG|GchJBmBM2<-us(SZWQ4P@+zW!GZI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zDuB;oFjBnX42wthVC;~l=lM)0NanT9se@9{rg{>7 zN!ePHGx6D*rtf#C*ZEa2rlx!Op}`Ia9?oV^;x_LMyCD8gFo_zox zRdXSWe%yI0Gq=4Pyr>CHt`#308t13*;aj+F_l)1G9!SH<&l}BT&=;8M5t!Nu8yb6% z*|IcuJJqu`c3Regs}nYS!LRAvJbVxLE%QL~z88seYSva*SIv#(`7>T-xb`w*aL0}(zd7FP=%8Im9r2*uzOvzK#{i05D_^_JI=AxU3N(Mx?-c$TV zGc1=|3&!I%P&V(QUY(pvM=sO>iK6BbQLx%0Nc-VHd8sE9uaF}RgjR0|ovGV0b6kfUZn|T&&F-%VzrS(L+%OmbbvCnNYXB$a z!y@Sdvzd zeR!g`BrG)9@P1XBF6!2-N22FUq(6g=15|D@noa=h^Wm#swM&VsgxD|(AW?mfuzC~z z1@CP3ThAU|fdY13odApdx6YTFkU0fdoqhn0LQ;Q$TmZ1lUtTu>cnALI=U;U~PSiAW zV*cJeTUmf@)l9a|Lde=_L4yX0Ja41wNCyG*3giK-W>x`X(y0%>?=7XFF|&dNz^l5j z0~izIg%6{~*>r%KhCN*F%aqA`Way^hk(H1lkZfwQ?El+F$9LHd)SPXL|sw|q!oTAqWi2aL4K_+`726- z|JQT=p`iB9atr^4-~Y?}2)A519>-l{cI5m~UHxzB^NIlRPlijV_~a-eAMvDa7cFnh N(RfMZ6wk-L{{YH#n!f-5 literal 0 HcmV?d00001 diff --git a/scheduler_error_mailer/ir_cron.py b/scheduler_error_mailer/ir_cron.py new file mode 100644 index 00000000000..17b0f2c304e --- /dev/null +++ b/scheduler_error_mailer/ir_cron.py @@ -0,0 +1,75 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Scheduler Error Mailer module for OpenERP +# Copyright (C) 2012-2013 Akretion (http://www.akretion.com/) +# @author: Sébastien Beau +# @author David Beal +# @author Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp import SUPERUSER_ID +from openerp.osv import orm, fields +from openerp.tools.translate import _ +import logging + + +_logger = logging.getLogger(__name__) + + +class ir_cron(orm.Model): + _inherit = "ir.cron" + + _columns = { + 'email_template': fields.many2one( + 'email.template', + 'Error E-mail Template', + help="Select the email template that will be " + "sent when this scheduler fails."), + } + + def _handle_callback_exception(self, cr, uid, model_name, method_name, + args, job_id, job_exception): + + res = super(ir_cron, self)._handle_callback_exception( + cr, uid, model_name, method_name, args, job_id, job_exception) + + my_cron = self.browse(cr, uid, job_id) + + if my_cron.email_template: + # we put the job_exception in context to be able to print it inside + # the email template + context = { + 'job_exception': job_exception, + 'dbname': cr.dbname, + } + + _logger.debug("Sending scheduler error email with context=%s", + context) + + self.pool['email.template'].send_mail( + cr, SUPERUSER_ID, my_cron.email_template.id, my_cron.id, + force_send=True, context=context) + + return res + + def _test_scheduler_failure(self, cr, uid, context=None): + """This function is used to test and debug this module""" + + raise orm.except_orm( + _('Error :'), + _("Task failure with UID = %d.") % uid) diff --git a/scheduler_error_mailer/ir_cron.xml b/scheduler_error_mailer/ir_cron.xml new file mode 100644 index 00000000000..ee1bcfd6d9b --- /dev/null +++ b/scheduler_error_mailer/ir_cron.xml @@ -0,0 +1,24 @@ + + + + + + + + + ir.cron.error.mailer.form + ir.cron + + + + + + + + + + + diff --git a/scheduler_error_mailer/ir_cron_demo.xml b/scheduler_error_mailer/ir_cron_demo.xml new file mode 100644 index 00000000000..4c6fc5e7b5a --- /dev/null +++ b/scheduler_error_mailer/ir_cron_demo.xml @@ -0,0 +1,26 @@ + + + + + + + + + Test Scheduler Error Mailer + + + 1 + hours + -1 + + + ir.cron + _test_scheduler_failure + + + + diff --git a/scheduler_error_mailer/ir_cron_email_tpl.xml b/scheduler_error_mailer/ir_cron_email_tpl.xml new file mode 100644 index 00000000000..d0bd7859bbf --- /dev/null +++ b/scheduler_error_mailer/ir_cron_email_tpl.xml @@ -0,0 +1,50 @@ + + + + + + + + + Scheduler Error + ${object.user_id.user_email or ''} + ${object.user_id.user_email or ''} + [DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED + + + + +

OpenERP tried to run the scheduler ${object.name or ''} in the database ${ctx.get('dbname')} but it failed. Here is the error message :

+ + +${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to get the error message from the context.'} + + +

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

+ +

Properties of the scheduler ${object.name or ''} :

+
    +
  • Model : ${object.model or ''}
  • +
  • Method : ${object.function or ''}
  • +
  • Arguments : ${object.args or ''}
  • +
  • Interval : ${object.interval_number or '0'} ${object.interval_type or ''}
  • +
  • Number of calls : ${object.numbercall or '0'}
  • +
  • Repeat missed : ${object.doall}
  • +
  • User : ${object.user_id.name or ''}
  • +
+ +

+--
+Automatic e-mail sent by OpenERP. Do not reply.
+Database : ${ctx.get('dbname')} +

+ + ]]>
+
+ +
+
diff --git a/scheduler_error_mailer/static/description/icon.png b/scheduler_error_mailer/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..6b22abf97322d7e40e7a605b813376aad99937f9 GIT binary patch literal 5032 zcmV;Z6IbksP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i*xB z6(=*Y@A`@W000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}000vMNkl#5cOe8=;CX#^25E5~SfW@cOsc0P@tE;W8b)Z`H_4ReN z#p-*O$CFYJ94Q(>W<*8QMnMq>QwRb9j6(*JkU94zcfR-cJMWK>5JD0nQ{P&Tz1CUx zx6bd}efIbJ+h?D%_kk;NMXtydxg!66MH!@{N{hlJ>RziSBu)Ka_S;I}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*MFqN-1PE0ix`N2*K5@EF6@u!jO0C0TS1;M6;{}M3uCs&X)U$lP yv1*|EnN!URIR7saFr*9I3zQ&NEv<0000 Date: Mon, 15 Sep 2014 21:44:29 +0200 Subject: [PATCH 07/29] [FIX] renamed 'email_template' m2o field in 'email_template_id' in scheduler_error_mailer module --- scheduler_error_mailer/i18n/en.po | 79 ++++++++++++++++++++++++ scheduler_error_mailer/i18n/pt_BR.po | 80 +++++++++++++++++++++++++ scheduler_error_mailer/i18n/sl.po | 80 +++++++++++++++++++++++++ scheduler_error_mailer/ir_cron.py | 7 ++- scheduler_error_mailer/ir_cron.xml | 2 +- scheduler_error_mailer/ir_cron_demo.xml | 2 +- 6 files changed, 245 insertions(+), 5 deletions(-) create mode 100644 scheduler_error_mailer/i18n/en.po create mode 100644 scheduler_error_mailer/i18n/pt_BR.po create mode 100644 scheduler_error_mailer/i18n/sl.po diff --git a/scheduler_error_mailer/i18n/en.po b/scheduler_error_mailer/i18n/en.po new file mode 100644 index 00000000000..002a624c9f7 --- /dev/null +++ b/scheduler_error_mailer/i18n/en.po @@ -0,0 +1,79 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * scheduler_error_mailer +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: server-tools (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-09-29 11:14+0000\n" +"PO-Revision-Date: 2015-09-18 13:56+0000\n" +"Last-Translator: OCA Transbot \n" +"Language-Team: English (http://www.transifex.com/oca/OCA-server-tools-8-0/language/en/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: en\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: scheduler_error_mailer +#: model:email.template,body_html:scheduler_error_mailer.scheduler_error_mailer +msgid "" +"\n" +"
\n" +"\n" +"

OpenERP 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 OpenERP 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 OpenERP. Do not reply.
\n" +"Database : ${ctx.get('dbname')}\n" +"

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

OpenERP 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 OpenERP 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--
\nAutomatic e-mail sent by OpenERP. Do not reply.
\nDatabase : ${ctx.get('dbname')}\n

\n
\n " + +#. module: scheduler_error_mailer +#: code:addons/scheduler_error_mailer/ir_cron.py:75 +#, python-format +msgid "Error :" +msgstr "Error :" + +#. module: scheduler_error_mailer +#: field:ir.cron,email_template_id:0 +msgid "Error E-mail Template" +msgstr "Error E-mail Template" + +#. module: scheduler_error_mailer +#: help:ir.cron,email_template_id:0 +msgid "Select the email template that will be sent when this scheduler fails." +msgstr "Select the email template that will be sent when this scheduler fails." + +#. module: scheduler_error_mailer +#: code:addons/scheduler_error_mailer/ir_cron.py:76 +#, python-format +msgid "Task failure with UID = %d." +msgstr "Task failure with UID = %d." + +#. module: scheduler_error_mailer +#: model:email.template,subject:scheduler_error_mailer.scheduler_error_mailer +msgid "[DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED" +msgstr "[DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED" diff --git a/scheduler_error_mailer/i18n/pt_BR.po b/scheduler_error_mailer/i18n/pt_BR.po new file mode 100644 index 00000000000..4ad2412b199 --- /dev/null +++ b/scheduler_error_mailer/i18n/pt_BR.po @@ -0,0 +1,80 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * scheduler_error_mailer +# +# Translators: +# Armando Vulcano Junior , 2015 +msgid "" +msgstr "" +"Project-Id-Version: server-tools (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-09-29 11:14+0000\n" +"PO-Revision-Date: 2015-09-18 23:44+0000\n" +"Last-Translator: Armando Vulcano Junior \n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-server-tools-8-0/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: scheduler_error_mailer +#: model:email.template,body_html:scheduler_error_mailer.scheduler_error_mailer +msgid "" +"\n" +"
\n" +"\n" +"

OpenERP 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 OpenERP 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 OpenERP. Do not reply.
\n" +"Database : ${ctx.get('dbname')}\n" +"

\n" +"
\n" +" " +msgstr "" + +#. module: scheduler_error_mailer +#: code:addons/scheduler_error_mailer/ir_cron.py:75 +#, python-format +msgid "Error :" +msgstr "Erro" + +#. module: scheduler_error_mailer +#: field:ir.cron,email_template_id:0 +msgid "Error E-mail Template" +msgstr "Modelo de Erro de E-mail" + +#. module: scheduler_error_mailer +#: help:ir.cron,email_template_id:0 +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/ir_cron.py:76 +#, python-format +msgid "Task failure with UID = %d." +msgstr "Tarefa falhou com UID = %d." + +#. module: scheduler_error_mailer +#: model:email.template,subject:scheduler_error_mailer.scheduler_error_mailer +msgid "[DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED" +msgstr "[DB ${ctx.get('dbname')}] Agendador '${object.name or ''}' FALHOU" diff --git a/scheduler_error_mailer/i18n/sl.po b/scheduler_error_mailer/i18n/sl.po new file mode 100644 index 00000000000..821a93011bc --- /dev/null +++ b/scheduler_error_mailer/i18n/sl.po @@ -0,0 +1,80 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * scheduler_error_mailer +# +# Translators: +# Matjaž Mozetič , 2015 +msgid "" +msgstr "" +"Project-Id-Version: server-tools (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-09-29 11:14+0000\n" +"PO-Revision-Date: 2015-09-26 07:36+0000\n" +"Last-Translator: Matjaž Mozetič \n" +"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-server-tools-8-0/language/sl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: sl\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:email.template,body_html:scheduler_error_mailer.scheduler_error_mailer +msgid "" +"\n" +"
\n" +"\n" +"

OpenERP 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 OpenERP 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 OpenERP. Do not reply.
\n" +"Database : ${ctx.get('dbname')}\n" +"

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

OpenERP je poskušal zagnati razporejevalec ${object.name or ''} v podatkovni bazi ${ctx.get('dbname')} , a ni uspel. Obvestilo o napaki:

\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

Preverite dnevnike OpenERP strežnika za pridobitev več informacij o težavi.

\n\n

Lastnosti razporejevalca ${object.name or ''} :

\n
    \n
  • Model : ${object.model or ''}
  • \n
  • Metoda : ${object.function or ''}
  • \n
  • Argumenti : ${object.args or ''}
  • \n
  • Interval : ${object.interval_number or '0'} ${object.interval_type or ''}
  • \n
  • Število klicev : ${object.numbercall or '0'}
  • \n
  • Zgrešene ponovitve : ${object.doall}
  • \n
  • Uporabnik : ${object.user_id.name or ''}
  • \n
\n\n

\n--
\nSamodejno sporočilo poslano iz OpenERP. Ne odgovarjajte.
\nPodatkovna baza : ${ctx.get('dbname')}\n

\n
\n " + +#. module: scheduler_error_mailer +#: code:addons/scheduler_error_mailer/ir_cron.py:75 +#, python-format +msgid "Error :" +msgstr "Napaka:" + +#. module: scheduler_error_mailer +#: field:ir.cron,email_template_id:0 +msgid "Error E-mail Template" +msgstr "Predloga obvestila o napaki" + +#. module: scheduler_error_mailer +#: help:ir.cron,email_template_id:0 +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/ir_cron.py:76 +#, python-format +msgid "Task failure with UID = %d." +msgstr "Napaka pri opravilu UID = %d." + +#. module: scheduler_error_mailer +#: model:email.template,subject:scheduler_error_mailer.scheduler_error_mailer +msgid "[DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED" +msgstr "[DB ${ctx.get('dbname')}] Razporejevalec '${object.name or ''}' NEUSPEŠEN" diff --git a/scheduler_error_mailer/ir_cron.py b/scheduler_error_mailer/ir_cron.py index 17b0f2c304e..548728bf4e7 100644 --- a/scheduler_error_mailer/ir_cron.py +++ b/scheduler_error_mailer/ir_cron.py @@ -35,9 +35,10 @@ class ir_cron(orm.Model): _inherit = "ir.cron" _columns = { - 'email_template': fields.many2one( + 'email_template_id': fields.many2one( 'email.template', 'Error E-mail Template', + oldname="email_template", help="Select the email template that will be " "sent when this scheduler fails."), } @@ -50,7 +51,7 @@ def _handle_callback_exception(self, cr, uid, model_name, method_name, my_cron = self.browse(cr, uid, job_id) - if my_cron.email_template: + if my_cron.email_template_id: # we put the job_exception in context to be able to print it inside # the email template context = { @@ -62,7 +63,7 @@ def _handle_callback_exception(self, cr, uid, model_name, method_name, context) self.pool['email.template'].send_mail( - cr, SUPERUSER_ID, my_cron.email_template.id, my_cron.id, + cr, SUPERUSER_ID, my_cron.email_template_id.id, my_cron.id, force_send=True, context=context) return res diff --git a/scheduler_error_mailer/ir_cron.xml b/scheduler_error_mailer/ir_cron.xml index ee1bcfd6d9b..74a3d3edff8 100644 --- a/scheduler_error_mailer/ir_cron.xml +++ b/scheduler_error_mailer/ir_cron.xml @@ -14,7 +14,7 @@ - + diff --git a/scheduler_error_mailer/ir_cron_demo.xml b/scheduler_error_mailer/ir_cron_demo.xml index 4c6fc5e7b5a..4c108040cab 100644 --- a/scheduler_error_mailer/ir_cron_demo.xml +++ b/scheduler_error_mailer/ir_cron_demo.xml @@ -17,9 +17,9 @@ hours -1 - ir.cron _test_scheduler_failure + From 0426b5bbe0ef7e8c54833180abfb8feb1088e573 Mon Sep 17 00:00:00 2001 From: "Atchuthan, Sodexis" Date: Wed, 18 May 2016 16:23:01 +0530 Subject: [PATCH 08/29] [MIG][9.0] scheduler_error_mailer OCA Transbot updated translations from Transifex --- scheduler_error_mailer/README.rst | 67 +++++++++++++++ scheduler_error_mailer/__init__.py | 26 +----- scheduler_error_mailer/__openerp__.py | 47 +++-------- .../{ => data}/ir_cron_email_tpl.xml | 38 +++++---- scheduler_error_mailer/demo/ir_cron_demo.xml | 27 +++++++ scheduler_error_mailer/i18n/en.po | 79 ------------------ scheduler_error_mailer/i18n/pt_BR.po | 40 ++++----- scheduler_error_mailer/i18n/sl.po | 42 +++++----- scheduler_error_mailer/i18n/zh_CN.po | 81 +++++++++++++++++++ scheduler_error_mailer/ir_cron.py | 76 ----------------- scheduler_error_mailer/ir_cron.xml | 24 ------ scheduler_error_mailer/ir_cron_demo.xml | 26 ------ scheduler_error_mailer/models/__init__.py | 6 ++ scheduler_error_mailer/models/ir_cron.py | 55 +++++++++++++ scheduler_error_mailer/views/ir_cron.xml | 22 +++++ 15 files changed, 336 insertions(+), 320 deletions(-) create mode 100644 scheduler_error_mailer/README.rst rename scheduler_error_mailer/{ => data}/ir_cron_email_tpl.xml (58%) create mode 100644 scheduler_error_mailer/demo/ir_cron_demo.xml delete mode 100644 scheduler_error_mailer/i18n/en.po create mode 100644 scheduler_error_mailer/i18n/zh_CN.po delete mode 100644 scheduler_error_mailer/ir_cron.py delete mode 100644 scheduler_error_mailer/ir_cron.xml delete mode 100644 scheduler_error_mailer/ir_cron_demo.xml create mode 100644 scheduler_error_mailer/models/__init__.py create mode 100644 scheduler_error_mailer/models/ir_cron.py create mode 100644 scheduler_error_mailer/views/ir_cron.xml diff --git a/scheduler_error_mailer/README.rst b/scheduler_error_mailer/README.rst new file mode 100644 index 00000000000..269dec34c7a --- /dev/null +++ b/scheduler_error_mailer/README.rst @@ -0,0 +1,67 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +====================== +Scheduler Error Mailer +====================== + +This module adds the possibility to send an e-mail when a scheduler raises +an error. + +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. + +Usage +===== + +To use this module, you need to: + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/149/9.0 + +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. + +Credits +======= + +Images +------ + +* Odoo Community Association: `Icon `_. + +Contributors +------------ + +* Sébastien BEAU +* David Beal +* Alexis de Lattre +* Sodexis + + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +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. + +To contribute to this module, please visit https://odoo-community.org. diff --git a/scheduler_error_mailer/__init__.py b/scheduler_error_mailer/__init__.py index 36504c54b95..cca6d945542 100644 --- a/scheduler_error_mailer/__init__.py +++ b/scheduler_error_mailer/__init__.py @@ -1,24 +1,6 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Scheduler Error Mailer module for OpenERP -# Copyright (C) 2012-2013 Akretion (http://www.akretion.com/) -# @author: Sébastien Beau -# @author Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## +# © 2012-2013 Akretion Sébastien BEAU,David Beal,Alexis de Lattre +# © 2016 Sodexis +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from . import ir_cron +from . import models diff --git a/scheduler_error_mailer/__openerp__.py b/scheduler_error_mailer/__openerp__.py index d8dd3eb3638..cee08d1c700 100644 --- a/scheduler_error_mailer/__openerp__.py +++ b/scheduler_error_mailer/__openerp__.py @@ -1,48 +1,21 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Scheduler Error Mailer module for OpenERP -# Copyright (C) 2012-2013 Akretion (http://www.akretion.com/) -# @author: Sébastien Beau -# @author David Beal -# @author Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - +# -*- coding: utf-8 -*- +# © 2012-2013 Akretion Sébastien BEAU,David Beal,Alexis de Lattre +# © 2016 Sodexis +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { 'name': 'Scheduler Error Mailer', - 'summary': 'Send an e-mail when a scheduler fails', - 'version': '8.0.1.0.0', + 'version': '9.0.1.0.0', 'category': 'Extra Tools', 'license': 'AGPL-3', - 'description': """ -Scheduler Error Mailer -====================== - -This module adds the possibility to send an e-mail when a scheduler raises -an error.""", - 'author': "Akretion,Odoo Community Association (OCA)", + 'author': "Akretion,Sodexis,Odoo Community Association (OCA)", 'website': 'http://www.akretion.com/', - 'depends': ['email_template'], + 'depends': ['mail'], 'data': [ - 'ir_cron.xml', - 'ir_cron_email_tpl.xml', + 'data/ir_cron_email_tpl.xml', + 'views/ir_cron.xml', ], - 'demo': ['ir_cron_demo.xml'], + 'demo': ['demo/ir_cron_demo.xml'], 'images': ['images/scheduler_error_mailer.jpg'], 'installable': True, } diff --git a/scheduler_error_mailer/ir_cron_email_tpl.xml b/scheduler_error_mailer/data/ir_cron_email_tpl.xml similarity index 58% rename from scheduler_error_mailer/ir_cron_email_tpl.xml rename to scheduler_error_mailer/data/ir_cron_email_tpl.xml index d0bd7859bbf..b8e6a259865 100644 --- a/scheduler_error_mailer/ir_cron_email_tpl.xml +++ b/scheduler_error_mailer/data/ir_cron_email_tpl.xml @@ -1,21 +1,24 @@ - - - - - - Scheduler Error - ${object.user_id.user_email or ''} - ${object.user_id.user_email or ''} - [DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED - - - + + + + + Scheduler Error + ${object.user_id.email or ''} + ${object.user_id.email or ''} + [DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED + + + +

OpenERP tried to run the scheduler ${object.name or ''} in the database ${ctx.get('dbname')} but it failed. Here is the error message :

@@ -43,8 +46,9 @@ Automatic e-mail sent by OpenERP. Do not reply.
Database : ${ctx.get('dbname')}

- ]]>
-
+ ]]> +
+
-
-
+ + 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..08368e8e72b --- /dev/null +++ b/scheduler_error_mailer/demo/ir_cron_demo.xml @@ -0,0 +1,27 @@ + + + + + + + + Test Scheduler Error Mailer + + + 1 + hours + -1 + + + ir.cron + _test_scheduler_failure + + + + + diff --git a/scheduler_error_mailer/i18n/en.po b/scheduler_error_mailer/i18n/en.po deleted file mode 100644 index 002a624c9f7..00000000000 --- a/scheduler_error_mailer/i18n/en.po +++ /dev/null @@ -1,79 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * scheduler_error_mailer -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: server-tools (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-09-29 11:14+0000\n" -"PO-Revision-Date: 2015-09-18 13:56+0000\n" -"Last-Translator: OCA Transbot \n" -"Language-Team: English (http://www.transifex.com/oca/OCA-server-tools-8-0/language/en/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: en\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: scheduler_error_mailer -#: model:email.template,body_html:scheduler_error_mailer.scheduler_error_mailer -msgid "" -"\n" -"
\n" -"\n" -"

OpenERP 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 OpenERP 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 OpenERP. Do not reply.
\n" -"Database : ${ctx.get('dbname')}\n" -"

\n" -"
\n" -" " -msgstr "\n
\n\n

OpenERP 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 OpenERP 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--
\nAutomatic e-mail sent by OpenERP. Do not reply.
\nDatabase : ${ctx.get('dbname')}\n

\n
\n " - -#. module: scheduler_error_mailer -#: code:addons/scheduler_error_mailer/ir_cron.py:75 -#, python-format -msgid "Error :" -msgstr "Error :" - -#. module: scheduler_error_mailer -#: field:ir.cron,email_template_id:0 -msgid "Error E-mail Template" -msgstr "Error E-mail Template" - -#. module: scheduler_error_mailer -#: help:ir.cron,email_template_id:0 -msgid "Select the email template that will be sent when this scheduler fails." -msgstr "Select the email template that will be sent when this scheduler fails." - -#. module: scheduler_error_mailer -#: code:addons/scheduler_error_mailer/ir_cron.py:76 -#, python-format -msgid "Task failure with UID = %d." -msgstr "Task failure with UID = %d." - -#. module: scheduler_error_mailer -#: model:email.template,subject:scheduler_error_mailer.scheduler_error_mailer -msgid "[DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED" -msgstr "[DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED" diff --git a/scheduler_error_mailer/i18n/pt_BR.po b/scheduler_error_mailer/i18n/pt_BR.po index 4ad2412b199..beacbdd1ce5 100644 --- a/scheduler_error_mailer/i18n/pt_BR.po +++ b/scheduler_error_mailer/i18n/pt_BR.po @@ -3,15 +3,15 @@ # * scheduler_error_mailer # # Translators: -# Armando Vulcano Junior , 2015 +# OCA Transbot , 2016 msgid "" msgstr "" -"Project-Id-Version: server-tools (8.0)\n" +"Project-Id-Version: Odoo Server 9.0c\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-09-29 11:14+0000\n" -"PO-Revision-Date: 2015-09-18 23:44+0000\n" -"Last-Translator: Armando Vulcano Junior \n" -"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-server-tools-8-0/language/pt_BR/)\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: Portuguese (Brazil) (https://www.transifex.com/oca/teams/23907/pt_BR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" @@ -19,9 +19,10 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: scheduler_error_mailer -#: model:email.template,body_html:scheduler_error_mailer.scheduler_error_mailer +#: model:mail.template,body_html:scheduler_error_mailer.scheduler_error_mailer msgid "" "\n" +" \n" "
\n" "\n" "

OpenERP tried to run the scheduler ${object.name or ''} in the database ${ctx.get('dbname')} but it failed. Here is the error message :

\n" @@ -49,32 +50,33 @@ msgid "" "Database : ${ctx.get('dbname')}\n" "

\n" "
\n" -" " +" \n" +" " msgstr "" #. module: scheduler_error_mailer -#: code:addons/scheduler_error_mailer/ir_cron.py:75 -#, python-format -msgid "Error :" -msgstr "Erro" - -#. module: scheduler_error_mailer -#: field:ir.cron,email_template_id:0 +#: 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 -#: help:ir.cron,email_template_id:0 +#: 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." +msgstr "" +"Selecione o modelo de email que será enviado quando o agendador falhar." #. module: scheduler_error_mailer -#: code:addons/scheduler_error_mailer/ir_cron.py:76 +#: code:addons/scheduler_error_mailer/models/ir_cron.py:55 #, python-format msgid "Task failure with UID = %d." msgstr "Tarefa falhou com UID = %d." #. module: scheduler_error_mailer -#: model:email.template,subject:scheduler_error_mailer.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')}] Agendador '${object.name or ''}' FALHOU" + +#. module: scheduler_error_mailer +#: model:ir.model,name:scheduler_error_mailer.model_ir_cron +msgid "ir.cron" +msgstr "" diff --git a/scheduler_error_mailer/i18n/sl.po b/scheduler_error_mailer/i18n/sl.po index 821a93011bc..13ac3181b8c 100644 --- a/scheduler_error_mailer/i18n/sl.po +++ b/scheduler_error_mailer/i18n/sl.po @@ -3,15 +3,15 @@ # * scheduler_error_mailer # # Translators: -# Matjaž Mozetič , 2015 +# OCA Transbot , 2016 msgid "" msgstr "" -"Project-Id-Version: server-tools (8.0)\n" +"Project-Id-Version: Odoo Server 9.0c\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-09-29 11:14+0000\n" -"PO-Revision-Date: 2015-09-26 07:36+0000\n" -"Last-Translator: Matjaž Mozetič \n" -"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-server-tools-8-0/language/sl/)\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" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" @@ -19,9 +19,10 @@ msgstr "" "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:email.template,body_html:scheduler_error_mailer.scheduler_error_mailer +#: model:mail.template,body_html:scheduler_error_mailer.scheduler_error_mailer msgid "" "\n" +" \n" "
\n" "\n" "

OpenERP tried to run the scheduler ${object.name or ''} in the database ${ctx.get('dbname')} but it failed. Here is the error message :

\n" @@ -49,32 +50,33 @@ msgid "" "Database : ${ctx.get('dbname')}\n" "

\n" "
\n" -" " -msgstr "\n
\n\n

OpenERP je poskušal zagnati razporejevalec ${object.name or ''} v podatkovni bazi ${ctx.get('dbname')} , a ni uspel. Obvestilo o napaki:

\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

Preverite dnevnike OpenERP strežnika za pridobitev več informacij o težavi.

\n\n

Lastnosti razporejevalca ${object.name or ''} :

\n
    \n
  • Model : ${object.model or ''}
  • \n
  • Metoda : ${object.function or ''}
  • \n
  • Argumenti : ${object.args or ''}
  • \n
  • Interval : ${object.interval_number or '0'} ${object.interval_type or ''}
  • \n
  • Število klicev : ${object.numbercall or '0'}
  • \n
  • Zgrešene ponovitve : ${object.doall}
  • \n
  • Uporabnik : ${object.user_id.name or ''}
  • \n
\n\n

\n--
\nSamodejno sporočilo poslano iz OpenERP. Ne odgovarjajte.
\nPodatkovna baza : ${ctx.get('dbname')}\n

\n
\n " - -#. module: scheduler_error_mailer -#: code:addons/scheduler_error_mailer/ir_cron.py:75 -#, python-format -msgid "Error :" -msgstr "Napaka:" +" \n" +" " +msgstr "" #. module: scheduler_error_mailer -#: field:ir.cron,email_template_id:0 +#: 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 -#: help:ir.cron,email_template_id:0 +#: 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/ir_cron.py:76 +#: code:addons/scheduler_error_mailer/models/ir_cron.py:55 #, python-format msgid "Task failure with UID = %d." msgstr "Napaka pri opravilu UID = %d." #. module: scheduler_error_mailer -#: model:email.template,subject:scheduler_error_mailer.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')}] Razporejevalec '${object.name or ''}' NEUSPEŠEN" +msgstr "" +"[DB ${ctx.get('dbname')}] Razporejevalec '${object.name or ''}' NEUSPEŠEN" + +#. module: scheduler_error_mailer +#: model:ir.model,name:scheduler_error_mailer.model_ir_cron +msgid "ir.cron" +msgstr "" diff --git a/scheduler_error_mailer/i18n/zh_CN.po b/scheduler_error_mailer/i18n/zh_CN.po new file mode 100644 index 00000000000..f312e6e0c73 --- /dev/null +++ b/scheduler_error_mailer/i18n/zh_CN.po @@ -0,0 +1,81 @@ +# 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: 2016-08-31 11:58+0000\n" +"Last-Translator: Jeffery Chenn , 2016\n" +"Language-Team: Chinese (China) (https://www.transifex.com/oca/teams/23907/zh_CN/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: zh_CN\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: scheduler_error_mailer +#: model:mail.template,body_html:scheduler_error_mailer.scheduler_error_mailer +msgid "" +"\n" +" \n" +"
\n" +"\n" +"

OpenERP 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 OpenERP 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 OpenERP. Do not reply.
\n" +"Database : ${ctx.get('dbname')}\n" +"

\n" +"
\n" +" \n" +" " +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_email_template_id +msgid "Error E-mail Template" +msgstr "错误E-mail 模板" + +#. 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:55 +#, python-format +msgid "Task failure with UID = %d." +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 "" + +#. module: scheduler_error_mailer +#: model:ir.model,name:scheduler_error_mailer.model_ir_cron +msgid "ir.cron" +msgstr "" diff --git a/scheduler_error_mailer/ir_cron.py b/scheduler_error_mailer/ir_cron.py deleted file mode 100644 index 548728bf4e7..00000000000 --- a/scheduler_error_mailer/ir_cron.py +++ /dev/null @@ -1,76 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Scheduler Error Mailer module for OpenERP -# Copyright (C) 2012-2013 Akretion (http://www.akretion.com/) -# @author: Sébastien Beau -# @author David Beal -# @author Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp import SUPERUSER_ID -from openerp.osv import orm, fields -from openerp.tools.translate import _ -import logging - - -_logger = logging.getLogger(__name__) - - -class ir_cron(orm.Model): - _inherit = "ir.cron" - - _columns = { - 'email_template_id': fields.many2one( - 'email.template', - 'Error E-mail Template', - oldname="email_template", - help="Select the email template that will be " - "sent when this scheduler fails."), - } - - def _handle_callback_exception(self, cr, uid, model_name, method_name, - args, job_id, job_exception): - - res = super(ir_cron, self)._handle_callback_exception( - cr, uid, model_name, method_name, args, job_id, job_exception) - - my_cron = self.browse(cr, uid, 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': job_exception, - 'dbname': cr.dbname, - } - - _logger.debug("Sending scheduler error email with context=%s", - context) - - self.pool['email.template'].send_mail( - cr, SUPERUSER_ID, my_cron.email_template_id.id, my_cron.id, - force_send=True, context=context) - - return res - - def _test_scheduler_failure(self, cr, uid, context=None): - """This function is used to test and debug this module""" - - raise orm.except_orm( - _('Error :'), - _("Task failure with UID = %d.") % uid) diff --git a/scheduler_error_mailer/ir_cron.xml b/scheduler_error_mailer/ir_cron.xml deleted file mode 100644 index 74a3d3edff8..00000000000 --- a/scheduler_error_mailer/ir_cron.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - ir.cron.error.mailer.form - ir.cron - - - - - - - - - - - diff --git a/scheduler_error_mailer/ir_cron_demo.xml b/scheduler_error_mailer/ir_cron_demo.xml deleted file mode 100644 index 4c108040cab..00000000000 --- a/scheduler_error_mailer/ir_cron_demo.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - Test Scheduler Error Mailer - - - 1 - hours - -1 - - ir.cron - _test_scheduler_failure - - - - - diff --git a/scheduler_error_mailer/models/__init__.py b/scheduler_error_mailer/models/__init__.py new file mode 100644 index 00000000000..91c8e5e18af --- /dev/null +++ b/scheduler_error_mailer/models/__init__.py @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# © 2012-2013 Akretion Sébastien BEAU,David Beal,Alexis de Lattre +# © 2016 Sodexis +# 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..a6134be158c --- /dev/null +++ b/scheduler_error_mailer/models/ir_cron.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# © 2012-2013 Akretion Sébastien BEAU,David Beal,Alexis de Lattre +# © 2016 Sodexis +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from openerp import models, fields, api, _ +from openerp.exceptions import UserError +import logging + + +_logger = logging.getLogger(__name__) + + +class IrCron(models.Model): + _inherit = "ir.cron" + + email_template_id = fields.Many2one( + comodel_name="mail.template", + string="Error E-mail Template", + help="Select the email template that will be sent when " + "this scheduler fails." + ) + + @api.model + def _handle_callback_exception( + self, model_name, method_name, args, job_id, job_exception): + res = super(IrCron, self)._handle_callback_exception( + model_name, method_name, args, 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': job_exception, + 'dbname': self._cr.dbname, + } + + _logger.debug( + "Sending scheduler error email with context=%s", context) + + self.env['mail.template'].browse( + my_cron.email_template_id.id + ).with_context(context).sudo().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/views/ir_cron.xml b/scheduler_error_mailer/views/ir_cron.xml new file mode 100644 index 00000000000..3ade1e1b84b --- /dev/null +++ b/scheduler_error_mailer/views/ir_cron.xml @@ -0,0 +1,22 @@ + + + + + + + ir.cron.error.mailer.form + ir.cron + + + + + + + + + From d9514ec9fcf168ae333d53c31a6af11cd72070fe Mon Sep 17 00:00:00 2001 From: MonsieurB Date: Fri, 3 Feb 2017 15:20:33 +0100 Subject: [PATCH 09/29] migrate to V10 OCA Transbot updated translations from Transifex --- scheduler_error_mailer/README.rst | 2 +- .../{__openerp__.py => __manifest__.py} | 2 +- .../data/ir_cron_email_tpl.xml | 12 +-- scheduler_error_mailer/i18n/de.po | 83 ++++++++++++++++++ scheduler_error_mailer/i18n/es.po | 84 +++++++++++++++++++ scheduler_error_mailer/i18n/pt_BR.po | 6 +- .../i18n/scheduler_error_mailer.pot | 6 +- scheduler_error_mailer/i18n/sl.po | 6 +- scheduler_error_mailer/i18n/zh_CN.po | 6 +- scheduler_error_mailer/models/ir_cron.py | 4 +- 10 files changed, 186 insertions(+), 25 deletions(-) rename scheduler_error_mailer/{__openerp__.py => __manifest__.py} (95%) create mode 100644 scheduler_error_mailer/i18n/de.po create mode 100644 scheduler_error_mailer/i18n/es.po diff --git a/scheduler_error_mailer/README.rst b/scheduler_error_mailer/README.rst index 269dec34c7a..9ba801de4b6 100644 --- a/scheduler_error_mailer/README.rst +++ b/scheduler_error_mailer/README.rst @@ -24,7 +24,7 @@ To use this module, you need to: .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/149/9.0 + :target: https://runbot.odoo-community.org/runbot/149/10.0 Bug Tracker =========== diff --git a/scheduler_error_mailer/__openerp__.py b/scheduler_error_mailer/__manifest__.py similarity index 95% rename from scheduler_error_mailer/__openerp__.py rename to scheduler_error_mailer/__manifest__.py index cee08d1c700..0da065b2bb3 100644 --- a/scheduler_error_mailer/__openerp__.py +++ b/scheduler_error_mailer/__manifest__.py @@ -5,7 +5,7 @@ { 'name': 'Scheduler Error Mailer', - 'version': '9.0.1.0.0', + 'version': '10.0.1.0.0', 'category': 'Extra Tools', 'license': 'AGPL-3', 'author': "Akretion,Sodexis,Odoo Community Association (OCA)", diff --git a/scheduler_error_mailer/data/ir_cron_email_tpl.xml b/scheduler_error_mailer/data/ir_cron_email_tpl.xml index b8e6a259865..4e760765ad1 100644 --- a/scheduler_error_mailer/data/ir_cron_email_tpl.xml +++ b/scheduler_error_mailer/data/ir_cron_email_tpl.xml @@ -1,10 +1,4 @@ - @@ -21,13 +15,13 @@ -

OpenERP tried to run the scheduler ${object.name or ''} in the database ${ctx.get('dbname')} but it failed. Here is the error message :

+

Odoo tried to run the scheduler ${object.name or ''} in the database ${ctx.get('dbname')} but it failed. Here is the error message :

${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to get the error message from the context.'} -

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

+

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

Properties of the scheduler ${object.name or ''} :

    @@ -42,7 +36,7 @@ ${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to get

    --
    -Automatic e-mail sent by OpenERP. Do not reply.
    +Automatic e-mail sent by Odoo. Do not reply.
    Database : ${ctx.get('dbname')}

    diff --git a/scheduler_error_mailer/i18n/de.po b/scheduler_error_mailer/i18n/de.po new file mode 100644 index 00000000000..04a086156a6 --- /dev/null +++ b/scheduler_error_mailer/i18n/de.po @@ -0,0 +1,83 @@ +# 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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: de\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 ${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 "" + +#. 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.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:55 +#, python-format +msgid "Task failure with UID = %d." +msgstr "Task Fehler von UID = %d." + +#. 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')}] Scheduler '${object.name or ''}' FEHLER" + +#. module: scheduler_error_mailer +#: model:ir.model,name:scheduler_error_mailer.model_ir_cron +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..bc390a1bebf --- /dev/null +++ b/scheduler_error_mailer/i18n/es.po @@ -0,0 +1,84 @@ +# 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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es\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 ${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 "" + +#. 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.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:55 +#, python-format +msgid "Task failure with UID = %d." +msgstr "Error de Tarea con UID = %d." + +#. 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 "" + +#. module: scheduler_error_mailer +#: model:ir.model,name:scheduler_error_mailer.model_ir_cron +msgid "ir.cron" +msgstr "ir.cron" diff --git a/scheduler_error_mailer/i18n/pt_BR.po b/scheduler_error_mailer/i18n/pt_BR.po index beacbdd1ce5..231579b1ee6 100644 --- a/scheduler_error_mailer/i18n/pt_BR.po +++ b/scheduler_error_mailer/i18n/pt_BR.po @@ -25,13 +25,13 @@ msgid "" " \n" "
    \n" "\n" -"

    OpenERP tried to run the scheduler ${object.name or ''} in the database ${ctx.get('dbname')} but it failed. Here is the error message :

    \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 OpenERP server to get more information about this failure.

    \n" +"

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

    \n" "\n" "

    Properties of the scheduler ${object.name or ''} :

    \n" "
      \n" @@ -46,7 +46,7 @@ msgid "" "\n" "

      \n" "--
      \n" -"Automatic e-mail sent by OpenERP. Do not reply.
      \n" +"Automatic e-mail sent by Odoo. Do not reply.
      \n" "Database : ${ctx.get('dbname')}\n" "

      \n" "
    \n" diff --git a/scheduler_error_mailer/i18n/scheduler_error_mailer.pot b/scheduler_error_mailer/i18n/scheduler_error_mailer.pot index 95fe5ca847c..0b55c781ecd 100644 --- a/scheduler_error_mailer/i18n/scheduler_error_mailer.pot +++ b/scheduler_error_mailer/i18n/scheduler_error_mailer.pot @@ -20,13 +20,13 @@ msgstr "" msgid "\n" "
    \n" "\n" -"

    OpenERP tried to run the scheduler ${object.name or ''} in the database ${ctx.get('dbname')} but it failed. Here is the error message :

    \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 OpenERP server to get more information about this failure.

    \n" +"

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

    \n" "\n" "

    Properties of the scheduler ${object.name or ''} :

    \n" "
      \n" @@ -41,7 +41,7 @@ msgid "\n" "\n" "

      \n" "--
      \n" -"Automatic e-mail sent by OpenERP. Do not reply.
      \n" +"Automatic e-mail sent by Odoo. Do not reply.
      \n" "Database : ${ctx.get('dbname')}\n" "

      \n" "
    \n" diff --git a/scheduler_error_mailer/i18n/sl.po b/scheduler_error_mailer/i18n/sl.po index 13ac3181b8c..3f6d1f5a015 100644 --- a/scheduler_error_mailer/i18n/sl.po +++ b/scheduler_error_mailer/i18n/sl.po @@ -25,13 +25,13 @@ msgid "" " \n" "
    \n" "\n" -"

    OpenERP tried to run the scheduler ${object.name or ''} in the database ${ctx.get('dbname')} but it failed. Here is the error message :

    \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 OpenERP server to get more information about this failure.

    \n" +"

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

    \n" "\n" "

    Properties of the scheduler ${object.name or ''} :

    \n" "
      \n" @@ -46,7 +46,7 @@ msgid "" "\n" "

      \n" "--
      \n" -"Automatic e-mail sent by OpenERP. Do not reply.
      \n" +"Automatic e-mail sent by Odoo. Do not reply.
      \n" "Database : ${ctx.get('dbname')}\n" "

      \n" "
    \n" diff --git a/scheduler_error_mailer/i18n/zh_CN.po b/scheduler_error_mailer/i18n/zh_CN.po index f312e6e0c73..39488e9914a 100644 --- a/scheduler_error_mailer/i18n/zh_CN.po +++ b/scheduler_error_mailer/i18n/zh_CN.po @@ -25,13 +25,13 @@ msgid "" " \n" "
    \n" "\n" -"

    OpenERP tried to run the scheduler ${object.name or ''} in the database ${ctx.get('dbname')} but it failed. Here is the error message :

    \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 OpenERP server to get more information about this failure.

    \n" +"

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

    \n" "\n" "

    Properties of the scheduler ${object.name or ''} :

    \n" "
      \n" @@ -46,7 +46,7 @@ msgid "" "\n" "

      \n" "--
      \n" -"Automatic e-mail sent by OpenERP. Do not reply.
      \n" +"Automatic e-mail sent by Odoo. Do not reply.
      \n" "Database : ${ctx.get('dbname')}\n" "

      \n" "
    \n" diff --git a/scheduler_error_mailer/models/ir_cron.py b/scheduler_error_mailer/models/ir_cron.py index a6134be158c..efb2a4bed60 100644 --- a/scheduler_error_mailer/models/ir_cron.py +++ b/scheduler_error_mailer/models/ir_cron.py @@ -3,8 +3,8 @@ # © 2016 Sodexis # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from openerp import models, fields, api, _ -from openerp.exceptions import UserError +from odoo import models, fields, api, _ +from odoo.exceptions import UserError import logging From ba5400bb0709207c6bd5020649308150c3536565 Mon Sep 17 00:00:00 2001 From: Andy Teijelo Date: Tue, 21 Mar 2017 17:17:08 -0400 Subject: [PATCH 10/29] [FIX] scheduler error mailer font typo (#765) * [FIX] scheduler_error_mailer font typo * [REM] Deleting scheduler_error_mailer.pot OCA Transbot updated translations from Transifex --- .../data/ir_cron_email_tpl.xml | 2 +- scheduler_error_mailer/i18n/de.po | 2 +- scheduler_error_mailer/i18n/es.po | 2 +- .../{scheduler_error_mailer.pot => hr.po} | 49 ++++++++++--------- scheduler_error_mailer/i18n/pt_BR.po | 2 +- scheduler_error_mailer/i18n/sl.po | 2 +- scheduler_error_mailer/i18n/zh_CN.po | 2 +- 7 files changed, 33 insertions(+), 28 deletions(-) rename scheduler_error_mailer/i18n/{scheduler_error_mailer.pot => hr.po} (63%) diff --git a/scheduler_error_mailer/data/ir_cron_email_tpl.xml b/scheduler_error_mailer/data/ir_cron_email_tpl.xml index 4e760765ad1..a6696e59fa8 100644 --- a/scheduler_error_mailer/data/ir_cron_email_tpl.xml +++ b/scheduler_error_mailer/data/ir_cron_email_tpl.xml @@ -13,7 +13,7 @@ +

    Odoo tried to run the scheduler ${object.name or ''} in the database ${ctx.get('dbname')} but it failed. Here is the error message :

    diff --git a/scheduler_error_mailer/i18n/de.po b/scheduler_error_mailer/i18n/de.po index 04a086156a6..0d3289f6582 100644 --- a/scheduler_error_mailer/i18n/de.po +++ b/scheduler_error_mailer/i18n/de.po @@ -23,7 +23,7 @@ msgstr "" msgid "" "\n" " \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" diff --git a/scheduler_error_mailer/i18n/es.po b/scheduler_error_mailer/i18n/es.po index bc390a1bebf..886bd77ea91 100644 --- a/scheduler_error_mailer/i18n/es.po +++ b/scheduler_error_mailer/i18n/es.po @@ -24,7 +24,7 @@ msgstr "" msgid "" "\n" " \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" diff --git a/scheduler_error_mailer/i18n/scheduler_error_mailer.pot b/scheduler_error_mailer/i18n/hr.po similarity index 63% rename from scheduler_error_mailer/i18n/scheduler_error_mailer.pot rename to scheduler_error_mailer/i18n/hr.po index 0b55c781ecd..ad49ae240f3 100644 --- a/scheduler_error_mailer/i18n/scheduler_error_mailer.pot +++ b/scheduler_error_mailer/i18n/hr.po @@ -1,24 +1,29 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * scheduler_error_mailer -# +# * scheduler_error_mailer +# +# Translators: +# Bole , 2018 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0rc1\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-09-18 11:55+0000\n" -"PO-Revision-Date: 2014-09-18 11:55+0000\n" -"Last-Translator: <>\n" -"Language-Team: \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" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: \n" +"Language: hr\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:email.template,body_html:scheduler_error_mailer.scheduler_error_mailer -msgid "\n" -"
    \n" +#: model:mail.template,body_html:scheduler_error_mailer.scheduler_error_mailer +msgid "" +"\n" +" \n" +"
    \n" "\n" "

    Odoo tried to run the scheduler ${object.name or ''} in the database ${ctx.get('dbname')} but it failed. Here is the error message :

    \n" "\n" @@ -45,32 +50,32 @@ msgid "\n" "Database : ${ctx.get('dbname')}\n" "

    \n" "
    \n" -" " -msgstr "" - -#. module: scheduler_error_mailer -#: code:addons/scheduler_error_mailer/ir_cron.py:74 -#, python-format -msgid "Error :" +" \n" +" " msgstr "" #. module: scheduler_error_mailer -#: field:ir.cron,email_template:0 +#: 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 -#: help:ir.cron,email_template:0 +#: 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/ir_cron.py:75 +#: code:addons/scheduler_error_mailer/models/ir_cron.py:55 #, python-format msgid "Task failure with UID = %d." msgstr "" #. module: scheduler_error_mailer -#: model:email.template,subject:scheduler_error_mailer.scheduler_error_mailer +#: model:mail.template,subject:scheduler_error_mailer.scheduler_error_mailer msgid "[DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED" msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model,name:scheduler_error_mailer.model_ir_cron +msgid "ir.cron" +msgstr "ir.cron" diff --git a/scheduler_error_mailer/i18n/pt_BR.po b/scheduler_error_mailer/i18n/pt_BR.po index 231579b1ee6..299bdd68599 100644 --- a/scheduler_error_mailer/i18n/pt_BR.po +++ b/scheduler_error_mailer/i18n/pt_BR.po @@ -23,7 +23,7 @@ msgstr "" msgid "" "\n" " \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" diff --git a/scheduler_error_mailer/i18n/sl.po b/scheduler_error_mailer/i18n/sl.po index 3f6d1f5a015..cfe31748455 100644 --- a/scheduler_error_mailer/i18n/sl.po +++ b/scheduler_error_mailer/i18n/sl.po @@ -23,7 +23,7 @@ msgstr "" msgid "" "\n" " \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" diff --git a/scheduler_error_mailer/i18n/zh_CN.po b/scheduler_error_mailer/i18n/zh_CN.po index 39488e9914a..0d3711e24a4 100644 --- a/scheduler_error_mailer/i18n/zh_CN.po +++ b/scheduler_error_mailer/i18n/zh_CN.po @@ -23,7 +23,7 @@ msgstr "" msgid "" "\n" " \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" From 0eaf0a7fd86b72d0b1ccf679736570c87d66eb0f Mon Sep 17 00:00:00 2001 From: Achref Mhadhbi Date: Thu, 21 Jun 2018 12:15:53 +0200 Subject: [PATCH 11/29] [MIG] scheduler_error_mailer: Migration to 11.0 [UPD] Update scheduler_error_mailer.pot --- scheduler_error_mailer/README.rst | 3 +- scheduler_error_mailer/__init__.py | 1 - scheduler_error_mailer/__manifest__.py | 4 +- scheduler_error_mailer/demo/ir_cron_demo.xml | 6 +- scheduler_error_mailer/i18n/de.po | 59 ++++++++-- scheduler_error_mailer/i18n/es.po | 59 ++++++++-- scheduler_error_mailer/i18n/hr.po | 61 +++++++++-- scheduler_error_mailer/i18n/pt_BR.po | 61 ++++++++--- .../i18n/scheduler_error_mailer.pot | 103 ++++++++++++++++++ scheduler_error_mailer/i18n/sl.po | 61 ++++++++--- scheduler_error_mailer/i18n/zh_CN.po | 59 ++++++++-- scheduler_error_mailer/models/__init__.py | 2 +- scheduler_error_mailer/models/ir_cron.py | 18 +-- scheduler_error_mailer/views/ir_cron.xml | 3 +- 14 files changed, 411 insertions(+), 89 deletions(-) create mode 100644 scheduler_error_mailer/i18n/scheduler_error_mailer.pot diff --git a/scheduler_error_mailer/README.rst b/scheduler_error_mailer/README.rst index 9ba801de4b6..db7417404c2 100644 --- a/scheduler_error_mailer/README.rst +++ b/scheduler_error_mailer/README.rst @@ -24,7 +24,7 @@ To use this module, you need to: .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/149/10.0 + :target: https://runbot.odoo-community.org/runbot/149/11.0 Bug Tracker =========== @@ -49,6 +49,7 @@ Contributors * David Beal * Alexis de Lattre * Sodexis +* Achraf Mhadhbi Maintainer diff --git a/scheduler_error_mailer/__init__.py b/scheduler_error_mailer/__init__.py index cca6d945542..f55583a17db 100644 --- a/scheduler_error_mailer/__init__.py +++ b/scheduler_error_mailer/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2012-2013 Akretion Sébastien BEAU,David Beal,Alexis de Lattre # © 2016 Sodexis # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). diff --git a/scheduler_error_mailer/__manifest__.py b/scheduler_error_mailer/__manifest__.py index 0da065b2bb3..2954d0a8ecb 100644 --- a/scheduler_error_mailer/__manifest__.py +++ b/scheduler_error_mailer/__manifest__.py @@ -1,11 +1,11 @@ -# -*- coding: utf-8 -*- # © 2012-2013 Akretion Sébastien BEAU,David Beal,Alexis de Lattre # © 2016 Sodexis +# © 2018 bloopark systems () # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { 'name': 'Scheduler Error Mailer', - 'version': '10.0.1.0.0', + 'version': '11.0.1.0.0', 'category': 'Extra Tools', 'license': 'AGPL-3', 'author': "Akretion,Sodexis,Odoo Community Association (OCA)", diff --git a/scheduler_error_mailer/demo/ir_cron_demo.xml b/scheduler_error_mailer/demo/ir_cron_demo.xml index 08368e8e72b..80e3c88cb79 100644 --- a/scheduler_error_mailer/demo/ir_cron_demo.xml +++ b/scheduler_error_mailer/demo/ir_cron_demo.xml @@ -3,6 +3,7 @@ scheduler_error_mailer for Odoo Copyright (C) 2012-2013 Akretion Sébastien BEAU,David Beal,Alexis de Lattre Copyright (C) 2016 Sodexis + Copyright (C) 2018 bloopark systems () The licence is in the file __openerp__.py --> @@ -18,8 +19,9 @@ -1 - ir.cron - _test_scheduler_failure + + code + model._test_scheduler_failure() diff --git a/scheduler_error_mailer/i18n/de.po b/scheduler_error_mailer/i18n/de.po index 0d3289f6582..cc41130135d 100644 --- a/scheduler_error_mailer/i18n/de.po +++ b/scheduler_error_mailer/i18n/de.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * scheduler_error_mailer -# +# # Translators: # Niki Waibel , 2017 msgid "" @@ -12,10 +12,10 @@ msgstr "" "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" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: scheduler_error_mailer @@ -23,22 +23,28 @@ msgstr "" msgid "" "\n" " \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" +"

    Odoo tried to run the scheduler ${object.name or ''} in the " +"database ${ctx.get('dbname')} but it failed. Here is the error " +"message :

    \n" "\n" "\n" -"${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to get the error message from the context.'}\n" +"${ctx.get('job_exception') 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" +"

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

    \n" "\n" "

    Properties of the scheduler ${object.name or ''} :

    \n" "
      \n" "
    • Model : ${object.model or ''}
    • \n" "
    • Method : ${object.function or ''}
    • \n" "
    • Arguments : ${object.args or ''}
    • \n" -"
    • Interval : ${object.interval_number or '0'} ${object.interval_type or ''}
    • \n" +"
    • Interval : ${object.interval_number or '0'} ${object.interval_type or ''}" +"
    • \n" "
    • Number of calls : ${object.numbercall or '0'}
    • \n" "
    • Repeat missed : ${object.doall}
    • \n" "
    • User : ${object.user_id.name or ''}
    • \n" @@ -54,13 +60,39 @@ msgid "" " " msgstr "" +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_channel_ids +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_channel_ids +msgid "Add Channels" +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_partner_ids +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_partner_ids +msgid "Add Followers" +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_template_id +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_template_id +#, fuzzy +msgid "Email Template" +msgstr "Fehler e-Mail Vorlage" + #. module: scheduler_error_mailer #: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_email_template_id +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_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:ir.model.fields,help:scheduler_error_mailer.field_ir_cron_email_template_id +#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check_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 " @@ -72,12 +104,17 @@ msgstr "" 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 "[DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FEHLER" -#. module: scheduler_error_mailer -#: model:ir.model,name:scheduler_error_mailer.model_ir_cron -msgid "ir.cron" -msgstr "ir.cron" +#~ msgid "ir.cron" +#~ msgstr "ir.cron" diff --git a/scheduler_error_mailer/i18n/es.po b/scheduler_error_mailer/i18n/es.po index 886bd77ea91..d283d8f4d35 100644 --- a/scheduler_error_mailer/i18n/es.po +++ b/scheduler_error_mailer/i18n/es.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * scheduler_error_mailer -# +# # Translators: # OCA Transbot , 2017 # Fernando Lara , 2017 @@ -13,10 +13,10 @@ msgstr "" "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" -"Language: es\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: scheduler_error_mailer @@ -24,22 +24,28 @@ msgstr "" msgid "" "\n" " \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" +"

      Odoo tried to run the scheduler ${object.name or ''} in the " +"database ${ctx.get('dbname')} but it failed. Here is the error " +"message :

      \n" "\n" "\n" -"${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to get the error message from the context.'}\n" +"${ctx.get('job_exception') 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" +"

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

      \n" "\n" "

      Properties of the scheduler ${object.name or ''} :

      \n" "
        \n" "
      • Model : ${object.model or ''}
      • \n" "
      • Method : ${object.function or ''}
      • \n" "
      • Arguments : ${object.args or ''}
      • \n" -"
      • Interval : ${object.interval_number or '0'} ${object.interval_type or ''}
      • \n" +"
      • Interval : ${object.interval_number or '0'} ${object.interval_type or ''}" +"
      • \n" "
      • Number of calls : ${object.numbercall or '0'}
      • \n" "
      • Repeat missed : ${object.doall}
      • \n" "
      • User : ${object.user_id.name or ''}
      • \n" @@ -55,13 +61,39 @@ msgid "" " " msgstr "" +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_channel_ids +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_channel_ids +msgid "Add Channels" +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_partner_ids +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_partner_ids +msgid "Add Followers" +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_template_id +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_template_id +#, fuzzy +msgid "Email Template" +msgstr "Plantilla de correo electrónico de error" + #. module: scheduler_error_mailer #: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_email_template_id +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_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:ir.model.fields,help:scheduler_error_mailer.field_ir_cron_email_template_id +#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check_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 " @@ -73,12 +105,17 @@ msgstr "" 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 "" -#. module: scheduler_error_mailer -#: model:ir.model,name:scheduler_error_mailer.model_ir_cron -msgid "ir.cron" -msgstr "ir.cron" +#~ msgid "ir.cron" +#~ msgstr "ir.cron" diff --git a/scheduler_error_mailer/i18n/hr.po b/scheduler_error_mailer/i18n/hr.po index ad49ae240f3..3641fe18d43 100644 --- a/scheduler_error_mailer/i18n/hr.po +++ b/scheduler_error_mailer/i18n/hr.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * scheduler_error_mailer -# +# # Translators: # Bole , 2018 msgid "" @@ -12,33 +12,40 @@ msgstr "" "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" -"Language: hr\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" +"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" "\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" +"

        Odoo tried to run the scheduler ${object.name or ''} in the " +"database ${ctx.get('dbname')} but it failed. Here is the error " +"message :

        \n" "\n" "\n" -"${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to get the error message from the context.'}\n" +"${ctx.get('job_exception') 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" +"

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

        \n" "\n" "

        Properties of the scheduler ${object.name or ''} :

        \n" "
          \n" "
        • Model : ${object.model or ''}
        • \n" "
        • Method : ${object.function or ''}
        • \n" "
        • Arguments : ${object.args or ''}
        • \n" -"
        • Interval : ${object.interval_number or '0'} ${object.interval_type or ''}
        • \n" +"
        • Interval : ${object.interval_number or '0'} ${object.interval_type or ''}" +"
        • \n" "
        • Number of calls : ${object.numbercall or '0'}
        • \n" "
        • Repeat missed : ${object.doall}
        • \n" "
        • User : ${object.user_id.name or ''}
        • \n" @@ -54,13 +61,38 @@ msgid "" " " msgstr "" +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_channel_ids +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_channel_ids +msgid "Add Channels" +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_partner_ids +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_partner_ids +msgid "Add Followers" +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_template_id +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_template_id +msgid "Email Template" +msgstr "" + #. module: scheduler_error_mailer #: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_email_template_id +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_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:ir.model.fields,help:scheduler_error_mailer.field_ir_cron_email_template_id +#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check_email_template_id msgid "Select the email template that will be sent when this scheduler fails." msgstr "" @@ -70,12 +102,17 @@ msgstr "" 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 "" -#. module: scheduler_error_mailer -#: model:ir.model,name:scheduler_error_mailer.model_ir_cron -msgid "ir.cron" -msgstr "ir.cron" +#~ msgid "ir.cron" +#~ msgstr "ir.cron" diff --git a/scheduler_error_mailer/i18n/pt_BR.po b/scheduler_error_mailer/i18n/pt_BR.po index 299bdd68599..6f91016b9f0 100644 --- a/scheduler_error_mailer/i18n/pt_BR.po +++ b/scheduler_error_mailer/i18n/pt_BR.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * scheduler_error_mailer -# +# # Translators: # OCA Transbot , 2016 msgid "" @@ -11,11 +11,12 @@ msgstr "" "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: Portuguese (Brazil) (https://www.transifex.com/oca/teams/23907/pt_BR/)\n" +"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/" +"teams/23907/pt_BR/)\n" +"Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: pt_BR\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: scheduler_error_mailer @@ -23,22 +24,28 @@ msgstr "" msgid "" "\n" " \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" +"

          Odoo tried to run the scheduler ${object.name or ''} in the " +"database ${ctx.get('dbname')} but it failed. Here is the error " +"message :

          \n" "\n" "\n" -"${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to get the error message from the context.'}\n" +"${ctx.get('job_exception') 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" +"

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

          \n" "\n" "

          Properties of the scheduler ${object.name or ''} :

          \n" "
            \n" "
          • Model : ${object.model or ''}
          • \n" "
          • Method : ${object.function or ''}
          • \n" "
          • Arguments : ${object.args or ''}
          • \n" -"
          • Interval : ${object.interval_number or '0'} ${object.interval_type or ''}
          • \n" +"
          • Interval : ${object.interval_number or '0'} ${object.interval_type or ''}" +"
          • \n" "
          • Number of calls : ${object.numbercall or '0'}
          • \n" "
          • Repeat missed : ${object.doall}
          • \n" "
          • User : ${object.user_id.name or ''}
          • \n" @@ -54,13 +61,39 @@ msgid "" " " msgstr "" +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_channel_ids +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_channel_ids +msgid "Add Channels" +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_partner_ids +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_partner_ids +msgid "Add Followers" +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_template_id +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_template_id +#, fuzzy +msgid "Email Template" +msgstr "Modelo de Erro de E-mail" + #. module: scheduler_error_mailer #: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_email_template_id +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_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 "" + #. module: scheduler_error_mailer #: model:ir.model.fields,help:scheduler_error_mailer.field_ir_cron_email_template_id +#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check_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." @@ -71,12 +104,14 @@ msgstr "" 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 "" + #. 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')}] Agendador '${object.name or ''}' FALHOU" - -#. module: scheduler_error_mailer -#: model:ir.model,name:scheduler_error_mailer.model_ir_cron -msgid "ir.cron" -msgstr "" 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..1ba9cdbfc48 --- /dev/null +++ b/scheduler_error_mailer/i18n/scheduler_error_mailer.pot @@ -0,0 +1,103 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * scheduler_error_mailer +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.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 ${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 "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_channel_ids +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_channel_ids +msgid "Add Channels" +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_partner_ids +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_partner_ids +msgid "Add Followers" +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_template_id +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_template_id +msgid "Email Template" +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_email_template_id +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_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:ir.model.fields,help:scheduler_error_mailer.field_ir_cron_email_template_id +#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check_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:55 +#, 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 index cfe31748455..bd9994cdaef 100644 --- a/scheduler_error_mailer/i18n/sl.po +++ b/scheduler_error_mailer/i18n/sl.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * scheduler_error_mailer -# +# # Translators: # OCA Transbot , 2016 msgid "" @@ -12,33 +12,40 @@ msgstr "" "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" -"Language: sl\n" -"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\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" "\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" +"

            Odoo tried to run the scheduler ${object.name or ''} in the " +"database ${ctx.get('dbname')} but it failed. Here is the error " +"message :

            \n" "\n" "\n" -"${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to get the error message from the context.'}\n" +"${ctx.get('job_exception') 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" +"

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

            \n" "\n" "

            Properties of the scheduler ${object.name or ''} :

            \n" "
              \n" "
            • Model : ${object.model or ''}
            • \n" "
            • Method : ${object.function or ''}
            • \n" "
            • Arguments : ${object.args or ''}
            • \n" -"
            • Interval : ${object.interval_number or '0'} ${object.interval_type or ''}
            • \n" +"
            • Interval : ${object.interval_number or '0'} ${object.interval_type or ''}" +"
            • \n" "
            • Number of calls : ${object.numbercall or '0'}
            • \n" "
            • Repeat missed : ${object.doall}
            • \n" "
            • User : ${object.user_id.name or ''}
            • \n" @@ -54,13 +61,39 @@ msgid "" " " msgstr "" +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_channel_ids +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_channel_ids +msgid "Add Channels" +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_partner_ids +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_partner_ids +msgid "Add Followers" +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_template_id +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_template_id +#, fuzzy +msgid "Email Template" +msgstr "Predloga obvestila o napaki" + #. module: scheduler_error_mailer #: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_email_template_id +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_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:ir.model.fields,help:scheduler_error_mailer.field_ir_cron_email_template_id +#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check_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." @@ -71,12 +104,14 @@ msgid "Task failure with UID = %d." msgstr "Napaka pri opravilu UID = %d." #. module: scheduler_error_mailer -#: model:mail.template,subject:scheduler_error_mailer.scheduler_error_mailer -msgid "[DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED" +#: 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 "" -"[DB ${ctx.get('dbname')}] Razporejevalec '${object.name or ''}' NEUSPEŠEN" #. module: scheduler_error_mailer -#: model:ir.model,name:scheduler_error_mailer.model_ir_cron -msgid "ir.cron" +#: 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')}] Razporejevalec '${object.name or ''}' NEUSPEŠEN" diff --git a/scheduler_error_mailer/i18n/zh_CN.po b/scheduler_error_mailer/i18n/zh_CN.po index 0d3711e24a4..4a074219c26 100644 --- a/scheduler_error_mailer/i18n/zh_CN.po +++ b/scheduler_error_mailer/i18n/zh_CN.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * scheduler_error_mailer -# +# # Translators: # Jeffery Chenn , 2016 msgid "" @@ -11,11 +11,12 @@ msgstr "" "POT-Creation-Date: 2016-08-31 11:58+0000\n" "PO-Revision-Date: 2016-08-31 11:58+0000\n" "Last-Translator: Jeffery Chenn , 2016\n" -"Language-Team: Chinese (China) (https://www.transifex.com/oca/teams/23907/zh_CN/)\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" -"Language: zh_CN\n" "Plural-Forms: nplurals=1; plural=0;\n" #. module: scheduler_error_mailer @@ -23,22 +24,28 @@ msgstr "" msgid "" "\n" " \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" +"

              Odoo tried to run the scheduler ${object.name or ''} in the " +"database ${ctx.get('dbname')} but it failed. Here is the error " +"message :

              \n" "\n" "\n" -"${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to get the error message from the context.'}\n" +"${ctx.get('job_exception') 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" +"

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

              \n" "\n" "

              Properties of the scheduler ${object.name or ''} :

              \n" "
                \n" "
              • Model : ${object.model or ''}
              • \n" "
              • Method : ${object.function or ''}
              • \n" "
              • Arguments : ${object.args or ''}
              • \n" -"
              • Interval : ${object.interval_number or '0'} ${object.interval_type or ''}
              • \n" +"
              • Interval : ${object.interval_number or '0'} ${object.interval_type or ''}" +"
              • \n" "
              • Number of calls : ${object.numbercall or '0'}
              • \n" "
              • Repeat missed : ${object.doall}
              • \n" "
              • User : ${object.user_id.name or ''}
              • \n" @@ -54,13 +61,39 @@ msgid "" " " msgstr "" +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_channel_ids +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_channel_ids +msgid "Add Channels" +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_partner_ids +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_partner_ids +msgid "Add Followers" +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_template_id +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_template_id +#, fuzzy +msgid "Email Template" +msgstr "错误E-mail 模板" + #. module: scheduler_error_mailer #: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_email_template_id +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_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:ir.model.fields,help:scheduler_error_mailer.field_ir_cron_email_template_id +#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check_email_template_id msgid "Select the email template that will be sent when this scheduler fails." msgstr "" @@ -71,11 +104,13 @@ msgid "Task failure with UID = %d." 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" +#: 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:ir.model,name:scheduler_error_mailer.model_ir_cron -msgid "ir.cron" +#: 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/models/__init__.py b/scheduler_error_mailer/models/__init__.py index 91c8e5e18af..151e123d9f4 100644 --- a/scheduler_error_mailer/models/__init__.py +++ b/scheduler_error_mailer/models/__init__.py @@ -1,6 +1,6 @@ -# -*- coding: utf-8 -*- # © 2012-2013 Akretion Sébastien BEAU,David Beal,Alexis de Lattre # © 2016 Sodexis +# © 2018 bloopark systems () # 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 index efb2a4bed60..9eedcfa2391 100644 --- a/scheduler_error_mailer/models/ir_cron.py +++ b/scheduler_error_mailer/models/ir_cron.py @@ -1,9 +1,9 @@ -# -*- coding: utf-8 -*- # © 2012-2013 Akretion Sébastien BEAU,David Beal,Alexis de Lattre # © 2016 Sodexis +# © 2018 bloopark systems () # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from odoo import models, fields, api, _ +from odoo import _, api, fields, models from odoo.exceptions import UserError import logging @@ -22,11 +22,12 @@ class IrCron(models.Model): ) @api.model - def _handle_callback_exception( - self, model_name, method_name, args, job_id, job_exception): - res = super(IrCron, self)._handle_callback_exception( - model_name, method_name, args, job_id, job_exception) - + def _handle_callback_exception(self, cron_name, server_action_id, job_id, + job_exception): + res = super(IrCron, self)._handle_callback_exception(cron_name, + server_action_id, + job_id, + job_exception) my_cron = self.browse(job_id) if my_cron.email_template_id: @@ -49,7 +50,6 @@ def _handle_callback_exception( @api.model def _test_scheduler_failure(self): - """This function is used to test and debug this module""" - + """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/views/ir_cron.xml b/scheduler_error_mailer/views/ir_cron.xml index 3ade1e1b84b..a6ee1f9da3c 100644 --- a/scheduler_error_mailer/views/ir_cron.xml +++ b/scheduler_error_mailer/views/ir_cron.xml @@ -3,6 +3,7 @@ scheduler_error_mailer for Odoo Copyright (C) 2012-2013 Akretion Sébastien BEAU,David Beal,Alexis de Lattre Copyright (C) 2016 Sodexis + Copyright (C) 2018 bloopark systems () The licence is in the file __openerp__.py --> @@ -11,7 +12,7 @@ ir.cron.error.mailer.form ir.cron - + From c739819685fab893e75fda2f018f7a844bff40c1 Mon Sep 17 00:00:00 2001 From: Cristina Martin Date: Mon, 4 Mar 2019 11:39:36 +0100 Subject: [PATCH 12/29] [12.0][MIG] scheduler_error_mailer: Migration to v12 [UPD] README.rst [UPD] Update scheduler_error_mailer.pot Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: server-tools-12.0/server-tools-12.0-scheduler_error_mailer Translate-URL: https://translation.odoo-community.org/projects/server-tools-12-0/server-tools-12-0-scheduler_error_mailer/ [UPD] README.rst --- scheduler_error_mailer/README.rst | 75 +-- scheduler_error_mailer/__init__.py | 2 - scheduler_error_mailer/__manifest__.py | 11 +- .../data/ir_cron_email_tpl.xml | 2 +- scheduler_error_mailer/i18n/de.po | 33 +- scheduler_error_mailer/i18n/es.po | 33 +- scheduler_error_mailer/i18n/fr.po | 173 +++++++ scheduler_error_mailer/i18n/hr.po | 28 +- scheduler_error_mailer/i18n/pt.po | 93 ++++ scheduler_error_mailer/i18n/pt_BR.po | 123 +++-- .../i18n/scheduler_error_mailer.pot | 28 +- scheduler_error_mailer/i18n/sl.po | 33 +- scheduler_error_mailer/i18n/zh_CN.po | 125 +++-- .../migrations/12.0.1.1.0/post-migration.py | 13 + scheduler_error_mailer/models/__init__.py | 3 - scheduler_error_mailer/models/ir_cron.py | 8 +- scheduler_error_mailer/readme/CONFIGURE.rst | 4 + .../readme/CONTRIBUTORS.rst | 9 + scheduler_error_mailer/readme/DESCRIPTION.rst | 2 + .../static/description/index.html | 438 ++++++++++++++++++ 20 files changed, 1010 insertions(+), 226 deletions(-) create mode 100644 scheduler_error_mailer/i18n/fr.po create mode 100644 scheduler_error_mailer/i18n/pt.po create mode 100644 scheduler_error_mailer/migrations/12.0.1.1.0/post-migration.py create mode 100644 scheduler_error_mailer/readme/CONFIGURE.rst create mode 100644 scheduler_error_mailer/readme/CONTRIBUTORS.rst create mode 100644 scheduler_error_mailer/readme/DESCRIPTION.rst create mode 100644 scheduler_error_mailer/static/description/index.html diff --git a/scheduler_error_mailer/README.rst b/scheduler_error_mailer/README.rst index db7417404c2..b5dbb228a1b 100644 --- a/scheduler_error_mailer/README.rst +++ b/scheduler_error_mailer/README.rst @@ -1,14 +1,38 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 - ====================== 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/12.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-12-0/server-tools-12-0-scheduler_error_mailer + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/149/12.0 + :alt: Try me on Runbot + +|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 ============= @@ -17,33 +41,27 @@ 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. -Usage -===== - -To use this module, you need to: - -.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas - :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/149/11.0 - 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. +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 ======= -Images ------- +Authors +~~~~~~~ -* Odoo Community Association: `Icon `_. +* Akretion +* Sodexis Contributors ------------- +~~~~~~~~~~~~ * Sébastien BEAU * David Beal @@ -51,18 +69,23 @@ Contributors * Sodexis * Achraf Mhadhbi +* `Tecnativa `_: + + * Cristina Martin R. -Maintainer ----------- +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. .. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association :target: https://odoo-community.org -This module is maintained by the OCA. - 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. -To contribute to this module, please visit https://odoo-community.org. +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 index f55583a17db..69f7babdfb1 100644 --- a/scheduler_error_mailer/__init__.py +++ b/scheduler_error_mailer/__init__.py @@ -1,5 +1,3 @@ -# © 2012-2013 Akretion Sébastien BEAU,David Beal,Alexis de Lattre -# © 2016 Sodexis # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import models diff --git a/scheduler_error_mailer/__manifest__.py b/scheduler_error_mailer/__manifest__.py index 2954d0a8ecb..1ddd01b197e 100644 --- a/scheduler_error_mailer/__manifest__.py +++ b/scheduler_error_mailer/__manifest__.py @@ -1,15 +1,16 @@ -# © 2012-2013 Akretion Sébastien BEAU,David Beal,Alexis de Lattre -# © 2016 Sodexis -# © 2018 bloopark systems () +# 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': '11.0.1.0.0', + 'version': '12.0.1.1.0', 'category': 'Extra Tools', 'license': 'AGPL-3', 'author': "Akretion,Sodexis,Odoo Community Association (OCA)", - 'website': 'http://www.akretion.com/', + 'website': 'https://github.com/OCA/server-tools', 'depends': ['mail'], 'data': [ 'data/ir_cron_email_tpl.xml', diff --git a/scheduler_error_mailer/data/ir_cron_email_tpl.xml b/scheduler_error_mailer/data/ir_cron_email_tpl.xml index a6696e59fa8..14563fba677 100644 --- a/scheduler_error_mailer/data/ir_cron_email_tpl.xml +++ b/scheduler_error_mailer/data/ir_cron_email_tpl.xml @@ -18,7 +18,7 @@

                Odoo tried to run the scheduler ${object.name or ''} in the database ${ctx.get('dbname')} but it failed. Here is the error message :

                -${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to get the error message from the context.'} +${ctx.get('job_exception') or 'Failed to get the error message from the context.'}

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

                diff --git a/scheduler_error_mailer/i18n/de.po b/scheduler_error_mailer/i18n/de.po index cc41130135d..444f2a1d1c7 100644 --- a/scheduler_error_mailer/i18n/de.po +++ b/scheduler_error_mailer/i18n/de.po @@ -31,8 +31,8 @@ msgid "" "message :

                \n" "\n" "\n" -"${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to " -"get the error message from the context.'}\n" +"${ctx.get('job_exception') or 'Failed to get the error message from the " +"context.'}\n" "\n" "\n" "

                You may check the logs of the Odoo server to get more information about " @@ -61,27 +61,7 @@ msgid "" msgstr "" #. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_channel_ids -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_channel_ids -msgid "Add Channels" -msgstr "" - -#. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_partner_ids -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_partner_ids -msgid "Add Followers" -msgstr "" - -#. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_template_id -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_template_id -#, fuzzy -msgid "Email Template" -msgstr "Fehler e-Mail Vorlage" - -#. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_email_template_id -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_email_template_id +#: 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" @@ -91,8 +71,7 @@ msgid "Scheduled Actions" msgstr "" #. module: scheduler_error_mailer -#: model:ir.model.fields,help:scheduler_error_mailer.field_ir_cron_email_template_id -#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check_email_template_id +#: 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 " @@ -116,5 +95,9 @@ 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 index d283d8f4d35..162536d5e68 100644 --- a/scheduler_error_mailer/i18n/es.po +++ b/scheduler_error_mailer/i18n/es.po @@ -32,8 +32,8 @@ msgid "" "message :

                \n" "\n" "\n" -"${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to " -"get the error message from the context.'}\n" +"${ctx.get('job_exception') or 'Failed to get the error message from the " +"context.'}\n" "\n" "\n" "

                You may check the logs of the Odoo server to get more information about " @@ -62,27 +62,7 @@ msgid "" msgstr "" #. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_channel_ids -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_channel_ids -msgid "Add Channels" -msgstr "" - -#. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_partner_ids -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_partner_ids -msgid "Add Followers" -msgstr "" - -#. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_template_id -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_template_id -#, fuzzy -msgid "Email Template" -msgstr "Plantilla de correo electrónico de error" - -#. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_email_template_id -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_email_template_id +#: 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" @@ -92,8 +72,7 @@ msgid "Scheduled Actions" msgstr "" #. module: scheduler_error_mailer -#: model:ir.model.fields,help:scheduler_error_mailer.field_ir_cron_email_template_id -#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check_email_template_id +#: 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 " @@ -117,5 +96,9 @@ msgstr "" 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/fr.po b/scheduler_error_mailer/i18n/fr.po new file mode 100644 index 00000000000..ad43b27f3f5 --- /dev/null +++ b/scheduler_error_mailer/i18n/fr.po @@ -0,0 +1,173 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * scheduler_error_mailer +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-10-20 11:12+0000\n" +"Last-Translator: Yann Papouin \n" +"Language-Team: none\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: scheduler_error_mailer +#: model:mail.template,body_html:scheduler_error_mailer.scheduler_error_mailer +msgid "" +"\n" +" \n" +"

                \n" +"\n" +"

                Odoo tried to run the scheduler ${object.name or ''} in the " +"database ${ctx.get('dbname')} but it failed. Here is the error " +"message :

                \n" +"\n" +"\n" +"${ctx.get('job_exception') or 'Failed to get the error message from the " +"context.'}\n" +"\n" +"\n" +"

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

                \n" +"\n" +"

                Properties of the scheduler ${object.name or ''} :

                \n" +"
                  \n" +"
                • Model : ${object.model or ''}
                • \n" +"
                • Method : ${object.function or ''}
                • \n" +"
                • Arguments : ${object.args or ''}
                • \n" +"
                • Interval : ${object.interval_number or '0'} ${object.interval_type or ''}" +"
                • \n" +"
                • Number of calls : ${object.numbercall or '0'}
                • \n" +"
                • Repeat missed : ${object.doall}
                • \n" +"
                • User : ${object.user_id.name or ''}
                • \n" +"
                \n" +"\n" +"

                \n" +"--
                \n" +"Automatic e-mail sent by Odoo. Do not reply.
                \n" +"Database : ${ctx.get('dbname')}\n" +"

                \n" +"
                \n" +" \n" +" " +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__email_template_id +msgid "Error E-mail Template" +msgstr "Modèle d’e-mail d’erreur" + +#. module: scheduler_error_mailer +#: model:ir.model,name:scheduler_error_mailer.model_ir_cron +msgid "Scheduled Actions" +msgstr "Actions planifiées" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,help:scheduler_error_mailer.field_ir_cron__email_template_id +msgid "Select the email template that will be sent when this scheduler fails." +msgstr "" +"Sélectionnez le modèle d’e-mail qui sera envoyé en cas d’échec de ce " +"planificateur." + +#. module: scheduler_error_mailer +#: code:addons/scheduler_error_mailer/models/ir_cron.py:55 +#, python-format +msgid "Task failure with UID = %d." +msgstr "Échec de la tâche avec UID = %d." + +#. module: scheduler_error_mailer +#: model:ir.actions.server,name:scheduler_error_mailer.test_scheduler_error_mailer_ir_actions_server +#: model:ir.cron,cron_name:scheduler_error_mailer.test_scheduler_error_mailer +#: model:ir.cron,name:scheduler_error_mailer.test_scheduler_error_mailer +msgid "Test Scheduler Error Mailer" +msgstr "Test du mailer d’erreur du planificateur" + +#. module: scheduler_error_mailer +#: model:mail.template,subject:scheduler_error_mailer.scheduler_error_mailer +msgid "[DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED" +msgstr "[DB ${ctx.get('dbname')}] Planificateur '${object.name or ''}' ECHEC" + +#~ msgid "" +#~ "\n" +#~ " \n" +#~ "
                \n" +#~ "\n" +#~ "

                Odoo tried to run the scheduler ${object.name or ''} in the " +#~ "database ${ctx.get('dbname')} but it failed. Here is the error " +#~ "message :

                \n" +#~ "\n" +#~ "\n" +#~ "${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed " +#~ "to get the error message from the context.'}\n" +#~ "\n" +#~ "\n" +#~ "

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

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

                Properties of the scheduler ${object.name or ''} :

                \n" +#~ "
                  \n" +#~ "
                • Model : ${object.model or ''}
                • \n" +#~ "
                • Method : ${object.function or ''}
                • \n" +#~ "
                • Arguments : ${object.args or ''}
                • \n" +#~ "
                • Interval : ${object.interval_number or '0'} ${object.interval_type or " +#~ "''}
                • \n" +#~ "
                • Number of calls : ${object.numbercall or '0'}
                • \n" +#~ "
                • Repeat missed : ${object.doall}
                • \n" +#~ "
                • User : ${object.user_id.name or ''}
                • \n" +#~ "
                \n" +#~ "\n" +#~ "

                \n" +#~ "--
                \n" +#~ "Automatic e-mail sent by Odoo. Do not reply.
                \n" +#~ "Database : ${ctx.get('dbname')}\n" +#~ "

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

                Odoo a essayé d’exécuter le planificateur ${object.name ou ''} dans la base de données ${ctx.get('dbname')} mais cela a " +#~ "échoué. Voici le message d’erreur :

                \n" +#~ "\n" +#~ "\n" +#~ "${ctx.get('job_exception') et ctx.get('job_exception').value ou " +#~ "'Impossible d’obtenir le message d’erreur du contexte.'}\n" +#~ "\n" +#~ "\n" +#~ "

                Vous pouvez consulter les journaux du serveur Odoo pour obtenir plus " +#~ "d’informations sur cette défaillance.

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

                Propriétés du planificateur ${object.name ou ''} :

                \n" +#~ "
                  \n" +#~ "
                • Modèle : ${object.model ou ''}
                • \n" +#~ "
                • Méthode : ${object.function ou ''}
                • \n" +#~ "
                • Arguments : ${object.args ou ''}
                • \n" +#~ "
                • Intervalle : ${object.interval_number ou '0'} ${object.interval_type " +#~ "ou ''}
                • \n" +#~ "
                • Nombre d’appels : ${object.numbercall ou '0'}
                • \n" +#~ "
                • Recommencer les manqués : ${object.doall}
                • \n" +#~ "
                • Utilisateur : ${object.user_id.name ou ''}
                • \n" +#~ "
                \n" +#~ "\n" +#~ "

                \n" +#~ "--
                \n" +#~ "E-mail automatique envoyé par Odoo. Ne pas répondre.
                \n" +#~ "Base de données : ${ctx.get('dbname')}\n" +#~ "

                \n" +#~ "
                \n" +#~ " \n" +#~ " " diff --git a/scheduler_error_mailer/i18n/hr.po b/scheduler_error_mailer/i18n/hr.po index 3641fe18d43..d3bfaeceba1 100644 --- a/scheduler_error_mailer/i18n/hr.po +++ b/scheduler_error_mailer/i18n/hr.po @@ -32,8 +32,8 @@ msgid "" "message :

                \n" "\n" "\n" -"${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to " -"get the error message from the context.'}\n" +"${ctx.get('job_exception') or 'Failed to get the error message from the " +"context.'}\n" "\n" "\n" "

                You may check the logs of the Odoo server to get more information about " @@ -62,26 +62,7 @@ msgid "" msgstr "" #. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_channel_ids -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_channel_ids -msgid "Add Channels" -msgstr "" - -#. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_partner_ids -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_partner_ids -msgid "Add Followers" -msgstr "" - -#. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_template_id -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_template_id -msgid "Email Template" -msgstr "" - -#. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_email_template_id -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_email_template_id +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__email_template_id msgid "Error E-mail Template" msgstr "" @@ -91,8 +72,7 @@ msgid "Scheduled Actions" msgstr "" #. module: scheduler_error_mailer -#: model:ir.model.fields,help:scheduler_error_mailer.field_ir_cron_email_template_id -#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check_email_template_id +#: 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 "" diff --git a/scheduler_error_mailer/i18n/pt.po b/scheduler_error_mailer/i18n/pt.po new file mode 100644 index 00000000000..f946200c9bf --- /dev/null +++ b/scheduler_error_mailer/i18n/pt.po @@ -0,0 +1,93 @@ +# 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 ${object.name or ''} in the " +"database ${ctx.get('dbname')} but it failed. Here is the error " +"message :

                \n" +"\n" +"\n" +"${ctx.get('job_exception') or 'Failed to get the error message from the " +"context.'}\n" +"\n" +"\n" +"

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

                \n" +"\n" +"

                Properties of the scheduler ${object.name or ''} :

                \n" +"
                  \n" +"
                • Model : ${object.model or ''}
                • \n" +"
                • Method : ${object.function or ''}
                • \n" +"
                • Arguments : ${object.args or ''}
                • \n" +"
                • Interval : ${object.interval_number or '0'} ${object.interval_type or ''}" +"
                • \n" +"
                • Number of calls : ${object.numbercall or '0'}
                • \n" +"
                • Repeat missed : ${object.doall}
                • \n" +"
                • User : ${object.user_id.name or ''}
                • \n" +"
                \n" +"\n" +"

                \n" +"--
                \n" +"Automatic e-mail sent by Odoo. Do not reply.
                \n" +"Database : ${ctx.get('dbname')}\n" +"

                \n" +"
                \n" +" \n" +" " +msgstr "" + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__email_template_id +msgid "Error E-mail Template" +msgstr "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: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:55 +#, 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 index 6f91016b9f0..6ecf740aa3f 100644 --- a/scheduler_error_mailer/i18n/pt_BR.po +++ b/scheduler_error_mailer/i18n/pt_BR.po @@ -9,15 +9,16 @@ 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" +"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" +"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 @@ -32,8 +33,8 @@ msgid "" "message :

                \n" "\n" "\n" -"${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to " -"get the error message from the context.'}\n" +"${ctx.get('job_exception') or 'Failed to get the error message from the " +"context.'}\n" "\n" "\n" "

                You may check the logs of the Odoo server to get more information about " @@ -62,38 +63,17 @@ msgid "" msgstr "" #. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_channel_ids -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_channel_ids -msgid "Add Channels" -msgstr "" - -#. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_partner_ids -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_partner_ids -msgid "Add Followers" -msgstr "" - -#. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_template_id -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_template_id -#, fuzzy -msgid "Email Template" -msgstr "Modelo de Erro de E-mail" - -#. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_email_template_id -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_email_template_id +#: 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 "" +msgstr "Ações Agendadas" #. module: scheduler_error_mailer -#: model:ir.model.fields,help:scheduler_error_mailer.field_ir_cron_email_template_id -#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check_email_template_id +#: 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." @@ -109,9 +89,92 @@ msgstr "Tarefa falhou com UID = %d." #: 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 "" +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 "[DB ${ctx.get('dbname')}] Agendador '${object.name or ''}' FALHOU" + +#~ msgid "" +#~ "\n" +#~ " \n" +#~ "

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

                Odoo tried to run the scheduler ${object.name or ''} in the " +#~ "database ${ctx.get('dbname')} but it failed. Here is the error " +#~ "message :

                \n" +#~ "\n" +#~ "\n" +#~ "${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed " +#~ "to get the error message from the context.'}\n" +#~ "\n" +#~ "\n" +#~ "

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

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

                Properties of the scheduler ${object.name or ''} :

                \n" +#~ "
                  \n" +#~ "
                • Model : ${object.model or ''}
                • \n" +#~ "
                • Method : ${object.function or ''}
                • \n" +#~ "
                • Arguments : ${object.args or ''}
                • \n" +#~ "
                • Interval : ${object.interval_number or '0'} ${object.interval_type or " +#~ "''}
                • \n" +#~ "
                • Number of calls : ${object.numbercall or '0'}
                • \n" +#~ "
                • Repeat missed : ${object.doall}
                • \n" +#~ "
                • User : ${object.user_id.name or ''}
                • \n" +#~ "
                \n" +#~ "\n" +#~ "

                \n" +#~ "--
                \n" +#~ "Automatic e-mail sent by Odoo. Do not reply.
                \n" +#~ "Database : ${ctx.get('dbname')}\n" +#~ "

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

                Odoo tentou executar o agendador${object.name ou ''}no banco " +#~ "de dados${ctx.get ('dbname')}, mas falhou. Aqui está a mensagem " +#~ "de erro:

                \n" +#~ "\n" +#~ "\n" +#~ "${ctx.get ('job_exception') e ctx.get ('job_exception'). value ou 'Falha " +#~ "ao obter a mensagem de erro do contexto.'}\n" +#~ "\n" +#~ "\n" +#~ "

                Você pode verificar os logs do servidor Odoo para obter mais " +#~ "informações sobre esta falha.

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

                Propriedades do planejador${object.name ou''}:

                \n" +#~ "
                  \n" +#~ "
                • Modelo: ${object.model ou ''}
                • \n" +#~ "
                • Método: ${object.function ou ''}
                • \n" +#~ "
                • Argumentos: ${object.args ou ''}
                • \n" +#~ "
                • Intervalo: ${object.interval_number ou '0'} ${object.interval_type " +#~ "ou ''}
                • \n" +#~ "
                • Número de chamadas: ${object.numbercall ou '0'}
                • \n" +#~ "
                • Repetição perdida: ${object.doall}
                • \n" +#~ "
                • Usuário: ${object.user_id.name ou ''}
                • \n" +#~ "
                \n" +#~ "\n" +#~ "

                \n" +#~ "--
                \n" +#~ "Email automático enviado pelo Odoo. Não responda.
                \n" +#~ "Banco de Dados: ${ctx.get ('dbname')}\n" +#~ "

                \n" +#~ "
                \n" +#~ " \n" +#~ " " + +#, fuzzy +#~ msgid "Email Template" +#~ msgstr "Modelo de Erro de E-mail" diff --git a/scheduler_error_mailer/i18n/scheduler_error_mailer.pot b/scheduler_error_mailer/i18n/scheduler_error_mailer.pot index 1ba9cdbfc48..9b3ae95d1ce 100644 --- a/scheduler_error_mailer/i18n/scheduler_error_mailer.pot +++ b/scheduler_error_mailer/i18n/scheduler_error_mailer.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" +"Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: <>\n" "Language-Team: \n" @@ -22,7 +22,7 @@ msgid "\n" "

                Odoo tried to run the scheduler ${object.name or ''} in the database ${ctx.get('dbname')} but it failed. Here is the error message :

                \n" "\n" "\n" -"${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to get the error message from the context.'}\n" +"${ctx.get('job_exception') or 'Failed to get the error message from the context.'}\n" "\n" "\n" "

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

                \n" @@ -49,26 +49,7 @@ msgid "\n" msgstr "" #. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_channel_ids -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_channel_ids -msgid "Add Channels" -msgstr "" - -#. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_partner_ids -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_partner_ids -msgid "Add Followers" -msgstr "" - -#. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_template_id -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_template_id -msgid "Email Template" -msgstr "" - -#. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_email_template_id -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_email_template_id +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__email_template_id msgid "Error E-mail Template" msgstr "" @@ -78,8 +59,7 @@ msgid "Scheduled Actions" msgstr "" #. module: scheduler_error_mailer -#: model:ir.model.fields,help:scheduler_error_mailer.field_ir_cron_email_template_id -#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check_email_template_id +#: 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 "" diff --git a/scheduler_error_mailer/i18n/sl.po b/scheduler_error_mailer/i18n/sl.po index bd9994cdaef..b53fdd9371d 100644 --- a/scheduler_error_mailer/i18n/sl.po +++ b/scheduler_error_mailer/i18n/sl.po @@ -32,8 +32,8 @@ msgid "" "message :

                \n" "\n" "\n" -"${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to " -"get the error message from the context.'}\n" +"${ctx.get('job_exception') or 'Failed to get the error message from the " +"context.'}\n" "\n" "\n" "

                You may check the logs of the Odoo server to get more information about " @@ -62,27 +62,7 @@ msgid "" msgstr "" #. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_channel_ids -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_channel_ids -msgid "Add Channels" -msgstr "" - -#. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_partner_ids -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_partner_ids -msgid "Add Followers" -msgstr "" - -#. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_template_id -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_template_id -#, fuzzy -msgid "Email Template" -msgstr "Predloga obvestila o napaki" - -#. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_email_template_id -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_email_template_id +#: 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" @@ -92,8 +72,7 @@ msgid "Scheduled Actions" msgstr "" #. module: scheduler_error_mailer -#: model:ir.model.fields,help:scheduler_error_mailer.field_ir_cron_email_template_id -#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check_email_template_id +#: 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." @@ -115,3 +94,7 @@ 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 index 4a074219c26..024e63f3f4f 100644 --- a/scheduler_error_mailer/i18n/zh_CN.po +++ b/scheduler_error_mailer/i18n/zh_CN.po @@ -9,8 +9,8 @@ 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: 2016-08-31 11:58+0000\n" -"Last-Translator: Jeffery Chenn , 2016\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" @@ -18,6 +18,7 @@ msgstr "" "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 @@ -32,8 +33,8 @@ msgid "" "message :

                \n" "\n" "\n" -"${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to " -"get the error message from the context.'}\n" +"${ctx.get('job_exception') or 'Failed to get the error message from the " +"context.'}\n" "\n" "\n" "

                You may check the logs of the Odoo server to get more information about " @@ -62,55 +63,115 @@ msgid "" msgstr "" #. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_channel_ids -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_channel_ids -msgid "Add Channels" -msgstr "" - -#. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_partner_ids -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_partner_ids -msgid "Add Followers" -msgstr "" - -#. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_template_id -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_template_id -#, fuzzy -msgid "Email Template" -msgstr "错误E-mail 模板" - -#. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron_email_template_id -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check_email_template_id +#: 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 "" +msgstr "安排的动作" #. module: scheduler_error_mailer -#: model:ir.model.fields,help:scheduler_error_mailer.field_ir_cron_email_template_id -#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check_email_template_id +#: 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 "" +msgstr "选择此调度程序失败时将发送的电子邮件模板。" #. module: scheduler_error_mailer #: code:addons/scheduler_error_mailer/models/ir_cron.py:55 #, python-format msgid "Task failure with UID = %d." -msgstr "" +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 "" +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 "" +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/migrations/12.0.1.1.0/post-migration.py b/scheduler_error_mailer/migrations/12.0.1.1.0/post-migration.py new file mode 100644 index 00000000000..90b9f1bf22a --- /dev/null +++ b/scheduler_error_mailer/migrations/12.0.1.1.0/post-migration.py @@ -0,0 +1,13 @@ +# Copyright 2021 Tecnativa - Víctor Martínez +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + template = env.ref("scheduler_error_mailer.scheduler_error_mailer") + template.body_html = template.body_html.replace( + "${ctx.get('job_exception') and ctx.get('job_exception').value", + "${ctx.get('job_exception')" + ) diff --git a/scheduler_error_mailer/models/__init__.py b/scheduler_error_mailer/models/__init__.py index 151e123d9f4..b365c0e973b 100644 --- a/scheduler_error_mailer/models/__init__.py +++ b/scheduler_error_mailer/models/__init__.py @@ -1,6 +1,3 @@ -# © 2012-2013 Akretion Sébastien BEAU,David Beal,Alexis de Lattre -# © 2016 Sodexis -# © 2018 bloopark systems () # 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 index 9eedcfa2391..9a9ed7a9637 100644 --- a/scheduler_error_mailer/models/ir_cron.py +++ b/scheduler_error_mailer/models/ir_cron.py @@ -1,6 +1,6 @@ -# © 2012-2013 Akretion Sébastien BEAU,David Beal,Alexis de Lattre -# © 2016 Sodexis -# © 2018 bloopark systems () +# 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). from odoo import _, api, fields, models @@ -34,7 +34,7 @@ def _handle_callback_exception(self, cron_name, server_action_id, job_id, # we put the job_exception in context to be able to print it inside # the email template context = { - 'job_exception': job_exception, + 'job_exception': str(job_exception), 'dbname': self._cr.dbname, } diff --git a/scheduler_error_mailer/readme/CONFIGURE.rst b/scheduler_error_mailer/readme/CONFIGURE.rst new file mode 100644 index 00000000000..baf4c1a6da0 --- /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 00000000000..496cedb9f2f --- /dev/null +++ b/scheduler_error_mailer/readme/CONTRIBUTORS.rst @@ -0,0 +1,9 @@ +* Sébastien BEAU +* David Beal +* Alexis de Lattre +* Sodexis +* Achraf Mhadhbi + +* `Tecnativa `_: + + * Cristina Martin R. diff --git a/scheduler_error_mailer/readme/DESCRIPTION.rst b/scheduler_error_mailer/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..6e097d81f69 --- /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/index.html b/scheduler_error_mailer/static/description/index.html new file mode 100644 index 00000000000..2586581cf90 --- /dev/null +++ b/scheduler_error_mailer/static/description/index.html @@ -0,0 +1,438 @@ + + + + + + +Scheduler Error Mailer + + + +
                +

                Scheduler Error Mailer

                + + +

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

                +

                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.

                +
                +
                +
                + + From eb9651d4327a35f8e9f42288c12f82e6c4b29976 Mon Sep 17 00:00:00 2001 From: Alessandro Uffreduzzi Date: Tue, 14 Sep 2021 17:24:33 +0200 Subject: [PATCH 13/29] [FIX] scheduler_error_mailer: fixed email template fields [UPD] Update scheduler_error_mailer.pot Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: server-tools-12.0/server-tools-12.0-scheduler_error_mailer Translate-URL: https://translation.odoo-community.org/projects/server-tools-12-0/server-tools-12-0-scheduler_error_mailer/ --- scheduler_error_mailer/__manifest__.py | 2 +- .../data/ir_cron_email_tpl.xml | 5 ++--- scheduler_error_mailer/i18n/de.po | 5 ++--- scheduler_error_mailer/i18n/es.po | 5 ++--- scheduler_error_mailer/i18n/fr.po | 5 ++--- scheduler_error_mailer/i18n/hr.po | 5 ++--- scheduler_error_mailer/i18n/pt.po | 5 ++--- scheduler_error_mailer/i18n/pt_BR.po | 5 ++--- .../i18n/scheduler_error_mailer.pot | 5 ++--- scheduler_error_mailer/i18n/sl.po | 5 ++--- scheduler_error_mailer/i18n/zh_CN.po | 5 ++--- .../migrations/12.0.1.2.0/post-migration.py | 19 +++++++++++++++++++ 12 files changed, 40 insertions(+), 31 deletions(-) create mode 100644 scheduler_error_mailer/migrations/12.0.1.2.0/post-migration.py diff --git a/scheduler_error_mailer/__manifest__.py b/scheduler_error_mailer/__manifest__.py index 1ddd01b197e..b9145791771 100644 --- a/scheduler_error_mailer/__manifest__.py +++ b/scheduler_error_mailer/__manifest__.py @@ -6,7 +6,7 @@ { 'name': 'Scheduler Error Mailer', - 'version': '12.0.1.1.0', + 'version': '12.0.1.2.0', 'category': 'Extra Tools', 'license': 'AGPL-3', 'author': "Akretion,Sodexis,Odoo Community Association (OCA)", diff --git a/scheduler_error_mailer/data/ir_cron_email_tpl.xml b/scheduler_error_mailer/data/ir_cron_email_tpl.xml index 14563fba677..c2349285a11 100644 --- a/scheduler_error_mailer/data/ir_cron_email_tpl.xml +++ b/scheduler_error_mailer/data/ir_cron_email_tpl.xml @@ -25,9 +25,8 @@ ${ctx.get('job_exception') or 'Failed to get the error message from the context.

                Properties of the scheduler ${object.name or ''} :

                  -
                • Model : ${object.model or ''}
                • -
                • Method : ${object.function or ''}
                • -
                • Arguments : ${object.args or ''}
                • +
                • Model : ${object.model_id.name or ''}
                • +
                • Python code : ${object.code or ''}
                • Interval : ${object.interval_number or '0'} ${object.interval_type or ''}
                • Number of calls : ${object.numbercall or '0'}
                • Repeat missed : ${object.doall}
                • diff --git a/scheduler_error_mailer/i18n/de.po b/scheduler_error_mailer/i18n/de.po index 444f2a1d1c7..f9ee833963e 100644 --- a/scheduler_error_mailer/i18n/de.po +++ b/scheduler_error_mailer/i18n/de.po @@ -40,9 +40,8 @@ msgid "" "\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" +"
                  • 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" diff --git a/scheduler_error_mailer/i18n/es.po b/scheduler_error_mailer/i18n/es.po index 162536d5e68..606efaebfa3 100644 --- a/scheduler_error_mailer/i18n/es.po +++ b/scheduler_error_mailer/i18n/es.po @@ -41,9 +41,8 @@ msgid "" "\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" +"
                    • 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" diff --git a/scheduler_error_mailer/i18n/fr.po b/scheduler_error_mailer/i18n/fr.po index ad43b27f3f5..4cae296e9f8 100644 --- a/scheduler_error_mailer/i18n/fr.po +++ b/scheduler_error_mailer/i18n/fr.po @@ -38,9 +38,8 @@ msgid "" "\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" +"
                      • 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" diff --git a/scheduler_error_mailer/i18n/hr.po b/scheduler_error_mailer/i18n/hr.po index d3bfaeceba1..e6ab70a6ecb 100644 --- a/scheduler_error_mailer/i18n/hr.po +++ b/scheduler_error_mailer/i18n/hr.po @@ -41,9 +41,8 @@ msgid "" "\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" +"
                        • 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" diff --git a/scheduler_error_mailer/i18n/pt.po b/scheduler_error_mailer/i18n/pt.po index f946200c9bf..2f1b50ea67e 100644 --- a/scheduler_error_mailer/i18n/pt.po +++ b/scheduler_error_mailer/i18n/pt.po @@ -38,9 +38,8 @@ msgid "" "\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" +"
                          • 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" diff --git a/scheduler_error_mailer/i18n/pt_BR.po b/scheduler_error_mailer/i18n/pt_BR.po index 6ecf740aa3f..8c27ed7d306 100644 --- a/scheduler_error_mailer/i18n/pt_BR.po +++ b/scheduler_error_mailer/i18n/pt_BR.po @@ -42,9 +42,8 @@ msgid "" "\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" +"
                            • 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" diff --git a/scheduler_error_mailer/i18n/scheduler_error_mailer.pot b/scheduler_error_mailer/i18n/scheduler_error_mailer.pot index 9b3ae95d1ce..71e57de232e 100644 --- a/scheduler_error_mailer/i18n/scheduler_error_mailer.pot +++ b/scheduler_error_mailer/i18n/scheduler_error_mailer.pot @@ -29,9 +29,8 @@ msgid "\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" +"
                              • 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" diff --git a/scheduler_error_mailer/i18n/sl.po b/scheduler_error_mailer/i18n/sl.po index b53fdd9371d..a2c2bed8f33 100644 --- a/scheduler_error_mailer/i18n/sl.po +++ b/scheduler_error_mailer/i18n/sl.po @@ -41,9 +41,8 @@ msgid "" "\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" +"
                                • 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" diff --git a/scheduler_error_mailer/i18n/zh_CN.po b/scheduler_error_mailer/i18n/zh_CN.po index 024e63f3f4f..eaba7c72c75 100644 --- a/scheduler_error_mailer/i18n/zh_CN.po +++ b/scheduler_error_mailer/i18n/zh_CN.po @@ -42,9 +42,8 @@ msgid "" "\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" +"
                                  • 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" diff --git a/scheduler_error_mailer/migrations/12.0.1.2.0/post-migration.py b/scheduler_error_mailer/migrations/12.0.1.2.0/post-migration.py new file mode 100644 index 00000000000..7cd61451a42 --- /dev/null +++ b/scheduler_error_mailer/migrations/12.0.1.2.0/post-migration.py @@ -0,0 +1,19 @@ +# Copyright 2021 Tecnativa - Víctor Martínez +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + template = env.ref("scheduler_error_mailer.scheduler_error_mailer") + template.body_html = template.body_html.replace( + "${object.model or ''}", "${object.model_id.name or ''}" + ) + template.body_html = template.body_html.replace( + "
                                  • Method : ${object.function or ''}
                                  • ", "" + ) + template.body_html = template.body_html.replace( + "
                                  • Arguments : ${object.args or ''}
                                  • ", + "
                                  • Python code : ${object.code or ''}
                                  • " + ) From b660ae221e881f57d229ef368c914072ac9b3ab3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?= Date: Wed, 26 Jan 2022 16:07:26 +0100 Subject: [PATCH 14/29] [IMP] scheduler_error_mailer: black, isort, prettier --- scheduler_error_mailer/__manifest__.py | 25 ++++++------- .../data/ir_cron_email_tpl.xml | 13 ++++--- scheduler_error_mailer/demo/ir_cron_demo.xml | 18 +++++----- .../migrations/12.0.1.1.0/post-migration.py | 2 +- .../migrations/12.0.1.2.0/post-migration.py | 2 +- scheduler_error_mailer/models/ir_cron.py | 35 +++++++++---------- scheduler_error_mailer/views/ir_cron.xml | 9 ++--- 7 files changed, 47 insertions(+), 57 deletions(-) diff --git a/scheduler_error_mailer/__manifest__.py b/scheduler_error_mailer/__manifest__.py index b9145791771..5b2c05cb164 100644 --- a/scheduler_error_mailer/__manifest__.py +++ b/scheduler_error_mailer/__manifest__.py @@ -5,18 +5,15 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { - 'name': 'Scheduler Error Mailer', - 'version': '12.0.1.2.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, + "name": "Scheduler Error Mailer", + "version": "12.0.1.2.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, } diff --git a/scheduler_error_mailer/data/ir_cron_email_tpl.xml b/scheduler_error_mailer/data/ir_cron_email_tpl.xml index c2349285a11..6635d080ab1 100644 --- a/scheduler_error_mailer/data/ir_cron_email_tpl.xml +++ b/scheduler_error_mailer/data/ir_cron_email_tpl.xml @@ -1,16 +1,16 @@ - - + - Scheduler Error ${object.user_id.email or ''} ${object.user_id.email or ''} - [DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED - - + [DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED + + @@ -42,6 +42,5 @@ Database : ${ctx.get('dbname')} ]]> - diff --git a/scheduler_error_mailer/demo/ir_cron_demo.xml b/scheduler_error_mailer/demo/ir_cron_demo.xml index 80e3c88cb79..d7b10fb6651 100644 --- a/scheduler_error_mailer/demo/ir_cron_demo.xml +++ b/scheduler_error_mailer/demo/ir_cron_demo.xml @@ -1,4 +1,4 @@ - + - - Test Scheduler Error Mailer - - + + 1 hours -1 - - + + code model._test_scheduler_failure() - + - diff --git a/scheduler_error_mailer/migrations/12.0.1.1.0/post-migration.py b/scheduler_error_mailer/migrations/12.0.1.1.0/post-migration.py index 90b9f1bf22a..1b013bcd01e 100644 --- a/scheduler_error_mailer/migrations/12.0.1.1.0/post-migration.py +++ b/scheduler_error_mailer/migrations/12.0.1.1.0/post-migration.py @@ -9,5 +9,5 @@ def migrate(env, version): template = env.ref("scheduler_error_mailer.scheduler_error_mailer") template.body_html = template.body_html.replace( "${ctx.get('job_exception') and ctx.get('job_exception').value", - "${ctx.get('job_exception')" + "${ctx.get('job_exception')", ) diff --git a/scheduler_error_mailer/migrations/12.0.1.2.0/post-migration.py b/scheduler_error_mailer/migrations/12.0.1.2.0/post-migration.py index 7cd61451a42..b38dd794150 100644 --- a/scheduler_error_mailer/migrations/12.0.1.2.0/post-migration.py +++ b/scheduler_error_mailer/migrations/12.0.1.2.0/post-migration.py @@ -15,5 +15,5 @@ def migrate(env, version): ) template.body_html = template.body_html.replace( "
                                  • Arguments : ${object.args or ''}
                                  • ", - "
                                  • Python code : ${object.code or ''}
                                  • " + "
                                  • Python code : ${object.code or ''}
                                  • ", ) diff --git a/scheduler_error_mailer/models/ir_cron.py b/scheduler_error_mailer/models/ir_cron.py index 9a9ed7a9637..74a699a1f89 100644 --- a/scheduler_error_mailer/models/ir_cron.py +++ b/scheduler_error_mailer/models/ir_cron.py @@ -3,10 +3,10 @@ # Copyright 2018 bloopark systems () # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from odoo import _, api, fields, models -from odoo.exceptions import UserError import logging +from odoo import _, api, fields, models +from odoo.exceptions import UserError _logger = logging.getLogger(__name__) @@ -18,38 +18,35 @@ class IrCron(models.Model): comodel_name="mail.template", string="Error E-mail Template", help="Select the email template that will be sent when " - "this scheduler fails." + "this scheduler fails.", ) @api.model - def _handle_callback_exception(self, cron_name, server_action_id, job_id, - job_exception): - res = super(IrCron, self)._handle_callback_exception(cron_name, - server_action_id, - job_id, - job_exception) + def _handle_callback_exception( + self, cron_name, server_action_id, job_id, job_exception + ): + res = super(IrCron, self)._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, + "job_exception": str(job_exception), + "dbname": self._cr.dbname, } - _logger.debug( - "Sending scheduler error email with context=%s", context) + _logger.debug("Sending scheduler error email with context=%s", context) - self.env['mail.template'].browse( - my_cron.email_template_id.id - ).with_context(context).sudo().send_mail( - my_cron.id, force_send=True) + self.env["mail.template"].browse(my_cron.email_template_id.id).with_context( + context + ).sudo().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) + raise UserError(_("Task failure with UID = %d.") % self._uid) diff --git a/scheduler_error_mailer/views/ir_cron.xml b/scheduler_error_mailer/views/ir_cron.xml index a6ee1f9da3c..d22099c7427 100644 --- a/scheduler_error_mailer/views/ir_cron.xml +++ b/scheduler_error_mailer/views/ir_cron.xml @@ -1,4 +1,4 @@ - + - - ir.cron.error.mailer.form ir.cron - + - + - From c3e9be2411f148cefe2249361e2091ab1f737366 Mon Sep 17 00:00:00 2001 From: Achraf Mhadhbi Date: Wed, 26 Feb 2020 21:35:39 +0100 Subject: [PATCH 15/29] [MIG] scheduler_error_mailer: Migration to 13.0 TT27587 --- scheduler_error_mailer/README.rst | 11 +- scheduler_error_mailer/__manifest__.py | 4 +- scheduler_error_mailer/i18n/de.po | 4 +- scheduler_error_mailer/i18n/es.po | 4 +- scheduler_error_mailer/i18n/es_AR.po | 131 ++++++++++++++++++ scheduler_error_mailer/i18n/fr.po | 4 +- scheduler_error_mailer/i18n/hr.po | 4 +- scheduler_error_mailer/i18n/pt.po | 4 +- scheduler_error_mailer/i18n/pt_BR.po | 4 +- .../i18n/scheduler_error_mailer.pot | 14 +- scheduler_error_mailer/i18n/sl.po | 4 +- scheduler_error_mailer/i18n/zh_CN.po | 4 +- .../migrations/12.0.1.1.0/post-migration.py | 13 -- .../migrations/12.0.1.2.0/post-migration.py | 19 --- scheduler_error_mailer/models/ir_cron.py | 12 +- .../readme/CONTRIBUTORS.rst | 1 + .../static/description/index.html | 7 +- 17 files changed, 180 insertions(+), 64 deletions(-) create mode 100644 scheduler_error_mailer/i18n/es_AR.po delete mode 100644 scheduler_error_mailer/migrations/12.0.1.1.0/post-migration.py delete mode 100644 scheduler_error_mailer/migrations/12.0.1.2.0/post-migration.py diff --git a/scheduler_error_mailer/README.rst b/scheduler_error_mailer/README.rst index b5dbb228a1b..78297aef5d5 100644 --- a/scheduler_error_mailer/README.rst +++ b/scheduler_error_mailer/README.rst @@ -14,13 +14,13 @@ Scheduler Error Mailer :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/12.0/scheduler_error_mailer + :target: https://github.com/OCA/server-tools/tree/13.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-12-0/server-tools-12-0-scheduler_error_mailer + :target: https://translation.odoo-community.org/projects/server-tools-13-0/server-tools-13-0-scheduler_error_mailer :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/149/12.0 + :target: https://runbot.odoo-community.org/runbot/149/13.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -47,7 +47,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -72,6 +72,7 @@ Contributors * `Tecnativa `_: * Cristina Martin R. + * Víctor Martínez Maintainers ~~~~~~~~~~~ @@ -86,6 +87,6 @@ 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. +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/__manifest__.py b/scheduler_error_mailer/__manifest__.py index 5b2c05cb164..8649d8165e0 100644 --- a/scheduler_error_mailer/__manifest__.py +++ b/scheduler_error_mailer/__manifest__.py @@ -6,13 +6,13 @@ { "name": "Scheduler Error Mailer", - "version": "12.0.1.2.0", + "version": "13.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",], + "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, diff --git a/scheduler_error_mailer/i18n/de.po b/scheduler_error_mailer/i18n/de.po index f9ee833963e..6cb92555e7f 100644 --- a/scheduler_error_mailer/i18n/de.po +++ b/scheduler_error_mailer/i18n/de.po @@ -61,6 +61,7 @@ msgstr "" #. module: scheduler_error_mailer #: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__email_template_id +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check__email_template_id msgid "Error E-mail Template" msgstr "Fehler e-Mail Vorlage" @@ -71,13 +72,14 @@ msgstr "" #. module: scheduler_error_mailer #: model:ir.model.fields,help:scheduler_error_mailer.field_ir_cron__email_template_id +#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check__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:55 +#: code:addons/scheduler_error_mailer/models/ir_cron.py:0 #, python-format msgid "Task failure with UID = %d." msgstr "Task Fehler von UID = %d." diff --git a/scheduler_error_mailer/i18n/es.po b/scheduler_error_mailer/i18n/es.po index 606efaebfa3..01c261fca20 100644 --- a/scheduler_error_mailer/i18n/es.po +++ b/scheduler_error_mailer/i18n/es.po @@ -62,6 +62,7 @@ msgstr "" #. module: scheduler_error_mailer #: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__email_template_id +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check__email_template_id msgid "Error E-mail Template" msgstr "Plantilla de correo electrónico de error" @@ -72,13 +73,14 @@ msgstr "" #. module: scheduler_error_mailer #: model:ir.model.fields,help:scheduler_error_mailer.field_ir_cron__email_template_id +#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check__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:55 +#: 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." diff --git a/scheduler_error_mailer/i18n/es_AR.po b/scheduler_error_mailer/i18n/es_AR.po new file mode 100644 index 00000000000..3a9ce996640 --- /dev/null +++ b/scheduler_error_mailer/i18n/es_AR.po @@ -0,0 +1,131 @@ +# 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: 2022-03-27 21:17+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.3.2\n" + +#. module: scheduler_error_mailer +#: model:mail.template,body_html:scheduler_error_mailer.scheduler_error_mailer +msgid "" +"\n" +" \n" +"
                                    \n" +"\n" +"

                                    Odoo tried to run the scheduler ${object.name or ''} in the " +"database ${ctx.get('dbname')} but it failed. Here is the error " +"message :

                                    \n" +"\n" +"\n" +"${ctx.get('job_exception') or 'Failed to get the error message from the " +"context.'}\n" +"\n" +"\n" +"

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

                                    \n" +"\n" +"

                                    Properties of the scheduler ${object.name or ''} :

                                    \n" +"
                                      \n" +"
                                    • Model : ${object.model_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" +" " + +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__email_template_id +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check__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:ir.model.fields,help:scheduler_error_mailer.field_ir_cron__email_template_id +#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check__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 ''}' FALLÓ" diff --git a/scheduler_error_mailer/i18n/fr.po b/scheduler_error_mailer/i18n/fr.po index 4cae296e9f8..1cc94a50715 100644 --- a/scheduler_error_mailer/i18n/fr.po +++ b/scheduler_error_mailer/i18n/fr.po @@ -59,6 +59,7 @@ msgstr "" #. module: scheduler_error_mailer #: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__email_template_id +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check__email_template_id msgid "Error E-mail Template" msgstr "Modèle d’e-mail d’erreur" @@ -69,13 +70,14 @@ msgstr "Actions planifiées" #. module: scheduler_error_mailer #: model:ir.model.fields,help:scheduler_error_mailer.field_ir_cron__email_template_id +#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check__email_template_id msgid "Select the email template that will be sent when this scheduler fails." msgstr "" "Sélectionnez le modèle d’e-mail qui sera envoyé en cas d’échec de ce " "planificateur." #. module: scheduler_error_mailer -#: code:addons/scheduler_error_mailer/models/ir_cron.py:55 +#: 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." diff --git a/scheduler_error_mailer/i18n/hr.po b/scheduler_error_mailer/i18n/hr.po index e6ab70a6ecb..cf5fc98c28e 100644 --- a/scheduler_error_mailer/i18n/hr.po +++ b/scheduler_error_mailer/i18n/hr.po @@ -62,6 +62,7 @@ msgstr "" #. module: scheduler_error_mailer #: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__email_template_id +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check__email_template_id msgid "Error E-mail Template" msgstr "" @@ -72,11 +73,12 @@ msgstr "" #. module: scheduler_error_mailer #: model:ir.model.fields,help:scheduler_error_mailer.field_ir_cron__email_template_id +#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check__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:55 +#: code:addons/scheduler_error_mailer/models/ir_cron.py:0 #, python-format msgid "Task failure with UID = %d." msgstr "" diff --git a/scheduler_error_mailer/i18n/pt.po b/scheduler_error_mailer/i18n/pt.po index 2f1b50ea67e..28764f3ce17 100644 --- a/scheduler_error_mailer/i18n/pt.po +++ b/scheduler_error_mailer/i18n/pt.po @@ -59,6 +59,7 @@ msgstr "" #. module: scheduler_error_mailer #: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__email_template_id +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check__email_template_id msgid "Error E-mail Template" msgstr "Modelo do E-mail de Erro" @@ -69,12 +70,13 @@ msgstr "Ações Agendadas" #. module: scheduler_error_mailer #: model:ir.model.fields,help:scheduler_error_mailer.field_ir_cron__email_template_id +#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check__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:55 +#: 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." diff --git a/scheduler_error_mailer/i18n/pt_BR.po b/scheduler_error_mailer/i18n/pt_BR.po index 8c27ed7d306..3deac86140d 100644 --- a/scheduler_error_mailer/i18n/pt_BR.po +++ b/scheduler_error_mailer/i18n/pt_BR.po @@ -63,6 +63,7 @@ msgstr "" #. module: scheduler_error_mailer #: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__email_template_id +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check__email_template_id msgid "Error E-mail Template" msgstr "Modelo de Erro de E-mail" @@ -73,12 +74,13 @@ msgstr "Ações Agendadas" #. module: scheduler_error_mailer #: model:ir.model.fields,help:scheduler_error_mailer.field_ir_cron__email_template_id +#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check__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:55 +#: code:addons/scheduler_error_mailer/models/ir_cron.py:0 #, python-format msgid "Task failure with UID = %d." msgstr "Tarefa falhou com UID = %d." diff --git a/scheduler_error_mailer/i18n/scheduler_error_mailer.pot b/scheduler_error_mailer/i18n/scheduler_error_mailer.pot index 71e57de232e..4b969fbdcb1 100644 --- a/scheduler_error_mailer/i18n/scheduler_error_mailer.pot +++ b/scheduler_error_mailer/i18n/scheduler_error_mailer.pot @@ -1,12 +1,12 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * scheduler_error_mailer +# * scheduler_error_mailer # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: <>\n" +"Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -15,7 +15,8 @@ msgstr "" #. module: scheduler_error_mailer #: model:mail.template,body_html:scheduler_error_mailer.scheduler_error_mailer -msgid "\n" +msgid "" +"\n" " \n" "
                                    \n" "\n" @@ -49,6 +50,7 @@ msgstr "" #. module: scheduler_error_mailer #: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__email_template_id +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check__email_template_id msgid "Error E-mail Template" msgstr "" @@ -59,11 +61,12 @@ msgstr "" #. module: scheduler_error_mailer #: model:ir.model.fields,help:scheduler_error_mailer.field_ir_cron__email_template_id +#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check__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:55 +#: code:addons/scheduler_error_mailer/models/ir_cron.py:0 #, python-format msgid "Task failure with UID = %d." msgstr "" @@ -79,4 +82,3 @@ msgstr "" #: 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 index a2c2bed8f33..aed38e8a2e2 100644 --- a/scheduler_error_mailer/i18n/sl.po +++ b/scheduler_error_mailer/i18n/sl.po @@ -62,6 +62,7 @@ msgstr "" #. module: scheduler_error_mailer #: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__email_template_id +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check__email_template_id msgid "Error E-mail Template" msgstr "Predloga obvestila o napaki" @@ -72,11 +73,12 @@ msgstr "" #. module: scheduler_error_mailer #: model:ir.model.fields,help:scheduler_error_mailer.field_ir_cron__email_template_id +#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check__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:55 +#: code:addons/scheduler_error_mailer/models/ir_cron.py:0 #, python-format msgid "Task failure with UID = %d." msgstr "Napaka pri opravilu UID = %d." diff --git a/scheduler_error_mailer/i18n/zh_CN.po b/scheduler_error_mailer/i18n/zh_CN.po index eaba7c72c75..0c77709ebc7 100644 --- a/scheduler_error_mailer/i18n/zh_CN.po +++ b/scheduler_error_mailer/i18n/zh_CN.po @@ -63,6 +63,7 @@ msgstr "" #. module: scheduler_error_mailer #: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__email_template_id +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check__email_template_id msgid "Error E-mail Template" msgstr "错误E-mail 模板" @@ -73,11 +74,12 @@ msgstr "安排的动作" #. module: scheduler_error_mailer #: model:ir.model.fields,help:scheduler_error_mailer.field_ir_cron__email_template_id +#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check__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:55 +#: code:addons/scheduler_error_mailer/models/ir_cron.py:0 #, python-format msgid "Task failure with UID = %d." msgstr "任务失败 UID = %d." diff --git a/scheduler_error_mailer/migrations/12.0.1.1.0/post-migration.py b/scheduler_error_mailer/migrations/12.0.1.1.0/post-migration.py deleted file mode 100644 index 1b013bcd01e..00000000000 --- a/scheduler_error_mailer/migrations/12.0.1.1.0/post-migration.py +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright 2021 Tecnativa - Víctor Martínez -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - -from openupgradelib import openupgrade - - -@openupgrade.migrate() -def migrate(env, version): - template = env.ref("scheduler_error_mailer.scheduler_error_mailer") - template.body_html = template.body_html.replace( - "${ctx.get('job_exception') and ctx.get('job_exception').value", - "${ctx.get('job_exception')", - ) diff --git a/scheduler_error_mailer/migrations/12.0.1.2.0/post-migration.py b/scheduler_error_mailer/migrations/12.0.1.2.0/post-migration.py deleted file mode 100644 index b38dd794150..00000000000 --- a/scheduler_error_mailer/migrations/12.0.1.2.0/post-migration.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2021 Tecnativa - Víctor Martínez -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - -from openupgradelib import openupgrade - - -@openupgrade.migrate() -def migrate(env, version): - template = env.ref("scheduler_error_mailer.scheduler_error_mailer") - template.body_html = template.body_html.replace( - "${object.model or ''}", "${object.model_id.name or ''}" - ) - template.body_html = template.body_html.replace( - "
                                  • Method : ${object.function or ''}
                                  • ", "" - ) - template.body_html = template.body_html.replace( - "
                                  • Arguments : ${object.args or ''}
                                  • ", - "
                                  • Python code : ${object.code or ''}
                                  • ", - ) diff --git a/scheduler_error_mailer/models/ir_cron.py b/scheduler_error_mailer/models/ir_cron.py index 74a699a1f89..7756af433ea 100644 --- a/scheduler_error_mailer/models/ir_cron.py +++ b/scheduler_error_mailer/models/ir_cron.py @@ -25,7 +25,7 @@ class IrCron(models.Model): def _handle_callback_exception( self, cron_name, server_action_id, job_id, job_exception ): - res = super(IrCron, self)._handle_callback_exception( + res = super()._handle_callback_exception( cron_name, server_action_id, job_id, job_exception ) my_cron = self.browse(job_id) @@ -33,16 +33,12 @@ def _handle_callback_exception( 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, - } + context = {"job_exception": str(job_exception), "dbname": self._cr.dbname} _logger.debug("Sending scheduler error email with context=%s", context) - self.env["mail.template"].browse(my_cron.email_template_id.id).with_context( - context - ).sudo().send_mail(my_cron.id, force_send=True) + template = my_cron.email_template_id.with_context(context).sudo() + template.send_mail(my_cron.id, force_send=True) return res diff --git a/scheduler_error_mailer/readme/CONTRIBUTORS.rst b/scheduler_error_mailer/readme/CONTRIBUTORS.rst index 496cedb9f2f..afcb6d0584e 100644 --- a/scheduler_error_mailer/readme/CONTRIBUTORS.rst +++ b/scheduler_error_mailer/readme/CONTRIBUTORS.rst @@ -7,3 +7,4 @@ * `Tecnativa `_: * Cristina Martin R. + * Víctor Martínez diff --git a/scheduler_error_mailer/static/description/index.html b/scheduler_error_mailer/static/description/index.html index 2586581cf90..2ca0c9d00d3 100644 --- a/scheduler_error_mailer/static/description/index.html +++ b/scheduler_error_mailer/static/description/index.html @@ -367,7 +367,7 @@

                                    Scheduler Error Mailer

                                    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

                                    +

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

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

                                    Table of contents

                                    @@ -396,7 +396,7 @@

                                    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.

                                    +feedback.

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

                                    @@ -418,6 +418,7 @@

                                    Contributors

                                  • Achraf Mhadhbi <machraf@bloopark.de>
                                  • Tecnativa:
                                    • Cristina Martin R.
                                    • +
                                    • Víctor Martínez
                                  @@ -429,7 +430,7 @@

                                  Maintainers

                                  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.

                                  +

                                  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.

              From 873a0701fae085a5866ec679bdeb6496ea09cf46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Ernesto=20Garc=C3=ADa=20Medina?= Date: Mon, 13 Feb 2023 12:17:40 -0600 Subject: [PATCH 16/29] [IMP] scheduler_error_mailer: black, isort, prettier --- scheduler_error_mailer/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scheduler_error_mailer/__manifest__.py b/scheduler_error_mailer/__manifest__.py index 8649d8165e0..4827c49ac0c 100644 --- a/scheduler_error_mailer/__manifest__.py +++ b/scheduler_error_mailer/__manifest__.py @@ -6,7 +6,7 @@ { "name": "Scheduler Error Mailer", - "version": "13.0.1.0.0", + "version": "15.0.1.0.0", "category": "Extra Tools", "license": "AGPL-3", "author": "Akretion,Sodexis,Odoo Community Association (OCA)", From e98a44608ed0ff56386a54d8a59fd354af753965 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Ernesto=20Garc=C3=ADa=20Medina?= Date: Mon, 13 Feb 2023 12:55:59 -0600 Subject: [PATCH 17/29] [MIG] scheduler_error_mailer: Migration to 15.0 --- scheduler_error_mailer/README.rst | 10 +- .../data/ir_cron_email_tpl.xml | 50 +++--- scheduler_error_mailer/demo/ir_cron_demo.xml | 38 ++--- scheduler_error_mailer/i18n/de.po | 45 ++--- scheduler_error_mailer/i18n/es.po | 40 +++-- scheduler_error_mailer/i18n/es_AR.po | 161 +++++++++++++----- scheduler_error_mailer/i18n/fr.po | 46 ++--- scheduler_error_mailer/i18n/hr.po | 40 +++-- scheduler_error_mailer/i18n/pt.po | 40 +++-- scheduler_error_mailer/i18n/pt_BR.po | 45 ++--- .../i18n/scheduler_error_mailer.pot | 33 ++-- scheduler_error_mailer/i18n/sl.po | 45 ++--- scheduler_error_mailer/i18n/zh_CN.po | 45 ++--- scheduler_error_mailer/models/ir_cron.py | 3 +- .../static/description/index.html | 6 +- 15 files changed, 390 insertions(+), 257 deletions(-) diff --git a/scheduler_error_mailer/README.rst b/scheduler_error_mailer/README.rst index 78297aef5d5..ca834b04c46 100644 --- a/scheduler_error_mailer/README.rst +++ b/scheduler_error_mailer/README.rst @@ -14,13 +14,13 @@ Scheduler Error Mailer :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/13.0/scheduler_error_mailer + :target: https://github.com/OCA/server-tools/tree/15.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-13-0/server-tools-13-0-scheduler_error_mailer + :target: https://translation.odoo-community.org/projects/server-tools-15-0/server-tools-15-0-scheduler_error_mailer :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/149/13.0 + :target: https://runbot.odoo-community.org/runbot/149/15.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -47,7 +47,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -87,6 +87,6 @@ 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. +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/data/ir_cron_email_tpl.xml b/scheduler_error_mailer/data/ir_cron_email_tpl.xml index 6635d080ab1..53f8efd0999 100644 --- a/scheduler_error_mailer/data/ir_cron_email_tpl.xml +++ b/scheduler_error_mailer/data/ir_cron_email_tpl.xml @@ -1,46 +1,44 @@ - - - - - Scheduler Error - ${object.user_id.email or ''} - ${object.user_id.email or ''} - [DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED - - - + + + + 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 ${object.name or ''} in the database ${ctx.get('dbname')} but it failed. Here is the error message :

              +

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

              -${ctx.get('job_exception') or 'Failed to get the error message from the context.'} +

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

              -

              Properties of the scheduler ${object.name or ''} :

              +

              Properties of the scheduler :

                -
              • Model : ${object.model_id.name or ''}
              • -
              • Python code : ${object.code or ''}
              • -
              • Interval : ${object.interval_number or '0'} ${object.interval_type or ''}
              • -
              • Number of calls : ${object.numbercall or '0'}
              • -
              • Repeat missed : ${object.doall}
              • -
              • User : ${object.user_id.name or ''}
              • +
              • Model :
              • +
              • Python code :
              • +
              • Interval :
              • +
              • Number of calls :
              • +
              • Repeat missed :
              • +
              • User :

              --
              Automatic e-mail sent by Odoo. Do not reply.
              -Database : ${ctx.get('dbname')} +Database :

            ]]> - - - + + diff --git a/scheduler_error_mailer/demo/ir_cron_demo.xml b/scheduler_error_mailer/demo/ir_cron_demo.xml index d7b10fb6651..cb850e0369b 100644 --- a/scheduler_error_mailer/demo/ir_cron_demo.xml +++ b/scheduler_error_mailer/demo/ir_cron_demo.xml @@ -6,24 +6,22 @@ Copyright (C) 2018 bloopark systems () The licence is in the file __openerp__.py --> - - - - Test Scheduler Error Mailer - - - 1 - hours - -1 - - - - code - model._test_scheduler_failure() - - - + + + Test Scheduler Error Mailer + + + 1 + hours + -1 + + + + code + model._test_scheduler_failure() + + diff --git a/scheduler_error_mailer/i18n/de.po b/scheduler_error_mailer/i18n/de.po index 6cb92555e7f..6b2b94251b8 100644 --- a/scheduler_error_mailer/i18n/de.po +++ b/scheduler_error_mailer/i18n/de.po @@ -26,42 +26,42 @@ msgid "" "
            \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" +"

            Odoo tried to run the scheduler " +"in the database 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" "\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" +"

            Properties of the scheduler :\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" +"
            • 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 : ${ctx.get('dbname')}\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 -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check__email_template_id msgid "Error E-mail Template" msgstr "Fehler e-Mail Vorlage" @@ -70,9 +70,13 @@ msgstr "Fehler e-Mail Vorlage" 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 -#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check__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 " @@ -93,8 +97,11 @@ 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 "[DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FEHLER" +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" diff --git a/scheduler_error_mailer/i18n/es.po b/scheduler_error_mailer/i18n/es.po index 01c261fca20..16799c86553 100644 --- a/scheduler_error_mailer/i18n/es.po +++ b/scheduler_error_mailer/i18n/es.po @@ -27,42 +27,42 @@ msgid "" "
            \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" +"

            Odoo tried to run the scheduler " +"in the database 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" "\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" +"

            Properties of the scheduler :\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" +"
            • 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 : ${ctx.get('dbname')}\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 -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check__email_template_id msgid "Error E-mail Template" msgstr "Plantilla de correo electrónico de error" @@ -71,9 +71,13 @@ msgstr "Plantilla de correo electrónico de error" 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 -#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check__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 " @@ -94,7 +98,7 @@ 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" +msgid "[DB {{ctx.get('dbname')}}] Scheduler '{{object.name or ''}}' FAILED" msgstr "" #, fuzzy diff --git a/scheduler_error_mailer/i18n/es_AR.po b/scheduler_error_mailer/i18n/es_AR.po index 3a9ce996640..bfdb9f9826e 100644 --- a/scheduler_error_mailer/i18n/es_AR.po +++ b/scheduler_error_mailer/i18n/es_AR.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2022-03-27 21:17+0000\n" +"PO-Revision-Date: 2023-03-04 18:23+0000\n" "Last-Translator: Ignacio Buioli \n" "Language-Team: none\n" "Language: es_AR\n" @@ -14,7 +14,7 @@ msgstr "" "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" +"X-Generator: Weblate 4.14.1\n" #. module: scheduler_error_mailer #: model:mail.template,body_html:scheduler_error_mailer.scheduler_error_mailer @@ -24,78 +24,79 @@ msgid "" "
            \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" +"

            Odoo tried to run the scheduler " +"in the database 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" "\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" +"

            Properties of the scheduler :\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" +"
            • 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 : ${ctx.get('dbname')}\n" +"Database : \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" +"

            Odoo trató de ejecutar el planificador en la base de datos 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" "\n" -"

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

            \n" +"

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

            \n" +"\n" +"

            Propiedad del planificador :

            " "\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" +"
            • 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 : ${ctx.get('dbname')}\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 -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check__email_template_id msgid "Error E-mail Template" msgstr "Plantilla de correo electrónico del error" @@ -104,9 +105,13 @@ msgstr "Plantilla de correo electrónico del error" 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 -#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check__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 " @@ -127,5 +132,85 @@ 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 ''}' FALLÓ" +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 index 1cc94a50715..5b025ffe891 100644 --- a/scheduler_error_mailer/i18n/fr.po +++ b/scheduler_error_mailer/i18n/fr.po @@ -24,42 +24,42 @@ msgid "" "
            \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" +"

            Odoo tried to run the scheduler " +"in the database 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" "\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" +"

            Properties of the scheduler :\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" +"
            • 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 : ${ctx.get('dbname')}\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 -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check__email_template_id msgid "Error E-mail Template" msgstr "Modèle d’e-mail d’erreur" @@ -68,9 +68,13 @@ msgstr "Modèle d’e-mail d’erreur" 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 -#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check__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 " @@ -91,8 +95,12 @@ msgstr "Test du mailer d’erreur du planificateur" #. module: scheduler_error_mailer #: model:mail.template,subject:scheduler_error_mailer.scheduler_error_mailer -msgid "[DB ${ctx.get('dbname')}] Scheduler '${object.name or ''}' FAILED" -msgstr "[DB ${ctx.get('dbname')}] Planificateur '${object.name or ''}' ECHEC" +msgid "[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" diff --git a/scheduler_error_mailer/i18n/hr.po b/scheduler_error_mailer/i18n/hr.po index cf5fc98c28e..014f527aeb5 100644 --- a/scheduler_error_mailer/i18n/hr.po +++ b/scheduler_error_mailer/i18n/hr.po @@ -27,42 +27,42 @@ msgid "" "
            \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" +"

            Odoo tried to run the scheduler " +"in the database 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" "\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" +"

            Properties of the scheduler :\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" +"
            • 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 : ${ctx.get('dbname')}\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 -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check__email_template_id msgid "Error E-mail Template" msgstr "" @@ -71,9 +71,13 @@ msgstr "" 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 -#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check__email_template_id msgid "Select the email template that will be sent when this scheduler fails." msgstr "" @@ -92,7 +96,7 @@ 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" +msgid "[DB {{ctx.get('dbname')}}] Scheduler '{{object.name or ''}}' FAILED" msgstr "" #~ msgid "ir.cron" diff --git a/scheduler_error_mailer/i18n/pt.po b/scheduler_error_mailer/i18n/pt.po index 28764f3ce17..8908124b5e4 100644 --- a/scheduler_error_mailer/i18n/pt.po +++ b/scheduler_error_mailer/i18n/pt.po @@ -24,42 +24,42 @@ msgid "" "
            \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" +"

            Odoo tried to run the scheduler " +"in the database 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" "\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" +"

            Properties of the scheduler :\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" +"
            • 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 : ${ctx.get('dbname')}\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 -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check__email_template_id msgid "Error E-mail Template" msgstr "Modelo do E-mail de Erro" @@ -68,9 +68,13 @@ msgstr "Modelo do E-mail de Erro" 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 -#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check__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." @@ -90,5 +94,5 @@ 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" +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 index 3deac86140d..825a0c835c8 100644 --- a/scheduler_error_mailer/i18n/pt_BR.po +++ b/scheduler_error_mailer/i18n/pt_BR.po @@ -28,42 +28,42 @@ msgid "" "
            \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" +"

            Odoo tried to run the scheduler " +"in the database 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" "\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" +"

            Properties of the scheduler :\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" +"
            • 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 : ${ctx.get('dbname')}\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 -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check__email_template_id msgid "Error E-mail Template" msgstr "Modelo de Erro de E-mail" @@ -72,9 +72,13 @@ msgstr "Modelo de Erro de E-mail" 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 -#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check__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." @@ -94,8 +98,11 @@ 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 "[DB ${ctx.get('dbname')}] Agendador '${object.name or ''}' FALHOU" +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" diff --git a/scheduler_error_mailer/i18n/scheduler_error_mailer.pot b/scheduler_error_mailer/i18n/scheduler_error_mailer.pot index 4b969fbdcb1..3bc4c0155ff 100644 --- a/scheduler_error_mailer/i18n/scheduler_error_mailer.pot +++ b/scheduler_error_mailer/i18n/scheduler_error_mailer.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 13.0\n" +"Project-Id-Version: Odoo Server 15.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -20,37 +20,36 @@ msgid "" " \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" +"

            Odoo tried to run the scheduler in the database 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" "\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" +"

            Properties of the scheduler :

            \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" +"
            • 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 : ${ctx.get('dbname')}\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 -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check__email_template_id msgid "Error E-mail Template" msgstr "" @@ -59,9 +58,13 @@ msgstr "" 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 -#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check__email_template_id msgid "Select the email template that will be sent when this scheduler fails." msgstr "" @@ -80,5 +83,5 @@ 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" +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 index aed38e8a2e2..130e5aed612 100644 --- a/scheduler_error_mailer/i18n/sl.po +++ b/scheduler_error_mailer/i18n/sl.po @@ -27,42 +27,42 @@ msgid "" "
            \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" +"

            Odoo tried to run the scheduler " +"in the database 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" "\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" +"

            Properties of the scheduler :\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" +"
            • 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 : ${ctx.get('dbname')}\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 -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check__email_template_id msgid "Error E-mail Template" msgstr "Predloga obvestila o napaki" @@ -71,9 +71,13 @@ msgstr "Predloga obvestila o napaki" 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 -#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check__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." @@ -92,9 +96,12 @@ 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" +msgid "[DB {{ctx.get('dbname')}}] Scheduler '{{object.name or ''}}' FAILED" msgstr "" -"[DB ${ctx.get('dbname')}] Razporejevalec '${object.name or ''}' NEUSPEŠEN" + +#~ 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" diff --git a/scheduler_error_mailer/i18n/zh_CN.po b/scheduler_error_mailer/i18n/zh_CN.po index 0c77709ebc7..3e4e0fa9e0a 100644 --- a/scheduler_error_mailer/i18n/zh_CN.po +++ b/scheduler_error_mailer/i18n/zh_CN.po @@ -28,42 +28,42 @@ msgid "" "
            \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" +"

            Odoo tried to run the scheduler " +"in the database 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" "\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" +"

            Properties of the scheduler :\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" +"
            • 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 : ${ctx.get('dbname')}\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 -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_nsca_check__email_template_id msgid "Error E-mail Template" msgstr "错误E-mail 模板" @@ -72,9 +72,13 @@ msgstr "错误E-mail 模板" 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 -#: model:ir.model.fields,help:scheduler_error_mailer.field_nsca_check__email_template_id msgid "Select the email template that will be sent when this scheduler fails." msgstr "选择此调度程序失败时将发送的电子邮件模板。" @@ -93,8 +97,11 @@ 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 "[DB ${ctx.get('dbname')}] 调度'${object.name or ''}' 失败" +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" diff --git a/scheduler_error_mailer/models/ir_cron.py b/scheduler_error_mailer/models/ir_cron.py index 7756af433ea..eeb28987319 100644 --- a/scheduler_error_mailer/models/ir_cron.py +++ b/scheduler_error_mailer/models/ir_cron.py @@ -16,6 +16,7 @@ class IrCron(models.Model): 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.", @@ -37,7 +38,7 @@ def _handle_callback_exception( _logger.debug("Sending scheduler error email with context=%s", context) - template = my_cron.email_template_id.with_context(context).sudo() + template = my_cron.email_template_id.with_context(**context).sudo() template.send_mail(my_cron.id, force_send=True) return res diff --git a/scheduler_error_mailer/static/description/index.html b/scheduler_error_mailer/static/description/index.html index 2ca0c9d00d3..2635bb26848 100644 --- a/scheduler_error_mailer/static/description/index.html +++ b/scheduler_error_mailer/static/description/index.html @@ -367,7 +367,7 @@

            Scheduler Error Mailer

            !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

            +

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

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

            Table of contents

            @@ -396,7 +396,7 @@

            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.

            +feedback.

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

            @@ -430,7 +430,7 @@

            Maintainers

            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.

            +

            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.

          From fcc42c1c46559cb54269ec6882b7016f953797db Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Fri, 7 Apr 2023 20:51:51 +0200 Subject: [PATCH 18/29] [MIG] scheduler_error_mailer --- scheduler_error_mailer/README.rst | 14 +++++++------- scheduler_error_mailer/__manifest__.py | 2 +- .../static/description/index.html | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/scheduler_error_mailer/README.rst b/scheduler_error_mailer/README.rst index ca834b04c46..f21012f4727 100644 --- a/scheduler_error_mailer/README.rst +++ b/scheduler_error_mailer/README.rst @@ -14,14 +14,14 @@ Scheduler Error Mailer :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/15.0/scheduler_error_mailer + :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-15-0/server-tools-15-0-scheduler_error_mailer + :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/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/149/15.0 - :alt: Try me on Runbot +.. |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| @@ -47,7 +47,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -87,6 +87,6 @@ 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. +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/__manifest__.py b/scheduler_error_mailer/__manifest__.py index 4827c49ac0c..5223a09705d 100644 --- a/scheduler_error_mailer/__manifest__.py +++ b/scheduler_error_mailer/__manifest__.py @@ -6,7 +6,7 @@ { "name": "Scheduler Error Mailer", - "version": "15.0.1.0.0", + "version": "16.0.1.0.0", "category": "Extra Tools", "license": "AGPL-3", "author": "Akretion,Sodexis,Odoo Community Association (OCA)", diff --git a/scheduler_error_mailer/static/description/index.html b/scheduler_error_mailer/static/description/index.html index 2635bb26848..889f87e5fdd 100644 --- a/scheduler_error_mailer/static/description/index.html +++ b/scheduler_error_mailer/static/description/index.html @@ -3,7 +3,7 @@ - + Scheduler Error Mailer -
          -

          Scheduler Error Mailer

          +
          + + +Odoo Community Association + +
          +

          Scheduler Error Mailer

          -

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

          +

          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

          @@ -386,7 +391,7 @@

          Scheduler Error Mailer

        -

        Configuration

        +

        Configuration

        To configure this module, you need to:

        1. Go to Settings -> Technical -> Automation -> Scheduled Actions
        2. @@ -395,7 +400,7 @@

          Configuration

        -

        Bug Tracker

        +

        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 @@ -403,16 +408,16 @@

        Bug Tracker

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

        -

        Credits

        +

        Credits

        -

        Authors

        +

        Authors

        • Akretion
        • Sodexis
        -

        Contributors

        +

        Contributors

        -

        Maintainers

        +

        Maintainers

        This module is maintained by the OCA.

        Odoo Community Association @@ -444,5 +449,6 @@

        Maintainers

        +
      From 43b42d4a99550700d230ea940f130393896bed5a Mon Sep 17 00:00:00 2001 From: Quoc - Pham Ngoc Date: Sat, 24 Jan 2026 09:45:53 +0700 Subject: [PATCH 26/29] [IMP] scheduler_error_mailer: pre-commit execution --- scheduler_error_mailer/models/ir_cron.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scheduler_error_mailer/models/ir_cron.py b/scheduler_error_mailer/models/ir_cron.py index f001c873e46..8a6217d7682 100644 --- a/scheduler_error_mailer/models/ir_cron.py +++ b/scheduler_error_mailer/models/ir_cron.py @@ -18,8 +18,7 @@ class IrCron(models.Model): 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.", + 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 ), From da5b58b5d9ff0c0359e3d0eac8b166ed472061d2 Mon Sep 17 00:00:00 2001 From: Quoc - Pham Ngoc Date: Mon, 26 Jan 2026 09:54:11 +0700 Subject: [PATCH 27/29] [MIG] scheduler_error_mailer: Migration to 19.0 --- scheduler_error_mailer/README.rst | 10 +++++----- scheduler_error_mailer/__manifest__.py | 2 +- scheduler_error_mailer/models/ir_cron.py | 9 +++++++-- .../static/description/index.html | 6 +++--- .../tests/test_scheduler_error_mailer.py | 13 ++++++++++++- 5 files changed, 28 insertions(+), 12 deletions(-) diff --git a/scheduler_error_mailer/README.rst b/scheduler_error_mailer/README.rst index 30cc2896942..094069425ec 100644 --- a/scheduler_error_mailer/README.rst +++ b/scheduler_error_mailer/README.rst @@ -21,13 +21,13 @@ Scheduler Error Mailer :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 + :target: https://github.com/OCA/server-tools/tree/19.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 + :target: https://translation.odoo-community.org/projects/server-tools-19-0/server-tools-19-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 + :target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=19.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -55,7 +55,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -98,6 +98,6 @@ 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. +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/__manifest__.py b/scheduler_error_mailer/__manifest__.py index 7a6bb8814df..fbd4fd3c8ec 100644 --- a/scheduler_error_mailer/__manifest__.py +++ b/scheduler_error_mailer/__manifest__.py @@ -6,7 +6,7 @@ { "name": "Scheduler Error Mailer", - "version": "18.0.1.0.0", + "version": "19.0.1.0.0", "category": "Extra Tools", "license": "AGPL-3", "author": "Akretion,Sodexis,Odoo Community Association (OCA)", diff --git a/scheduler_error_mailer/models/ir_cron.py b/scheduler_error_mailer/models/ir_cron.py index 8a6217d7682..a2c4297acea 100644 --- a/scheduler_error_mailer/models/ir_cron.py +++ b/scheduler_error_mailer/models/ir_cron.py @@ -29,7 +29,10 @@ def _handle_callback_exception(self, cron_name, server_action_id, job_exception) 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} + context = { + "job_exception": str(job_exception), + "dbname": self.env.cr.dbname, + } _logger.debug("Sending scheduler error email with context=%s", context) @@ -39,7 +42,9 @@ def _handle_callback_exception(self, cron_name, server_action_id, job_exception) @api.model def _test_scheduler_failure(self): """This function is used to test and debug this module.""" - raise UserError(self.env._("Task failure with UID = %(uid)d.", uid=self._uid)) + raise UserError( + self.env._("Task failure with UID = %(uid)d.", uid=self.env.uid) + ) @api.model def _callback(self, cron_name, server_action_id): diff --git a/scheduler_error_mailer/static/description/index.html b/scheduler_error_mailer/static/description/index.html index 1951a6136b2..5e0073cb200 100644 --- a/scheduler_error_mailer/static/description/index.html +++ b/scheduler_error_mailer/static/description/index.html @@ -374,7 +374,7 @@

      Scheduler Error Mailer

      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:a8e6bce11d3a37dc2e2cbd48c0cd58bf158ffed0ee83994c75cdb0f5a55541b0 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

      +

      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

      @@ -404,7 +404,7 @@

      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.

      +feedback.

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

      @@ -444,7 +444,7 @@

      Maintainers

      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.

      +

      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/test_scheduler_error_mailer.py b/scheduler_error_mailer/tests/test_scheduler_error_mailer.py index 21f56f11e9c..07efc40b5ef 100644 --- a/scheduler_error_mailer/tests/test_scheduler_error_mailer.py +++ b/scheduler_error_mailer/tests/test_scheduler_error_mailer.py @@ -10,7 +10,18 @@ class TestSchedulerErrorMailer(BaseCommon): def setUp(self): super().setUp() - self.cron = self.env.ref("scheduler_error_mailer.test_scheduler_error_mailer") + self.cron = self.env["ir.cron"].create( + { + "name": "Test Scheduler Error Mailer", + "active": False, + "user_id": self.env.ref("base.user_root").id, + "interval_number": 1, + "interval_type": "hours", + "model_id": self.env.ref("base.model_ir_cron").id, + "state": "code", + "code": "model._test_scheduler_failure()", + } + ) def test_error_cron(self): with ( From dd5024860361dfeb39435231bb34d30cf414bd48 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Wed, 6 May 2026 12:07:34 +0000 Subject: [PATCH 28/29] [UPD] Update scheduler_error_mailer.pot --- .../i18n/scheduler_error_mailer.pot | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/scheduler_error_mailer/i18n/scheduler_error_mailer.pot b/scheduler_error_mailer/i18n/scheduler_error_mailer.pot index eb3f519ba48..89f0ca94159 100644 --- a/scheduler_error_mailer/i18n/scheduler_error_mailer.pot +++ b/scheduler_error_mailer/i18n/scheduler_error_mailer.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 18.0\n" +"Project-Id-Version: Odoo Server 19.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -45,8 +45,8 @@ msgid "" msgstr "" #. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__assigned_attachment_ids -msgid "Assigned Attachments" +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__display_name +msgid "Display Name" msgstr "" #. module: scheduler_error_mailer @@ -54,6 +54,11 @@ msgstr "" msgid "Error E-mail Template" msgstr "" +#. module: scheduler_error_mailer +#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__id +msgid "ID" +msgstr "" + #. module: scheduler_error_mailer #: model:ir.model,name:scheduler_error_mailer.model_ir_cron msgid "Scheduled Actions" @@ -69,22 +74,12 @@ msgstr "" msgid "Select the email template that will be sent when this scheduler fails." msgstr "" -#. module: scheduler_error_mailer -#: model:ir.model.fields,field_description:scheduler_error_mailer.field_ir_cron__smart_search -msgid "Smart Search" -msgstr "" - #. module: scheduler_error_mailer #. odoo-python #: code:addons/scheduler_error_mailer/models/ir_cron.py:0 msgid "Task failure with UID = %(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" From c98f66245cee5862956cbe928807a7f4597d7c19 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Wed, 6 May 2026 12:11:07 +0000 Subject: [PATCH 29/29] [BOT] post-merge updates --- README.md | 1 + scheduler_error_mailer/README.rst | 2 +- scheduler_error_mailer/static/description/index.html | 2 +- setup/_metapackage/pyproject.toml | 3 ++- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7f97c760e2e..65dbce1008c 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ addon | version | maintainers | summary [module_change_auto_install](module_change_auto_install/) | 19.0.1.0.0 | legalsylvain | Customize auto installables modules by configuration [onchange_helper](onchange_helper/) | 19.0.1.0.0 | | Technical module that ease execution of onchange in Python code [rpc_helper](rpc_helper/) | 19.0.1.0.0 | simahawk | Helpers for disabling RPC calls +[scheduler_error_mailer](scheduler_error_mailer/) | 19.0.1.0.0 | | Scheduler Error Mailer [sequence_python](sequence_python/) | 19.0.1.0.0 | | Calculate a sequence number from a Python expression [session_db](session_db/) | 19.0.1.0.0 | sbidoul | Store sessions in DB [test_auditlog](test_auditlog/) | 19.0.1.0.0 | | Additional unit tests for Audit Log based on accounting models diff --git a/scheduler_error_mailer/README.rst b/scheduler_error_mailer/README.rst index 094069425ec..267498891bf 100644 --- a/scheduler_error_mailer/README.rst +++ b/scheduler_error_mailer/README.rst @@ -11,7 +11,7 @@ Scheduler Error Mailer !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:a8e6bce11d3a37dc2e2cbd48c0cd58bf158ffed0ee83994c75cdb0f5a55541b0 + !! source digest: sha256:dfecae1586cd75b1a21d6685e8994b3ed915a0e53720b17859538c6ad4ba989a !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/scheduler_error_mailer/static/description/index.html b/scheduler_error_mailer/static/description/index.html index 5e0073cb200..f12ac3edc95 100644 --- a/scheduler_error_mailer/static/description/index.html +++ b/scheduler_error_mailer/static/description/index.html @@ -372,7 +372,7 @@

    Scheduler Error Mailer

    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:a8e6bce11d3a37dc2e2cbd48c0cd58bf158ffed0ee83994c75cdb0f5a55541b0 +!! source digest: sha256:dfecae1586cd75b1a21d6685e8994b3ed915a0e53720b17859538c6ad4ba989a !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

    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 diff --git a/setup/_metapackage/pyproject.toml b/setup/_metapackage/pyproject.toml index 8459dabca85..033361f4f28 100644 --- a/setup/_metapackage/pyproject.toml +++ b/setup/_metapackage/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "odoo-addons-oca-server-tools" -version = "19.0.20260428.0" +version = "19.0.20260506.0" dependencies = [ "odoo-addon-auditlog==19.0.*", "odoo-addon-base_cron_exclusion==19.0.*", @@ -17,6 +17,7 @@ dependencies = [ "odoo-addon-module_change_auto_install==19.0.*", "odoo-addon-onchange_helper==19.0.*", "odoo-addon-rpc_helper==19.0.*", + "odoo-addon-scheduler_error_mailer==19.0.*", "odoo-addon-sequence_python==19.0.*", "odoo-addon-session_db==19.0.*", "odoo-addon-test_auditlog==19.0.*",