From 506fa5b0ef678e53fe4ed2e156ea7241f510c1d1 Mon Sep 17 00:00:00 2001 From: "david.beal@akretion.com" Date: Mon, 15 Sep 2014 21:44:29 +0200 Subject: [PATCH 1/2] [FIX] renamed 'email_template' m2o field in 'email_template_id' in scheduler_error_mailer module --- scheduler_error_mailer/ir_cron.py | 6 +++--- scheduler_error_mailer/ir_cron.xml | 2 +- scheduler_error_mailer/ir_cron_demo.xml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scheduler_error_mailer/ir_cron.py b/scheduler_error_mailer/ir_cron.py index 17b0f2c30..32af1d20b 100644 --- a/scheduler_error_mailer/ir_cron.py +++ b/scheduler_error_mailer/ir_cron.py @@ -35,9 +35,9 @@ class ir_cron(orm.Model): _inherit = "ir.cron" _columns = { - 'email_template': fields.many2one( - 'email.template', + '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 +50,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 = { diff --git a/scheduler_error_mailer/ir_cron.xml b/scheduler_error_mailer/ir_cron.xml index ee1bcfd6d..74a3d3edf 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 4c6fc5e7b..4c108040c 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 899fa11f973c6cea5eaef759d00353706657e28f Mon Sep 17 00:00:00 2001 From: "david.beal@akretion.com" Date: Tue, 30 Dec 2014 11:51:18 +0100 Subject: [PATCH 2/2] [FIX] pep8 --- scheduler_error_mailer/ir_cron.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scheduler_error_mailer/ir_cron.py b/scheduler_error_mailer/ir_cron.py index 32af1d20b..649c55e51 100644 --- a/scheduler_error_mailer/ir_cron.py +++ b/scheduler_error_mailer/ir_cron.py @@ -35,7 +35,8 @@ class ir_cron(orm.Model): _inherit = "ir.cron" _columns = { - 'email_template_id': fields.many2one('email.template', + 'email_template_id': fields.many2one( + 'email.template', 'Error E-mail Template', oldname="email_template", help="Select the email template that will be "