[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:
parent
fed1b1e91c
commit
bdd86a831f
|
@ -54,7 +54,8 @@ class actions_server(osv.Model):
|
||||||
readonly=True, string='Body'
|
readonly=True, string='Body'
|
||||||
),
|
),
|
||||||
'template_id': fields.many2one(
|
'template_id': fields.many2one(
|
||||||
'email.template', 'Email Template', ondelete='set null'
|
'email.template', 'Email Template', ondelete='set null',
|
||||||
|
domain="[('model_id', '=', model_id)]",
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
<group attrs="{'invisible': [('model_id', '=', False)]}">
|
<group attrs="{'invisible': [('model_id', '=', False)]}">
|
||||||
<field name="template_id"
|
<field name="template_id"
|
||||||
on_change='on_change_template_id(template_id)'
|
on_change='on_change_template_id(template_id)'
|
||||||
domain="[('model_id', '=', model_id)]"
|
|
||||||
attrs="{'required': [('state', '=', 'email')]}"/>
|
attrs="{'required': [('state', '=', 'email')]}"/>
|
||||||
<p colspan="2" attrs="{'invisible': [('template_id', '!=', False)]}">
|
<p colspan="2" attrs="{'invisible': [('template_id', '!=', False)]}">
|
||||||
Choose a template to display its values.
|
Choose a template to display its values.
|
||||||
|
|
Loading…
Reference in New Issue