mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Printable string for PurchaseOrderLineItem
This commit is contained in:
parent
52b7051060
commit
771a008e84
@ -177,6 +177,13 @@ class PurchaseOrderLineItem(OrderLineItem):
|
|||||||
('order', 'part')
|
('order', 'part')
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return "{n} x {part} from {supplier} (for {po})".format(
|
||||||
|
n=self.quantity,
|
||||||
|
part=self.part.SKU if self.part else 'unknown part',
|
||||||
|
supplier=self.order.supplier.name,
|
||||||
|
po=self.order)
|
||||||
|
|
||||||
order = models.ForeignKey(
|
order = models.ForeignKey(
|
||||||
PurchaseOrder, on_delete=models.CASCADE,
|
PurchaseOrder, on_delete=models.CASCADE,
|
||||||
related_name='lines',
|
related_name='lines',
|
||||||
|
Loading…
Reference in New Issue
Block a user