mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add more export fields for SupplierPart and SupplierPriceBreak
This commit is contained in:
parent
628a58e8fc
commit
55ebf48684
@ -38,8 +38,12 @@ class SupplierPartResource(ModelResource):
|
||||
|
||||
part = Field(attribute='part', widget=widgets.ForeignKeyWidget(Part))
|
||||
|
||||
part_name = Field(attribute='part__full_name', readonly=True)
|
||||
|
||||
supplier = Field(attribute='supplier', widget=widgets.ForeignKeyWidget(Company))
|
||||
|
||||
supplier_name = Field(attribute='supplier__name', readonly=True)
|
||||
|
||||
class Meta:
|
||||
model = SupplierPart
|
||||
skip_unchanged = True
|
||||
@ -61,6 +65,16 @@ class SupplierPriceBreakResource(ModelResource):
|
||||
|
||||
currency = Field(attribute='currency', widget=widgets.ForeignKeyWidget(Currency))
|
||||
|
||||
supplier_id = Field(attribute='part__supplier__pk', readonly=True)
|
||||
|
||||
supplier_name = Field(attribute='part__supplier__name', readonly=True)
|
||||
|
||||
part_name = Field(attribute='part__part__full_name', readonly=True)
|
||||
|
||||
SKU = Field(attribute='part__SKU', readonly=True)
|
||||
|
||||
MPN = Field(attribute='part__MPN', readonly=True)
|
||||
|
||||
class Meta:
|
||||
model = SupplierPriceBreak
|
||||
skip_unchanged = True
|
||||
|
Loading…
Reference in New Issue
Block a user