Prevent access rule error on act_window
review656003 (transplanted from ccbae69cd482628aa4d0114b2842a2684d8d1dfc)
This commit is contained in:
1 parent
bc02fad223
commit
ca53a96ea7
1 file changed
+6
@@ -3,6 +3,7 @@
|
||||
from trytond.model import ModelView, ModelSQL, fields
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.backend import TableHandler
|
||||
from trytond.pyson import Eval
|
||||
|
||||
__all__ = ['DashboardAction']
|
||||
|
||||
@@ -19,6 +20,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),
|
||||
],
|
||||
])
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in new issue
Block a user