Skip empty arch when searching other strings of same model

review397006
This commit is contained in:
Cédric Krier committed 2012-06-20 18:15:04 +02:00
1 parent 6858187fc8
commit fb9492136e
1 file changed
+4 -1
+4 -1
View File
@@ -140,7 +140,10 @@ class View(ModelSQL, ModelView):
('module', '=', view.module),
])
for view2 in self.browse(view_ids):
tree2 = etree.fromstring(view2.arch)
xml2 = view2.arch.strip()
if not xml2:
continue
tree2 = etree.fromstring(xml2)
root2_element = tree2.getroottree().getroot()
strings += self._translate_view(root2_element)
if not strings: