def value_from_object(self, obj, request):
        v = self.full_value_from_object(obj, request)
        # try:
            # v = getattr(obj,self.field.name)
        # except self.field.rel.model.DoesNotExist,e:
            # v = None
        if v is None:
            return None
        return v.pk

    # def obj2list(self,request,obj):
        # return [self.value_from_object(request,obj)]

    # def obj2dict(self,request,obj,d):
        # d[self.field.name] = self.value_from_object(request,obj)
dataset/ETHPy150Open lsaffre/lino/lino/core/store.py/OneToOneStoreField.value_from_object/original