From 5e10e9df216be6f68fd814e18c2e39efd32f8c65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 22 Jan 2024 10:03:16 +0100 Subject: [PATCH] Add skip warning on trytond configuration Closes #12954 --- proteus/CHANGELOG | 1 + proteus/proteus/config.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/proteus/CHANGELOG b/proteus/CHANGELOG index f482ed41f2..6c48daa889 100644 --- a/proteus/CHANGELOG +++ b/proteus/CHANGELOG @@ -1,3 +1,4 @@ +* Add skip warning on trytond configuration Version 7.0.0 - 2023-10-30 -------------------------- diff --git a/proteus/proteus/config.py b/proteus/proteus/config.py index ec20ff7d76..c8a11a6cf4 100644 --- a/proteus/proteus/config.py +++ b/proteus/proteus/config.py @@ -202,6 +202,8 @@ class _TrytondMethod(object): (c_args, c_kwargs, transaction.context, transaction.timestamp) \ = rpc.convert(self._object, *args, **kwargs) + if self._config.skip_warning: + transaction.context['_skip_warnings'] = True meth = getattr(self._object, self._name) if (rpc.instantiate is None or not is_instance_method( @@ -276,6 +278,7 @@ class TrytondConfig(Config): self.database_name = database_name self._user = user self.config_file = config_file + self.skip_warning = False Pool.start() self.pool = Pool(database_name)