mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Handle purchase price export for .xls files (#5362)
This commit is contained in:
parent
5f3d3b28b3
commit
87da286f2f
@ -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…
Reference in New Issue
Block a user