mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 20:46:47 +00:00
(cherry picked from commit 87da286f2f7b5bee7a168ad9f0ccd35a68ae7e09) Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
parent
946fe2df29
commit
73768bfee1
@ -171,6 +171,14 @@ class PurchaseOrderLineItemResource(PriceResourceMixin, InvenTreeResource):
|
|||||||
|
|
||||||
SKU = Field(attribute='part__SKU', readonly=True)
|
SKU = Field(attribute='part__SKU', readonly=True)
|
||||||
|
|
||||||
|
def dehydrate_purchase_price(self, line):
|
||||||
|
"""Return a string value of the 'purchase_price' field, rather than the 'Money' object"""
|
||||||
|
|
||||||
|
if line.purchase_price:
|
||||||
|
return line.purchase_price.amount
|
||||||
|
else:
|
||||||
|
return ''
|
||||||
|
|
||||||
|
|
||||||
class PurchaseOrderExtraLineResource(PriceResourceMixin, InvenTreeResource):
|
class PurchaseOrderExtraLineResource(PriceResourceMixin, InvenTreeResource):
|
||||||
"""Class for managing import / export of PurchaseOrderExtraLine data."""
|
"""Class for managing import / export of PurchaseOrderExtraLine data."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user