Override this method to convert displayed values to lookup values

def get_lookup_value(self, value):
        """
        Override this method to convert displayed values to lookup values
        """
        choices = self._field_choices()
        if choices:
            if isinstance(value, list):
                return [c[0] for c in choices if c[1] in value]
            else:
                for c in choices:
                    if c[1] == value:
                        return c[0]
        return value