def is_shipping_event_permitted(self, event_type, quantity):
        # Note, this calculation is simplistic - normally, you will also need
        # to check if previous shipping events have occurred.  Eg, you can't
        # return lines until they have been shipped.
        current_qty = self.shipping_event_quantity(event_type)
        return (current_qty + quantity) <= self.quantity
Test whether a shipping event with the given quantity is permitted
dataset/ETHPy150Open django-oscar/django-oscar/src/oscar/apps/order/abstract_models.py/AbstractLine.is_shipping_event_permitted