details:   https://code.tryton.org/tryton/commit/5687ccb4301e
branch:    default
user:      Cédric Krier <[email protected]>
date:      Mon Aug 31 13:39:42 2026 +0200
description:
        Permit to set _check_access when using trytond config
diffstat:

 proteus/CHANGELOG         |  1 +
 proteus/proteus/config.py |  7 +++++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diffs (25 lines):

diff -r 6c611c520744 -r 5687ccb4301e proteus/CHANGELOG
--- a/proteus/CHANGELOG Sat Sep 19 08:09:17 2026 +0200
+++ b/proteus/CHANGELOG Mon Aug 31 13:39:42 2026 +0200
@@ -1,3 +1,4 @@
+* Permit to set _check_access when using trytond config
 
 Version 8.0.0 - 2026-04-20
 --------------------------
diff -r 6c611c520744 -r 5687ccb4301e proteus/proteus/config.py
--- a/proteus/proteus/config.py Sat Sep 19 08:09:17 2026 +0200
+++ b/proteus/proteus/config.py Mon Aug 31 13:39:42 2026 +0200
@@ -204,6 +204,13 @@
                             = rpc.convert(self._object, *args, **kwargs)
                     if self._config.skip_warning:
                         transaction.context['_skip_warnings'] = True
+                    if 'context' in kwargs:
+                        ctx = kwargs['context']
+                    else:
+                        ctx = args[-1]
+                    if '_check_access' in ctx:
+                        transaction.context['_check_access'] = (
+                            ctx['_check_access'])
                     meth = getattr(self._object, self._name)
                     if (rpc.instantiate is None
                             or not is_instance_method(

Reply via email to