Add skip warning on trytond configuration

Closes #12954
This commit is contained in:
Cédric Krier
2024-01-22 10:03:16 +01:00
parent c5eb6248a9
commit 5e10e9df21
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -1,3 +1,4 @@
* Add skip warning on trytond configuration
Version 7.0.0 - 2023-10-30
--------------------------
+3
View File
@@ -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)