From d5128acc7feb3023bcc27b486d2789d9e52d1f3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 4 Feb 2013 19:56:02 +0100 Subject: [PATCH] Prevent access rule error on act_window review656003 (transplanted from ccbae69cd482628aa4d0114b2842a2684d8d1dfc) --- dashboard.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dashboard.py b/dashboard.py index 9cd4a6295a..af09d607e0 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', '!=', False), ('res_model', '!=', ''), + # XXX copy ir.action rule to prevent access rule error + ['OR', + ('groups', 'in', Eval('context', {}).get('groups', [])), + ('groups', '=', None), + ], ]) def __init__(self):