[FIX] renamed 'email_template' m2o field in 'email_template_id' in scheduler_error_mailer module

pull/2602/head
david.beal@akretion.com 2014-09-15 21:44:29 +02:00 committed by OCA-git-bot
parent 78981fd86d
commit 48da528422
6 changed files with 245 additions and 5 deletions

View File

@ -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 <transbot@odoo-community.org>\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"
"<div style=\"font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n"
"\n"
"<p>OpenERP tried to run the scheduler <em>${object.name or ''}</em> in the database <em>${ctx.get('dbname')}</em> but it failed. Here is the error message :</p>\n"
"\n"
"<strong>\n"
"${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to get the error message from the context.'}\n"
"</strong>\n"
"\n"
"<p>You may check the logs of the OpenERP server to get more information about this failure.</p>\n"
"\n"
"<p>Properties of the scheduler <em>${object.name or ''}</em> :</p>\n"
"<ul>\n"
"<li>Model : ${object.model or ''}</li>\n"
"<li>Method : ${object.function or ''}</li>\n"
"<li>Arguments : ${object.args or ''}</li>\n"
"<li>Interval : ${object.interval_number or '0'} ${object.interval_type or ''}</li>\n"
"<li>Number of calls : ${object.numbercall or '0'}</li>\n"
"<li>Repeat missed : ${object.doall}</li>\n"
"<li>User : ${object.user_id.name or ''}</li>\n"
"</ul>\n"
"\n"
"<p>\n"
"-- <br/>\n"
"Automatic e-mail sent by OpenERP. Do not reply.<br/>\n"
"Database : ${ctx.get('dbname')}\n"
"</p>\n"
"</div>\n"
" "
msgstr "\n<div style=\"font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n\n<p>OpenERP tried to run the scheduler <em>${object.name or ''}</em> in the database <em>${ctx.get('dbname')}</em> but it failed. Here is the error message :</p>\n\n<strong>\n${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to get the error message from the context.'}\n</strong>\n\n<p>You may check the logs of the OpenERP server to get more information about this failure.</p>\n\n<p>Properties of the scheduler <em>${object.name or ''}</em> :</p>\n<ul>\n<li>Model : ${object.model or ''}</li>\n<li>Method : ${object.function or ''}</li>\n<li>Arguments : ${object.args or ''}</li>\n<li>Interval : ${object.interval_number or '0'} ${object.interval_type or ''}</li>\n<li>Number of calls : ${object.numbercall or '0'}</li>\n<li>Repeat missed : ${object.doall}</li>\n<li>User : ${object.user_id.name or ''}</li>\n</ul>\n\n<p>\n-- <br/>\nAutomatic e-mail sent by OpenERP. Do not reply.<br/>\nDatabase : ${ctx.get('dbname')}\n</p>\n</div>\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"

View File

@ -0,0 +1,80 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * scheduler_error_mailer
#
# Translators:
# Armando Vulcano Junior <vulcano@uol.com.br>, 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 <vulcano@uol.com.br>\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"
"<div style=\"font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n"
"\n"
"<p>OpenERP tried to run the scheduler <em>${object.name or ''}</em> in the database <em>${ctx.get('dbname')}</em> but it failed. Here is the error message :</p>\n"
"\n"
"<strong>\n"
"${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to get the error message from the context.'}\n"
"</strong>\n"
"\n"
"<p>You may check the logs of the OpenERP server to get more information about this failure.</p>\n"
"\n"
"<p>Properties of the scheduler <em>${object.name or ''}</em> :</p>\n"
"<ul>\n"
"<li>Model : ${object.model or ''}</li>\n"
"<li>Method : ${object.function or ''}</li>\n"
"<li>Arguments : ${object.args or ''}</li>\n"
"<li>Interval : ${object.interval_number or '0'} ${object.interval_type or ''}</li>\n"
"<li>Number of calls : ${object.numbercall or '0'}</li>\n"
"<li>Repeat missed : ${object.doall}</li>\n"
"<li>User : ${object.user_id.name or ''}</li>\n"
"</ul>\n"
"\n"
"<p>\n"
"-- <br/>\n"
"Automatic e-mail sent by OpenERP. Do not reply.<br/>\n"
"Database : ${ctx.get('dbname')}\n"
"</p>\n"
"</div>\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"

View File

@ -0,0 +1,80 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * scheduler_error_mailer
#
# Translators:
# Matjaž Mozetič <m.mozetic@matmoz.si>, 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č <m.mozetic@matmoz.si>\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"
"<div style=\"font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n"
"\n"
"<p>OpenERP tried to run the scheduler <em>${object.name or ''}</em> in the database <em>${ctx.get('dbname')}</em> but it failed. Here is the error message :</p>\n"
"\n"
"<strong>\n"
"${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to get the error message from the context.'}\n"
"</strong>\n"
"\n"
"<p>You may check the logs of the OpenERP server to get more information about this failure.</p>\n"
"\n"
"<p>Properties of the scheduler <em>${object.name or ''}</em> :</p>\n"
"<ul>\n"
"<li>Model : ${object.model or ''}</li>\n"
"<li>Method : ${object.function or ''}</li>\n"
"<li>Arguments : ${object.args or ''}</li>\n"
"<li>Interval : ${object.interval_number or '0'} ${object.interval_type or ''}</li>\n"
"<li>Number of calls : ${object.numbercall or '0'}</li>\n"
"<li>Repeat missed : ${object.doall}</li>\n"
"<li>User : ${object.user_id.name or ''}</li>\n"
"</ul>\n"
"\n"
"<p>\n"
"-- <br/>\n"
"Automatic e-mail sent by OpenERP. Do not reply.<br/>\n"
"Database : ${ctx.get('dbname')}\n"
"</p>\n"
"</div>\n"
" "
msgstr "\n<div style=\"font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; \">\n\n<p>OpenERP je poskušal zagnati razporejevalec <em>${object.name or ''}</em> v podatkovni bazi <em>${ctx.get('dbname')}</em> , a ni uspel. Obvestilo o napaki:</p>\n\n<strong>\n${ctx.get('job_exception') and ctx.get('job_exception').value or 'Failed to get the error message from the context.'}\n</strong>\n\n<p>Preverite dnevnike OpenERP strežnika za pridobitev več informacij o težavi.</p>\n\n<p>Lastnosti razporejevalca <em>${object.name or ''}</em> :</p>\n<ul>\n<li>Model : ${object.model or ''}</li>\n<li>Metoda : ${object.function or ''}</li>\n<li>Argumenti : ${object.args or ''}</li>\n<li>Interval : ${object.interval_number or '0'} ${object.interval_type or ''}</li>\n<li>Število klicev : ${object.numbercall or '0'}</li>\n<li>Zgrešene ponovitve : ${object.doall}</li>\n<li>Uporabnik : ${object.user_id.name or ''}</li>\n</ul>\n\n<p>\n-- <br/>\nSamodejno sporočilo poslano iz OpenERP. Ne odgovarjajte.<br/>\nPodatkovna baza : ${ctx.get('dbname')}\n</p>\n</div>\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"

View File

@ -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 @@ class ir_cron(orm.Model):
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 @@ class ir_cron(orm.Model):
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

View File

@ -14,7 +14,7 @@
<field name="inherit_id" ref="base.ir_cron_view"/>
<field name="arch" type="xml">
<field name="doall" position="after">
<field name="email_template" />
<field name="email_template_id" />
</field>
</field>
</record>

View File

@ -17,9 +17,9 @@
<field name="interval_type">hours</field>
<field name="numbercall">-1</field> <!-- don't limit the number of calls -->
<field name="doall" eval="True"/>
<field name="email_template" ref="scheduler_error_mailer"/>
<field name="model">ir.cron</field>
<field name="function">_test_scheduler_failure</field>
<field name="email_template_id" ref="scheduler_error_mailer"/>
</record>
</data>