return self.customer is not returning the name of the customer defined as ForeignKey

I have in my models and admin the following :

models.py

class Portal(models.Model):

    customer = models.ForeignKey(Customer, on_delete=models.SET_NULL, blank=True, null=True)

    #

    @property
    def get_customer(self):
        return self.customer

admin.py

class PortalAdmin(admin.ModelAdmin):
    list_display = ('name', 'get_customer',)
    readonly_fields = ('get_customer',)

But GET CUSTOMER in the admin is always as dash (-)

My customer/models.py is alright :

   def __str__(self):
        return self.name

Have you verified that for the instances of Portal that you are looking at, that the customer field is not null?

(Note, I’d also remove the @property decorator from your get_customer function.)

If I replace list_display with list_display = ('name', 'customer_id',) I get the customer ID associated with that Portal.