@validate('tree')
def valid_field_in_tree(arch):
 return all(((child.tag in ('field', 'button')) for child in arch.xpath('/tree/*')))

@ validate ( 'tree' ) def valid_field_in_tree ( arch ) : return all ( ( ( child . tag in ( 'field' , 'button' ) ) for child in arch . xpath ( '/tree/*' ) ) )
children of tree view must be field or button .