diff --git a/dashboard.py b/dashboard.py index 83eb03a4a1..d6f684da88 100644 --- a/dashboard.py +++ b/dashboard.py @@ -1,6 +1,7 @@ #This file is part of Tryton. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. from trytond.model import ModelView, ModelSQL, fields +from trytond.pyson import Eval class DashboardAction(ModelSQL, ModelView): @@ -14,6 +15,11 @@ class DashboardAction(ModelSQL, ModelView): required=True, ondelete='CASCADE', domain=[ ('res_model', '!=', None), ('res_model', '!=', ''), + # XXX copy ir.action rule to prevent access rule error + ['OR', + ('groups', 'in', Eval('context', {}).get('groups', [])), + ('groups', '=', None), + ], ]) def __init__(self):