@property
    def net_stock_level(self):
        if self.num_in_stock is None:
            return 0
        if self.num_allocated is None:
            return self.num_in_stock
        return self.num_in_stock - self.num_allocated

    # 2-stage stock management model
The effective number in stock (eg available to buy).
dataset/ETHPy150Open django-oscar/django-oscar/src/oscar/apps/partner/abstract_models.py/AbstractStockRecord.net_stock_level