@validate('form', 'graph', 'tree')
def valid_att_in_field(arch):
 return (not arch.xpath('//field[not(@name)]'))

@ validate ( 'form' , 'graph' , 'tree' ) def valid_att_in_field ( arch ) : return ( not arch . xpath ( '//field[not(@name)]' ) )
field nodes must all have a @name .