Commit 49c811ae authored by Fabien Morin's avatar Fabien Morin

simplify code

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32795 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f1e3abf9
......@@ -210,8 +210,7 @@ class TestXHTML(ERP5TypeTestCase):
for form_path, form in skins_tool.ZopeFind(
skins_tool, obj_metatypes=['ERP5 Form'], search_sub=1):
for field in self.getFieldList(form, form_path):
if field.meta_type == 'ListBox' or field.meta_type == 'ProxyField' and\
field.getRecursiveTemplateField().meta_type == 'ListBox':
if field.getRecursiveTemplateField().meta_type == 'ListBox':
selection_name = field.get_value("selection_name")
if selection_name in ("",None):
error_list.append(form_path)
......@@ -224,8 +223,7 @@ class TestXHTML(ERP5TypeTestCase):
for form_path, form in skins_tool.ZopeFind(
skins_tool, obj_metatypes=['ERP5 Form'], search_sub=1):
for field in self.getFieldList(form, form_path):
if field.meta_type == 'ListBox' or field.meta_type == 'ProxyField' and\
field.getRecursiveTemplateField().meta_type == 'ListBox':
if field.getRecursiveTemplateField().meta_type == 'ListBox':
list_method = field.get_value("list_method")
if list_method:
if isinstance(list_method, str):
......@@ -243,8 +241,7 @@ class TestXHTML(ERP5TypeTestCase):
for form_path, form in skins_tool.ZopeFind(
skins_tool, obj_metatypes=['ERP5 Form'], search_sub=1):
for field in self.getFieldList(form, form_path):
if field.meta_type == 'ListBox' or field.meta_type == 'ProxyField' and\
field.getRecursiveTemplateField().meta_type == 'ListBox':
if field.getRecursiveTemplateField().meta_type == 'ListBox':
list_action = field.get_value("list_action")
if list_action and list_action != 'list': # We assume that 'list'
# list_action exists
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment