From bdd86a831f026c0a99dd5f71e772488f2bea4eab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 3 Oct 2013 16:04:58 +0200 Subject: [PATCH] [IMP] ir_actions in email_template: template_id domain not only on view, directly on field bzr revid: tde@openerp.com-20131003140458-ztnd9taih2rcq8ty --- addons/email_template/ir_actions.py | 3 ++- addons/email_template/ir_actions_view.xml | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/email_template/ir_actions.py b/addons/email_template/ir_actions.py index 64c50651f11..ae2395e3b81 100644 --- a/addons/email_template/ir_actions.py +++ b/addons/email_template/ir_actions.py @@ -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)]", ), } diff --git a/addons/email_template/ir_actions_view.xml b/addons/email_template/ir_actions_view.xml index fae9c364312..8f5875257aa 100644 --- a/addons/email_template/ir_actions_view.xml +++ b/addons/email_template/ir_actions_view.xml @@ -16,7 +16,6 @@

Choose a template to display its values.