details:   https://code.tryton.org/tryton/commit/1266d4f6aeaa
branch:    7.6
user:      Cédric Krier <[email protected]>
date:      Tue Dec 16 11:56:31 2025 +0100
description:
        Compare element to replace new view tree from inherit application 
against None

        lxml raises a warning about truth-testing on element.

        Close #14429
        (grafted from 8743690048a7874266e00696dd47df831e02c6c9)
diffstat:

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

diffs (12 lines):

diff -r e69968c09345 -r 1266d4f6aeaa trytond/trytond/ir/ui/view.py
--- a/trytond/trytond/ir/ui/view.py     Mon Dec 15 11:44:21 2025 +0100
+++ b/trytond/trytond/ir/ui/view.py     Tue Dec 16 11:56:31 2025 +0100
@@ -347,7 +347,7 @@
                 position = element.get('position', 'inside')
                 new_tree = getattr(cls, '_inherit_apply_%s' % position)(
                     tree, element, target)
-                if new_tree:
+                if new_tree is not None:
                     tree = new_tree
         return tree
 

Reply via email to