mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-17 12:45:26 +00:00
Adds attachment support for the StockItem model
This commit is contained in:
@ -415,7 +415,9 @@ class InvenTreePart extends InvenTreeModel {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Class representing an attachment file against a Part object
|
||||
*/
|
||||
class InvenTreePartAttachment extends InvenTreeAttachment {
|
||||
|
||||
InvenTreePartAttachment() : super();
|
||||
|
@ -601,6 +601,29 @@ class InvenTreeStockItem extends InvenTreeModel {
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Class representing an attachment file against a StockItem object
|
||||
*/
|
||||
class InvenTreeStockItemAttachment extends InvenTreeAttachment {
|
||||
|
||||
InvenTreeStockItemAttachment() : super();
|
||||
|
||||
InvenTreeStockItemAttachment.fromJson(Map<String, dynamic> json) : super.fromJson(json);
|
||||
|
||||
@override
|
||||
String get REFERENCE_FIELD => "stock_item";
|
||||
|
||||
@override
|
||||
String get URL => "stock/attachment/";
|
||||
|
||||
@override
|
||||
InvenTreeModel createFromJson(Map<String, dynamic> json) {
|
||||
return InvenTreeStockItemAttachment.fromJson(json);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
class InvenTreeStockLocation extends InvenTreeModel {
|
||||
|
||||
InvenTreeStockLocation() : super();
|
||||
|
Reference in New Issue
Block a user