changeset c9b0bdd34b75 in trytond:default
details: https://hg.tryton.org/trytond?cmd=changeset;node=c9b0bdd34b75
description:
        Skip check access on ir.ui.menu for wizard

        User launching a wizard from menu should not need write access on the 
menu.

        issue9173
        review301161002
diffstat:

 trytond/wizard/wizard.py |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 392e44a1e0b8 -r c9b0bdd34b75 trytond/wizard/wizard.py
--- a/trytond/wizard/wizard.py  Wed Mar 25 17:34:35 2020 +0100
+++ b/trytond/wizard/wizard.py  Thu Mar 26 00:12:43 2020 +0100
@@ -232,7 +232,7 @@
 
         with Transaction().set_context(_check_access=True):
             model = context.get('active_model')
-            if model:
+            if model and model != 'ir.ui.menu':
                 ModelAccess.check(model, 'read')
             groups = set(User.get_groups())
             wizard_groups = ActionWizard.get_groups(cls.__name__,
@@ -241,7 +241,7 @@
                 if not groups & wizard_groups:
                     raise UserError('Calling wizard %s is not allowed!'
                         % cls.__name__)
-            elif model:
+            elif model and model != 'ir.ui.menu':
                 ModelAccess.check(model, 'write')
 
     @classmethod

Reply via email to