mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-27 21:16:48 +00:00
Updates
(cherry picked from commit 94125667d9cdd1bd486aa58a2c4908c143b47225)
This commit is contained in:
parent
0ef72dc3dd
commit
08e01a729b
@ -2,6 +2,7 @@
|
||||
---
|
||||
|
||||
- Fixes barcode scanning bug which prevents scanning of DataMatrix codes
|
||||
- Display "destination" information in PurchaseOrder detail view
|
||||
- Adds "assigned to me" filter for Purchase Order list
|
||||
- Adds "assigned to me" filter for Sales Order list
|
||||
|
||||
|
@ -333,6 +333,10 @@ class InvenTreeAPI {
|
||||
// Ref: https://github.com/inventree/InvenTree/pull/7420
|
||||
bool get supportsModernAttachments => isConnected() && apiVersion >= 207;
|
||||
|
||||
// Does the server support the "destination" field on the PurchaseOrder model?
|
||||
// Ref: https://github.com/inventree/InvenTree/pull/8403
|
||||
bool get supportsPurchaseOrderDestination => isConnected() && apiVersion >= 276;
|
||||
|
||||
// Cached list of plugins (refreshed when we connect to the server)
|
||||
List<InvenTreePlugin> _plugins = [];
|
||||
|
||||
|
@ -40,6 +40,7 @@ class InvenTreePurchaseOrder extends InvenTreeOrder {
|
||||
"supplier_reference": {},
|
||||
"description": {},
|
||||
"project_code": {},
|
||||
"destination": {},
|
||||
"target_date": {},
|
||||
"link": {},
|
||||
"responsible": {},
|
||||
@ -54,6 +55,10 @@ class InvenTreePurchaseOrder extends InvenTreeOrder {
|
||||
fields.remove("project_code");
|
||||
}
|
||||
|
||||
if (!InvenTreeAPI().supportsPurchaseOrderDestination) {
|
||||
fields.remove("destination");
|
||||
}
|
||||
|
||||
return fields;
|
||||
|
||||
}
|
||||
@ -87,6 +92,8 @@ class InvenTreePurchaseOrder extends InvenTreeOrder {
|
||||
|
||||
String get supplierReference => getString("supplier_reference");
|
||||
|
||||
int get destinationId => getInt("destination");
|
||||
|
||||
bool get isOpen => api.PurchaseOrderStatus.isNameIn(status, ["PENDING", "PLACED", "ON_HOLD"]);
|
||||
|
||||
bool get isPending => api.PurchaseOrderStatus.isNameIn(status, ["PENDING", "ON_HOLD"]);
|
||||
|
@ -310,6 +310,9 @@
|
||||
"description": "Description",
|
||||
"@description": {},
|
||||
|
||||
"destination": "Destination",
|
||||
"@destination": {},
|
||||
|
||||
"destroyed": "Destroyed",
|
||||
"@destroyed": {},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user