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

pull/57/head
david.beal@akretion.com 2014-09-15 21:44:29 +02:00
parent 825a26dd8f
commit 506fa5b0ef
3 changed files with 5 additions and 5 deletions

View File

@ -35,9 +35,9 @@ class ir_cron(orm.Model):
_inherit = "ir.cron" _inherit = "ir.cron"
_columns = { _columns = {
'email_template': fields.many2one( 'email_template_id': fields.many2one('email.template',
'email.template',
'Error E-mail Template', 'Error E-mail Template',
oldname="email_template",
help="Select the email template that will be " help="Select the email template that will be "
"sent when this scheduler fails."), "sent when this scheduler fails."),
} }
@ -50,7 +50,7 @@ class ir_cron(orm.Model):
my_cron = self.browse(cr, uid, job_id) 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 # we put the job_exception in context to be able to print it inside
# the email template # the email template
context = { context = {

View File

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

View File

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