Remove some debug messages and fix PIP

This commit is contained in:
Oliver Walters 2020-04-24 10:22:33 +10:00
parent 77471cb89c
commit ba1d2063af
2 changed files with 2 additions and 6 deletions

View File

@ -458,13 +458,11 @@ class SalesOrderLineItem(OrderLineItem):
return query['allocated']
def is_fully_allocated(self):
print("Line:", self.pk)
print("Allocated:", self.allocated_quantity())
print("Quantity:", self.quantity)
""" Return True if this line item is fully allocated """
return self.allocated_quantity() >= self.quantity
def is_over_allocated(self):
""" Return True if this line item is over allocated """
return self.allocated_quantity() > self.quantity

View File

@ -416,7 +416,6 @@ class SalesOrderCancel(AjaxUpdateView):
else:
valid = True
if valid:
if not order.cancel_order():
form.non_field_errors = [_('Could not cancel order')]
@ -498,7 +497,6 @@ class PurchaseOrderComplete(AjaxUpdateView):
return self.renderJsonResponse(request, form, data)
class SalesOrderShip(AjaxUpdateView):
""" View for 'shipping' a SalesOrder """
form_class = order_forms.ShipSalesOrderForm