Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package trytond for openSUSE:Factory checked 
in at 2026-06-12 19:27:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/trytond (Old)
 and      /work/SRC/openSUSE:Factory/.trytond.new.1981 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "trytond"

Fri Jun 12 19:27:52 2026 rev:118 rq:1358802 version:7.0.51

Changes:
--------
--- /work/SRC/openSUSE:Factory/trytond/trytond.changes  2026-03-08 
17:27:09.339473334 +0100
+++ /work/SRC/openSUSE:Factory/.trytond.new.1981/trytond.changes        
2026-06-12 19:28:57.937808912 +0200
@@ -1,0 +2,5 @@
+Fri Jun 12 00:27:01 UTC 2026 - Axel Braun <[email protected]>
+
+- Version 7.0.51 - Bugfix Release
+
+-------------------------------------------------------------------

Old:
----
  trytond-7.0.46.tar.gz

New:
----
  trytond-7.0.51.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ trytond.spec ++++++
--- /var/tmp/diff_new_pack.abLlVs/_old  2026-06-12 19:28:58.733842220 +0200
+++ /var/tmp/diff_new_pack.abLlVs/_new  2026-06-12 19:28:58.737842387 +0200
@@ -30,7 +30,7 @@
 ##%%endif
 
 Name:           trytond
-Version:        %{majorver}.46
+Version:        %{majorver}.51
 Release:        0
 Summary:        An Enterprise Resource Planning (ERP) system
 License:        GPL-3.0-or-later

++++++ trytond-7.0.46.tar.gz -> trytond-7.0.51.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-7.0.46/CHANGELOG new/trytond-7.0.51/CHANGELOG
--- old/trytond-7.0.46/CHANGELOG        2026-03-02 21:54:36.000000000 +0100
+++ new/trytond-7.0.51/CHANGELOG        2026-06-02 18:46:47.000000000 +0200
@@ -1,4 +1,29 @@
 
+Version 7.0.51 - 2026-06-02
+---------------------------
+* Bug fixes (see mercurial logs for details)
+
+
+Version 7.0.50 - 2026-05-20
+---------------------------
+* Bug fixes (see mercurial logs for details)
+
+
+Version 7.0.49 - 2026-05-02
+---------------------------
+* Bug fixes (see mercurial logs for details)
+
+
+Version 7.0.48 - 2026-04-16
+---------------------------
+* Bug fixes (see mercurial logs for details)
+
+
+Version 7.0.47 - 2026-03-18
+---------------------------
+* Bug fixes (see mercurial logs for details)
+
+
 Version 7.0.46 - 2026-03-02
 ---------------------------
 * Bug fixes (see mercurial logs for details)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-7.0.46/COPYRIGHT new/trytond-7.0.51/COPYRIGHT
--- old/trytond-7.0.46/COPYRIGHT        2026-03-02 21:54:36.000000000 +0100
+++ new/trytond-7.0.51/COPYRIGHT        2026-06-02 18:46:47.000000000 +0200
@@ -4,8 +4,8 @@
 Copyright (C) 2008-2026 B2CK SPRL.
 Copyright (C) 2011 Openlabs Technologies & Consulting (P) Ltd.
 Copyright (C) 2011-2026 Nicolas Évrard.
-Copyright (C) 2020-2025 Maxime Richez
-Copyright (C) 2020-2025 SALUC SA
+Copyright (C) 2020-2026 Maxime Richez
+Copyright (C) 2020-2026 SALUC SA
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-7.0.46/PKG-INFO new/trytond-7.0.51/PKG-INFO
--- old/trytond-7.0.46/PKG-INFO 2026-03-02 21:54:39.808731000 +0100
+++ new/trytond-7.0.51/PKG-INFO 2026-06-02 18:46:51.011286300 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.4
 Name: trytond
-Version: 7.0.46
+Version: 7.0.51
 Summary: Tryton server
 Home-page: http://www.tryton.org/
 Download-URL: http://downloads.tryton.org/7.0/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-7.0.46/trytond/__init__.py 
new/trytond-7.0.51/trytond/__init__.py
--- old/trytond-7.0.46/trytond/__init__.py      2026-02-01 10:57:39.000000000 
+0100
+++ new/trytond-7.0.51/trytond/__init__.py      2026-05-20 23:22:06.000000000 
+0200
@@ -10,7 +10,7 @@
 import __main__
 from lxml import etree, objectify
 
-__version__ = "7.0.46"
+__version__ = "7.0.51"
 
 if not os.environ.get('TRYTOND_APPNAME'):
     os.environ['TRYTOND_APPNAME'] = os.path.basename(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-7.0.46/trytond/backend/postgresql/table.py 
new/trytond-7.0.51/trytond/backend/postgresql/table.py
--- old/trytond-7.0.46/trytond/backend/postgresql/table.py      2026-02-27 
17:53:16.000000000 +0100
+++ new/trytond-7.0.51/trytond/backend/postgresql/table.py      2026-03-14 
19:04:50.000000000 +0100
@@ -26,6 +26,7 @@
         self.__constraints = None
         self.__fk_deltypes = None
         self.__indexes = None
+        self._model = model
 
         transaction = Transaction()
         cursor = transaction.connection.cursor()
@@ -165,6 +166,11 @@
                         Identifier(old_name),
                         Identifier(new_name)))
                 self._update_definitions(columns=True)
+                if not self.history:
+                    history_table = self.table_name + '__history'
+                    if self.__class__.table_exist(history_table):
+                        history_h = self.__class__(self._model, True)
+                        history_h.column_rename(old_name, new_name)
             else:
                 logger.warning(
                     'Unable to rename column %s on table %s to %s.',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-7.0.46/trytond/backend/sqlite/database.py 
new/trytond-7.0.51/trytond/backend/sqlite/database.py
--- old/trytond-7.0.46/trytond/backend/sqlite/database.py       2025-10-03 
17:10:37.000000000 +0200
+++ new/trytond-7.0.51/trytond/backend/sqlite/database.py       2026-04-30 
18:56:55.000000000 +0200
@@ -436,7 +436,8 @@
             db_path = safe_join(
                 config.get('database', 'path'), self.name + '.sqlite')
             if not os.path.isfile(db_path):
-                raise IOError("Database '%s' doesn't exist!" % db_path)
+                raise DatabaseOperationalError(
+                    f"Database '{db_path}' doesn't exist!")
             db_uri = base_uri._replace(path=db_path)
 
         # Use unparse before replacing sqlite with file because SQLite accepts
@@ -485,8 +486,8 @@
             path = os.path.join(config.get('database', 'path'),
                     database_name + '.sqlite')
         with sqlite.connect(path) as conn:
-            cursor = conn.cursor()
-            cursor.close()
+            conn.cursor()
+        conn.close()
 
     @classmethod
     def drop(cls, connection, database_name):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-7.0.46/trytond/backend/sqlite/table.py 
new/trytond-7.0.51/trytond/backend/sqlite/table.py
--- old/trytond-7.0.46/trytond/backend/sqlite/table.py  2025-09-22 
21:34:39.000000000 +0200
+++ new/trytond-7.0.51/trytond/backend/sqlite/table.py  2026-03-14 
19:05:05.000000000 +0100
@@ -122,6 +122,11 @@
                     self._update_definitions(columns=True)
                 else:
                     self._recreate_table({old_name: {'name': new_name}})
+                if not self.history:
+                    history_table = self.table_name + '__history'
+                    if self.__class__.table_exist(history_table):
+                        history_h = self.__class__(self._model, True)
+                        history_h.column_rename(old_name, new_name)
             else:
                 logger.warning(
                     'Unable to rename column %s on table %s to %s.',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-7.0.46/trytond/ir/resource.py 
new/trytond-7.0.51/trytond/ir/resource.py
--- old/trytond-7.0.46/trytond/ir/resource.py   2025-09-22 21:34:39.000000000 
+0200
+++ new/trytond-7.0.51/trytond/ir/resource.py   2026-05-31 17:47:57.000000000 
+0200
@@ -76,7 +76,12 @@
         result = super().search(
             domain, offset=offset, limit=limit, order=order,
             count=False if enforce_access else count, query=query)
-        if enforce_access:
+        if not enforce_access:
+            return result
+
+        loop = 0
+        fetched = []
+        while True:
             records = result
             resources = defaultdict(set)
             allowed = set()
@@ -93,15 +98,27 @@
                                 ('id', 'in', list(sub_ids)),
                                 ]))
 
-            records = [
+            fetched.extend([
                 r for r in records
-                if not r.resource or r.resource in allowed]
-            if count:
-                result = len(records)
-            else:
-                # re-browse to have same context
-                result = cls.browse(records)
-        return result
+                if not r.resource or r.resource in allowed])
+
+            if limit is None or len(fetched) >= limit:
+                if limit is not None:
+                    fetched = fetched[:limit]
+                break
+
+            loop += 1
+            result = super().search(
+                domain, offset=offset + loop * limit, limit=limit, order=order,
+                count=False, query=False)
+            if not result:
+                break
+
+        if count:
+            return len(fetched)
+        else:
+            # re-browse to have same context
+            return cls.browse(fetched)
 
     @classmethod
     def read(cls, ids, fields_names):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-7.0.46/trytond/ir/translation.py 
new/trytond-7.0.51/trytond/ir/translation.py
--- old/trytond-7.0.46/trytond/ir/translation.py        2025-09-22 
21:34:39.000000000 +0200
+++ new/trytond-7.0.51/trytond/ir/translation.py        2026-03-14 
18:53:18.000000000 +0100
@@ -14,7 +14,7 @@
 from sql import Column, Literal, Null
 from sql.aggregate import Max
 from sql.conditionals import Case
-from sql.functions import Position, Substring
+from sql.functions import CharLength, Position, Substring
 
 from trytond.cache import Cache
 from trytond.config import config
@@ -295,7 +295,7 @@
                             Case((
                                     Position(',', table.name) > 0,
                                     Position(',', table.name) - 1),
-                                else_=0)), value)))]
+                                else_=CharLength(table.name))), value)))]
 
     @classmethod
     def get_language(cls):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-7.0.46/trytond/model/dictschema.py 
new/trytond-7.0.51/trytond/model/dictschema.py
--- old/trytond-7.0.46/trytond/model/dictschema.py      2025-09-22 
21:34:39.000000000 +0200
+++ new/trytond-7.0.51/trytond/model/dictschema.py      2026-04-14 
20:36:56.000000000 +0200
@@ -12,7 +12,7 @@
 from trytond.pyson import Eval, PYSONDecoder
 from trytond.rpc import RPC
 from trytond.tools import slugify
-from trytond.transaction import Transaction
+from trytond.transaction import Transaction, inactive_records
 
 
 class DomainError(ValidationError):
@@ -186,7 +186,8 @@
 
     @classmethod
     def search_get_keys(cls, domain, limit=None):
-        schemas = cls.search(domain, limit=limit)
+        with inactive_records():
+            schemas = cls.search(domain, limit=limit)
         return cls.get_keys(schemas)
 
     @classmethod
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-7.0.46/trytond/model/fields/boolean.py 
new/trytond-7.0.51/trytond/model/fields/boolean.py
--- old/trytond-7.0.46/trytond/model/fields/boolean.py  2025-09-22 
21:34:39.000000000 +0200
+++ new/trytond-7.0.51/trytond/model/fields/boolean.py  2026-05-16 
14:45:25.000000000 +0200
@@ -1,6 +1,8 @@
 # This file is part of Tryton.  The COPYRIGHT file at the top level of
 # this repository contains the full copyright notices and license terms.
 
+from sql import Null
+
 from .field import Field
 
 
@@ -35,4 +37,6 @@
                     expression |= (column == conv[value])
                 else:
                     expression &= (column != conv[value])
+            elif value and operator == '!=':
+                expression |= (column == Null)
         return expression
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-7.0.46/trytond/status.py 
new/trytond-7.0.51/trytond/status.py
--- old/trytond-7.0.46/trytond/status.py        2025-09-22 21:34:39.000000000 
+0200
+++ new/trytond-7.0.51/trytond/status.py        2026-04-14 18:57:38.000000000 
+0200
@@ -69,9 +69,13 @@
 
 def dumper(path):
     while True:
-        if dump(path):
-            time.sleep(5)
-        else:
+        try:
+            if dump(path):
+                time.sleep(5)
+            else:
+                time.sleep(60)
+        except Exception:
+            logger.exception("status dumper crashed")
             time.sleep(60)
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-7.0.46/trytond/tests/test_field_boolean.py 
new/trytond-7.0.51/trytond/tests/test_field_boolean.py
--- old/trytond-7.0.46/trytond/tests/test_field_boolean.py      2025-09-22 
21:34:39.000000000 +0200
+++ new/trytond-7.0.51/trytond/tests/test_field_boolean.py      2026-05-16 
14:45:25.000000000 +0200
@@ -229,6 +229,32 @@
         self.assertListEqual(booleans, [])
 
     @with_transaction()
+    def test_search_equals_true_with_none(self):
+        "Test search boolean equals True with None"
+        Boolean = Pool().get('test.boolean')
+        boolean, = Boolean.create([{
+                    'boolean': None,
+                    }])
+
+        booleans = Boolean.search([
+                ('boolean', '=', True),
+                ])
+        self.assertListEqual(booleans, [])
+
+    @with_transaction()
+    def test_search_non_equals_true_with_none(self):
+        "Test search boolean non equals True with None"
+        Boolean = Pool().get('test.boolean')
+        boolean, = Boolean.create([{
+                    'boolean': None,
+                    }])
+
+        booleans = Boolean.search([
+                ('boolean', '!=', True),
+                ])
+        self.assertListEqual(booleans, [boolean])
+
+    @with_transaction()
     def test_write_false(self):
         "Test write boolean False"
         Boolean = Pool().get('test.boolean')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-7.0.46/trytond/tests/test_field_char.py 
new/trytond-7.0.51/trytond/tests/test_field_char.py
--- old/trytond-7.0.46/trytond/tests/test_field_char.py 2025-09-22 
21:34:39.000000000 +0200
+++ new/trytond-7.0.51/trytond/tests/test_field_char.py 2026-04-15 
00:50:09.000000000 +0200
@@ -760,6 +760,23 @@
         pool = Pool()
         self._test_search(pool.get('test.char_translate'))
 
+    @with_transaction()
+    def test_search_empty(self):
+        "Test a full text search with an empty string"
+        pool = Pool()
+        Char = pool.get('test.char')
+
+        record1, record2 = Char.create([{
+                    'char': "word",
+                    }, {
+                    'char': "",
+                    }])
+
+        with Transaction().set_context(search_similarity=0.3):
+            self.assertEqual(
+                Char.search([('char', 'ilike', '')]),
+                [record2])
+
     def _test_order(self, Model):
         record1, record2 = Model.create([{
                     'char': "word",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-7.0.46/trytond/tests/test_modelsql.py 
new/trytond-7.0.51/trytond/tests/test_modelsql.py
--- old/trytond-7.0.46/trytond/tests/test_modelsql.py   2025-10-03 
17:10:37.000000000 +0200
+++ new/trytond-7.0.51/trytond/tests/test_modelsql.py   2026-04-30 
20:09:10.000000000 +0200
@@ -1323,6 +1323,7 @@
     @classmethod
     def setUpClass(cls):
         super().setUpClass()
+        activate_module('tests')
         cls.setup_language()
 
     @classmethod
@@ -1379,7 +1380,6 @@
     @classmethod
     def setUpClass(cls):
         super().setUpClass()
-        activate_module('tests')
 
     @with_transaction()
     def test_create_default_language(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-7.0.46/trytond/tests/test_resource.py 
new/trytond-7.0.51/trytond/tests/test_resource.py
--- old/trytond-7.0.46/trytond/tests/test_resource.py   2025-09-22 
21:34:39.000000000 +0200
+++ new/trytond-7.0.51/trytond/tests/test_resource.py   2026-05-31 
17:48:49.000000000 +0200
@@ -103,3 +103,28 @@
             self.assertEqual(notes, [note2])
             self.assertEqual(count, 1)
             self.assertTrue(query)
+
+    @with_transaction()
+    def test_resources_search_limit(self):
+        "Test resource search limit work as expected"
+        pool = Pool()
+        Note = pool.get('ir.note')
+        Warning_ = pool.get('res.user.warning')
+
+        warning1 = Warning_(user=0, name="root")
+        warning1.save()
+        warning2 = Warning_(user=1, name="admin")
+        warning2.save()
+        for i in range(100):
+            note = Note(resource=warning2 if i % 3 else warning1)
+            note.save()
+
+        with Transaction().set_context(_check_access=True):
+            notes = Note.search([], limit=10, offset=0)
+            self.assertEqual(len(notes), 10)
+
+            notes = Note.search([], limit=200, offset=0)
+            self.assertEqual(len(notes), 66)
+
+            notes = Note.search([])
+            self.assertEqual(len(notes), 66)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-7.0.46/trytond/tests/test_transaction.py 
new/trytond-7.0.51/trytond/tests/test_transaction.py
--- old/trytond-7.0.46/trytond/tests/test_transaction.py        2025-09-22 
21:34:39.000000000 +0200
+++ new/trytond-7.0.51/trytond/tests/test_transaction.py        2026-04-30 
20:08:22.000000000 +0200
@@ -3,6 +3,7 @@
 import unittest
 from unittest.mock import Mock
 
+from trytond import backend
 from trytond.tests.test_tryton import CONTEXT, DB_NAME, USER, activate_module
 from trytond.transaction import Transaction
 
@@ -30,8 +31,8 @@
         and ensure that it stops cleanly and allows starting of next
         transaction'''
         self.assertRaises(
-            Exception, empty_transaction, "Non existant DB", USER,
-            context=CONTEXT)
+            backend.DatabaseOperationalError, empty_transaction,
+            "Non%20existant%20DB", USER, context=CONTEXT)
         self.assertTrue(empty_transaction(DB_NAME, USER, context=CONTEXT))
 
     def test_set_user(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-7.0.46/trytond/tests/test_tryton.py 
new/trytond-7.0.51/trytond/tests/test_tryton.py
--- old/trytond-7.0.46/trytond/tests/test_tryton.py     2025-09-22 
21:34:39.000000000 +0200
+++ new/trytond-7.0.51/trytond/tests/test_tryton.py     2026-04-14 
20:36:57.000000000 +0200
@@ -165,19 +165,26 @@
         finally:
             database.put_connection(connection, True)
 
-    with Transaction().start(DB_NAME, 0) as transaction, \
-            sqlite.connect(file_) as conn2:
-        conn1 = transaction.connection
-        if restore:
-            conn2, conn1 = conn1, conn2
-        if hasattr(conn1, 'backup'):
-            conn1.backup(conn2)
-        else:
-            try:
-                import sqlitebck
-            except ImportError:
-                return False
-            sqlitebck.copy(conn1, conn2)
+    database = backend.Database(DB_NAME).connect()
+    conn1 = database.get_connection()
+    try:
+        with sqlite.connect(file_) as conn2:
+            if restore:
+                in_, out = conn2, conn1
+            else:
+                in_, out = conn1, conn2
+            if hasattr(in_, 'backup'):
+                in_.backup(out)
+            else:
+                try:
+                    import sqlitebck
+                except ImportError:
+                    return False
+                sqlitebck.copy(in_, out)
+        conn2.close()
+    finally:
+        database.put_connection(conn1)
+        database.close()
     return True
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-7.0.46/trytond/tools/domain_inversion.py 
new/trytond-7.0.51/trytond/tools/domain_inversion.py
--- old/trytond-7.0.46/trytond/tools/domain_inversion.py        2024-09-07 
16:45:14.000000000 +0200
+++ new/trytond-7.0.51/trytond/tools/domain_inversion.py        2026-05-16 
14:43:54.000000000 +0200
@@ -433,7 +433,8 @@
                         and operator == 'in' and len(value) == 1))
                 and (not count
                     or (count == 1 and model and name.endswith('.id')))):
-            value = value if operator == '=' and single_value else value[0]
+            if operator == 'in' and single_value:
+                value = value[0]
             if model and name.endswith('.id'):
                 model = model[0]
                 value = [model, value]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-7.0.46/trytond/tools/misc.py 
new/trytond-7.0.51/trytond/tools/misc.py
--- old/trytond-7.0.46/trytond/tools/misc.py    2025-09-22 21:34:39.000000000 
+0200
+++ new/trytond-7.0.51/trytond/tools/misc.py    2026-04-14 20:36:56.000000000 
+0200
@@ -256,6 +256,8 @@
 
 
 def is_full_text(value, escape='\\'):
+    if not value:
+        return False
     escaped = strip_wildcard(value, escape=escape)
     escaped = escaped.replace(escape + '%', '').replace(escape + '_', '')
     if '%' in escaped or '_' in escaped:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-7.0.46/trytond/transaction.py 
new/trytond-7.0.51/trytond/transaction.py
--- old/trytond-7.0.46/trytond/transaction.py   2025-10-03 17:10:37.000000000 
+0200
+++ new/trytond-7.0.51/trytond/transaction.py   2026-04-30 21:39:01.000000000 
+0200
@@ -132,6 +132,7 @@
             instance.trigger_records = None
             instance.log_records = None
             instance.check_warnings = None
+            instance._datamanagers = None
             instance.timestamp = None
             instance.started_at = None
             instance.cache = WeakValueDictionary()
@@ -253,8 +254,9 @@
                         else:
                             self.rollback()
                     finally:
-                        self.database.put_connection(
-                            self.connection, self.close)
+                        if self.connection:
+                            self.database.put_connection(
+                                self.connection, self.close)
                 finally:
                     self.database = None
                     self.readonly = False
@@ -373,11 +375,13 @@
         from trytond.cache import Cache
         for cache in self.cache.values():
             cache.clear()
-        for datamanager in self._datamanagers:
-            datamanager.tpc_abort(self)
+        if self._datamanagers:
+            for datamanager in self._datamanagers:
+                datamanager.tpc_abort(self)
         Cache.rollback(self)
         self._clear_log_records()
-        self.connection.rollback()
+        if self.connection:
+            self.connection.rollback()
 
     def join(self, datamanager):
         try:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/trytond-7.0.46/trytond.egg-info/PKG-INFO 
new/trytond-7.0.51/trytond.egg-info/PKG-INFO
--- old/trytond-7.0.46/trytond.egg-info/PKG-INFO        2026-03-02 
21:54:39.000000000 +0100
+++ new/trytond-7.0.51/trytond.egg-info/PKG-INFO        2026-06-02 
18:46:50.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.4
 Name: trytond
-Version: 7.0.46
+Version: 7.0.51
 Summary: Tryton server
 Home-page: http://www.tryton.org/
 Download-URL: http://downloads.tryton.org/7.0/

Reply via email to