[IMP] ir_actions in email_template: template_id domain not only on view, directly on field

bzr revid: tde@openerp.com-20131003140458-ztnd9taih2rcq8ty
This commit is contained in:
Thibault Delavallée 2013-10-03 16:04:58 +02:00
parent fed1b1e91c
commit bdd86a831f
2 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,8 @@ class actions_server(osv.Model):
readonly=True, string='Body'
),
'template_id': fields.many2one(
'email.template', 'Email Template', ondelete='set null'
'email.template', 'Email Template', ondelete='set null',
domain="[('model_id', '=', model_id)]",
),
}

View File

@ -16,7 +16,6 @@
<group attrs="{'invisible': [('model_id', '=', False)]}">
<field name="template_id"
on_change='on_change_template_id(template_id)'
domain="[('model_id', '=', model_id)]"
attrs="{'required': [('state', '=', 'email')]}"/>
<p colspan="2" attrs="{'invisible': [('template_id', '!=', False)]}">
Choose a template to display its values.