mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fix __str__ function to get unit tests to pass
This commit is contained in:
parent
381becef79
commit
64db28be67
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user