2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-17 04:35:26 +00:00

Adds attachment support for purchase orders

This commit is contained in:
Oliver Walters
2022-06-04 00:28:39 +10:00
parent ada64f3971
commit 0237e9c819
2 changed files with 50 additions and 0 deletions

View File

@ -203,3 +203,24 @@ class InvenTreePOLineItem extends InvenTreeModel {
return InvenTreePOLineItem.fromJson(json);
}
}
/*
* Class representing an attachment file against a StockItem object
*/
class InvenTreePurchaseOrderAttachment extends InvenTreeAttachment {
InvenTreePurchaseOrderAttachment() : super();
InvenTreePurchaseOrderAttachment.fromJson(Map<String, dynamic> json) : super.fromJson(json);
@override
String get REFERENCE_FIELD => "order";
@override
String get URL => "order/po/attachment/";
@override
InvenTreeModel createFromJson(Map<String, dynamic> json) {
return InvenTreePurchaseOrderAttachment.fromJson(json);
}
}