From 64db28be6759456ab97fe34720110be119f335d4 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 19 Nov 2019 10:31:49 +1100 Subject: [PATCH] Fix __str__ function to get unit tests to pass --- InvenTree/order/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/InvenTree/order/models.py b/InvenTree/order/models.py index f9f32c2f00..b1b93b990a 100644 --- a/InvenTree/order/models.py +++ b/InvenTree/order/models.py @@ -17,6 +17,7 @@ from datetime import datetime from stock.models import StockItem from company.models import Company, SupplierPart +from InvenTree.helpers import decimal2string from InvenTree.status_codes import OrderStatus @@ -264,7 +265,7 @@ class PurchaseOrderLineItem(OrderLineItem): def __str__(self): return "{n} x {part} from {supplier} (for {po})".format( - n=self.quantity, + n=decimal2string(self.quantity), part=self.part.SKU if self.part else 'unknown part', supplier=self.order.supplier.name, po=self.order)