mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-02 13:28:49 +00:00
- Fixes https://github.com/inventree/InvenTree/issues/6201 (cherry picked from commit 7f231cb6c152b185a1756227f551b7b9762ff773) Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
parent
a41efb31b6
commit
421081b8f6
@ -7,6 +7,7 @@ from import_export import widgets
|
|||||||
from import_export.admin import ImportExportModelAdmin
|
from import_export.admin import ImportExportModelAdmin
|
||||||
from import_export.fields import Field
|
from import_export.fields import Field
|
||||||
|
|
||||||
|
import stock.models
|
||||||
from InvenTree.admin import InvenTreeResource
|
from InvenTree.admin import InvenTreeResource
|
||||||
from order import models
|
from order import models
|
||||||
|
|
||||||
@ -191,6 +192,11 @@ class PurchaseOrderLineItemResource(PriceResourceMixin, InvenTreeResource):
|
|||||||
|
|
||||||
SKU = Field(attribute='part__SKU', readonly=True)
|
SKU = Field(attribute='part__SKU', readonly=True)
|
||||||
|
|
||||||
|
destination = Field(
|
||||||
|
attribute='destination',
|
||||||
|
widget=widgets.ForeignKeyWidget(stock.models.StockLocation),
|
||||||
|
)
|
||||||
|
|
||||||
def dehydrate_purchase_price(self, line):
|
def dehydrate_purchase_price(self, line):
|
||||||
"""Return a string value of the 'purchase_price' field, rather than the 'Money' object"""
|
"""Return a string value of the 'purchase_price' field, rather than the 'Money' object"""
|
||||||
if line.purchase_price:
|
if line.purchase_price:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user