From 0de081096feb447490fd0657e25b11fbf300b94b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 5 Aug 2011 01:42:45 +0200 Subject: [PATCH] Don't make action depend on login login field is not in the preference fields so action can not depend on it because otherwise the preferences dialog will not be valided. issue2125 --- trytond/res/user.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/trytond/res/user.py b/trytond/res/user.py index ef203b32b3..d0371e2952 100644 --- a/trytond/res/user.py +++ b/trytond/res/user.py @@ -16,7 +16,7 @@ from trytond.backend import TableHandler from trytond.security import get_connections from trytond.transaction import Transaction from trytond.cache import Cache -from trytond.pyson import Eval, Not, Equal +from trytond.pyson import Eval, Bool from trytond.pool import Pool @@ -31,8 +31,8 @@ class User(ModelSQL, ModelView): signature = fields.Text('Signature') active = fields.Boolean('Active') action = fields.Many2One('ir.action', 'Home Action', states={ - 'required': Not(Equal(Eval('login'), 'root')), - }, depends=['login']) + 'required': Bool(Eval('id')), + }, depends=['id']) menu = fields.Many2One('ir.action', 'Menu Action', domain=[('usage','=','menu')], required=True) groups = fields.Many2Many('res.user-res.group',