'Get a list of all readable fields in the resource table
@param subset: list of fieldnames to limit the selection to'

def readable_fields(self, subset=None):

    fkey = None
    table = self.table
    parent = self.parent
    linked = self.linked
    if (parent and (linked is None)):
        component = parent.components.get(self.alias, None)
        if component:
            fkey = component.fkey
    elif (linked is not None):
        component = linked
        if component:
            fkey = component.lkey
    if subset:
        return [ogetattr(table, f) for f in subset if ((f in table.fields) and ogetattr(table, f).readable and (f != fkey))]
    else:
        return [ogetattr(table, f) for f in table.fields if (ogetattr(table, f).readable and (f != fkey))]
