def __init__(self, rh, **options):
        self.rh = rh
        self.actor = rh.actor

        # temporary dict used by collect_fields and add_field_for
        self.df2sf = {}
        self.all_fields = []
        self.list_fields = []
        self.detail_fields = []
        self.primary_keys = set([])

        def addfield(sf):
            self.all_fields.append(sf)
            self.list_fields.append(sf)
            self.detail_fields.append(sf)

        if not issubclass(rh.actor, frames.Frame):
            self.collect_fields(self.list_fields, rh.get_list_layout())

        form = rh.actor.detail_layout
        if form:
            dh = form.get_layout_handle(settings.SITE.kernel.default_ui)
            self.collect_fields(self.detail_fields, dh)

        form = rh.actor.insert_layout
        if form:
            dh = form.get_layout_handle(settings.SITE.kernel.default_ui)
            self.collect_fields(self.detail_fields, dh)

        if self.pk is not None:
            self.pk_index = 0
            found = False
            for fld in self.list_fields:
                """
                Django's Field.__cmp__() does::
                
                  return cmp(self.creation_counter, other.creation_counter)
                  
                which causes an exception when trying to compare a field
                with an object of other type.
                """
                if (fld.field.__class__ is self.pk.__class__) \
                   or fld.field == self.pk:
                    # self.pk = fld.field
                    found = True
                    break
                self.pk_index += fld.list_values_count
            if not found:
                raise Exception("Primary key %s not found in list_fields %s" %
                                (self.pk, self.list_fields))

        del self.df2sf

        # if not issubclass(rh.report,dbtables.Table):
            # addfield(RecnoStoreField(self))

        if rh.actor.editable:  # condition added 20131017

            addfield(DisabledFieldsStoreField(self))

        addfield(DisabledActionsStoreField(self))

        if rh.actor.editable:
            addfield(DisableEditingStoreField(self))

        if rh.actor.get_row_classes is not None:
            addfield(RowClassStoreField(self))

        # virtual fields must come last so that Store.form2obj()
        # processes "real" fields first.
        self.all_fields = [
            f for f in self.all_fields if not isinstance(f, VirtStoreField)
        ] + [
            f for f in self.all_fields if isinstance(f, VirtStoreField)
        ]
        self.all_fields = tuple(self.all_fields)
        self.list_fields = tuple(self.list_fields)
        self.detail_fields = tuple(self.detail_fields)
dataset/ETHPy150Open lsaffre/lino/lino/core/store.py/Store.__init__/operator `and` -> `or`