From 91f27f64fd8b4728e4263cfaf2758f867cc2d5bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 31 Aug 2026 13:39:42 +0200 Subject: [PATCH] Permit to set _check_access when using trytond config --- proteus/CHANGELOG | 1 + proteus/proteus/config.py | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/proteus/CHANGELOG b/proteus/CHANGELOG index 65ff90f175..8022c901ae 100644 --- a/proteus/CHANGELOG +++ b/proteus/CHANGELOG @@ -1,3 +1,4 @@ +* Permit to set _check_access when using trytond config Version 8.0.0 - 2026-04-20 -------------------------- diff --git a/proteus/proteus/config.py b/proteus/proteus/config.py index 211fa40d8a..34035860a4 100644 --- a/proteus/proteus/config.py +++ b/proteus/proteus/config.py @@ -204,6 +204,13 @@ class _TrytondMethod(object): = 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(