From ba1d2063af0a1a9e03cfe12c9a5e4946d90218c7 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 24 Apr 2020 10:22:33 +1000 Subject: [PATCH] Remove some debug messages and fix PIP --- InvenTree/order/models.py | 6 ++---- InvenTree/order/views.py | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/InvenTree/order/models.py b/InvenTree/order/models.py index d3d0314f38..d448e0d444 100644 --- a/InvenTree/order/models.py +++ b/InvenTree/order/models.py @@ -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 diff --git a/InvenTree/order/views.py b/InvenTree/order/views.py index 15da7e57fd..eb0895f244 100644 --- a/InvenTree/order/views.py +++ b/InvenTree/order/views.py @@ -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