mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
(cherry picked from commit 87da286f2f
)
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)
|
||||
|
||||
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 for managing import / export of PurchaseOrderExtraLine data."""
|
||||
|
Loading…
Reference in New Issue
Block a user