def is_allocation_consumption_possible(self, quantity):
        return quantity <= min(self.num_allocated, self.num_in_stock)
Test if a proposed stock consumption is permitted
dataset/ETHPy150Open django-oscar/django-oscar/src/oscar/apps/partner/abstract_models.py/AbstractStockRecord.is_allocation_consumption_possible