'Return the onchange spec from a view description; if not given, the
result of ``self.fields_view_get()`` is used.'

@api.model
def _onchange_spec(self, view_info=None):

    result = {}
    def process(node, info, prefix):
        if (node.tag == 'field'):
            name = node.attrib['name']
            names = (('%s.%s' % (prefix, name)) if prefix else name)
            if (not result.get(names)):
                result[names] = node.attrib.get('on_change')
            for subinfo in info['fields'][name].get('views', {}).itervalues():
                process(etree.fromstring(subinfo['arch']), subinfo, names)
        else:
            for child in node:
                process(child, info, prefix)
    if (view_info is None):
        view_info = self.fields_view_get()
    process(etree.fromstring(view_info['arch']), view_info, '')
    return result
