def consume_allocation(self, quantity):
        if not self.is_allocation_consumption_possible(quantity):
            raise InvalidStockAdjustment(
                _('Invalid stock consumption request'))
        self.num_allocated -= quantity
        self.num_in_stock -= quantity
        self.save()
Consume a previous allocation
dataset/ETHPy150Open django-oscar/django-oscar/src/oscar/apps/partner/abstract_models.py/AbstractStockRecord.consume_allocation