From 2f2053c8d02591c4d65924f0538e47ad7e81f87f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 7 Apr 2009 19:22:11 +0200 Subject: [PATCH] Add domain to act_to of request because active_test is in the context for issue945 --- trytond/res/request.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/trytond/res/request.py b/trytond/res/request.py index 446811d9c1..ee0915632f 100644 --- a/trytond/res/request.py +++ b/trytond/res/request.py @@ -34,10 +34,11 @@ class Request(ModelSQL, ModelView): act_from = fields.Many2One('res.user', 'From', required=True, readonly=True) act_to = fields.Many2One('res.user', 'To', required=True, - states={ - 'readonly': "(state in ('waiting', 'closed')) or " \ - "(state == 'chatting' and act_from != _user)", - }) + domain=[('active', '=', True)], + states={ + 'readonly': "(state in ('waiting', 'closed')) or " \ + "(state == 'chatting' and act_from != _user)", + }) body = fields.Text('Body', states={ 'readonly': "(state in ('waiting', 'closed')) or " \ "(state == 'chatting' and act_from != _user)",