details:   https://code.tryton.org/tryton/commit/0ef85c165044
branch:    default
user:      Cédric Krier <[email protected]>
date:      Fri Jan 23 10:47:56 2026 +0100
description:
        Fail when getting view arch on test
diffstat:

 trytond/trytond/ir/ui/view.py |  3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diffs (20 lines):

diff -r 09fa58ec1ee6 -r 0ef85c165044 trytond/trytond/ir/ui/view.py
--- a/trytond/trytond/ir/ui/view.py     Wed Jan 14 19:04:50 2026 +0100
+++ b/trytond/trytond/ir/ui/view.py     Fri Jan 23 10:47:56 2026 +0100
@@ -260,6 +260,7 @@
             encode(root_element)
 
     def get_arch(self, name):
+        pool = Pool()
         value = None
         if self.name and self.module:
             path = os.path.join(self.module, 'view', self.name + '.xml')
@@ -268,6 +269,8 @@
                         subdir='modules', mode='r', encoding='utf-8') as fp:
                     value = fp.read()
             except IOError:
+                if pool.test:
+                    raise
                 logger.exception("failed to open %r", path)
         if not value:
             value = self.data

Reply via email to