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
This commit is contained in:
1 parent
83b1f967a0
commit
0de081096f
1 file changed
+3
-3
+3
-3
@@ -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',
|
||||
|
||||
Reference in new issue
Block a user