def parse_form_value(self, v, obj):
        relto_model = self.get_rel_to(obj)
        if not relto_model:
            # logger.info("20111209 get_value_text: no relto_model")
            return
        try:
            return relto_model.objects.get(pk=v)
        except ValueError:
            pass
        except relto_model.DoesNotExist:
            pass

        if obj is not None:
            ch = obj.__class__.get_chooser_for_field(self.field.name)
            if ch and ch.can_create_choice:
                return ch.create_choice(obj, v)
        return None


# class LinkedForeignKeyField(ForeignKeyStoreField):

    # def get_rel_to(self,obj):
        # ct = self.field.get_content_type(obj)
        # if ct is None:
            # return None
        # return ct.model_class()
Convert the form field value (expected to contain a primary key)
dataset/ETHPy150Open lsaffre/lino/lino/core/store.py/ForeignKeyStoreField.parse_form_value