'Return the manual fields (as a dict) for the given model.'

def get_manual_fields(self, cr, model_name):

    if (self._fields_by_model is None):
        self._fields_by_model = dic = defaultdict(dict)
        cr.execute('SELECT    *    FROM    ir_model_fields    WHERE    state=%s', ('manual',))
        for field in cr.dictfetchall():
            dic[field['model']][field['name']] = field
    return self._fields_by_model[model_name]
