mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-05 23:08:48 +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 stock.models import StockItem
|
||||||
from company.models import Company, SupplierPart
|
from company.models import Company, SupplierPart
|
||||||
|
|
||||||
|
from InvenTree.helpers import decimal2string
|
||||||
from InvenTree.status_codes import OrderStatus
|
from InvenTree.status_codes import OrderStatus
|
||||||
|
|
||||||
|
|
||||||
@ -264,7 +265,7 @@ class PurchaseOrderLineItem(OrderLineItem):
|
|||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return "{n} x {part} from {supplier} (for {po})".format(
|
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',
|
part=self.part.SKU if self.part else 'unknown part',
|
||||||
supplier=self.order.supplier.name,
|
supplier=self.order.supplier.name,
|
||||||
po=self.order)
|
po=self.order)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user