From 704da3630b6cd993253a7c5fec32caa0579b6bc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 16 Dec 2025 11:56:31 +0100 Subject: [PATCH] Compare element to replace new view tree from inherit application against None lxml raises a warning about truth-testing on element. Close #14429 --- trytond/trytond/ir/ui/view.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trytond/trytond/ir/ui/view.py b/trytond/trytond/ir/ui/view.py index 6dc153b578..24c2df76dc 100644 --- a/trytond/trytond/ir/ui/view.py +++ b/trytond/trytond/ir/ui/view.py @@ -347,7 +347,7 @@ class View( 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