def METHOD_NAME(self, pickings):
    types = set(pickings.mapped("picking_type_code"))
    if not types:
        raise ValidationError(
            _("The pickings you've selected don't seem to have any type.")
        )
    if len(types) > 1:
        raise ValidationError(
            _("You need to select pickings with all the same type.")
        )