From baaa92eda57fe4a2b7e9014b1364fd57d4527a9f Mon Sep 17 00:00:00 2001 From: Oliver Date: Sat, 28 Dec 2024 10:36:05 +1100 Subject: [PATCH] Add some custom states (#86) * Add some custom states * Add custom status keys to some models --- inventree_data.json | 360 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 288 insertions(+), 72 deletions(-) diff --git a/inventree_data.json b/inventree_data.json index c56f89d..e05b91b 100644 --- a/inventree_data.json +++ b/inventree_data.json @@ -7458,6 +7458,70 @@ "definition": "ohm" } }, + { + "model": "common.inventreecustomuserstatemodel", + "pk": 1, + "fields": { + "reference_status": "StockStatus", + "logical_key": 50, + "key": 150, + "name": "INSPECT", + "label": "Incoming goods inspection", + "color": "warning", + "model": [ + "stock", + "stockitem" + ] + } + }, + { + "model": "common.inventreecustomuserstatemodel", + "pk": 2, + "fields": { + "reference_status": "PurchaseOrderStatus", + "logical_key": 25, + "key": 125, + "name": "APPROVAL", + "label": "Requires Approval", + "color": "info", + "model": [ + "order", + "purchaseorder" + ] + } + }, + { + "model": "common.inventreecustomuserstatemodel", + "pk": 3, + "fields": { + "reference_status": "SalesOrderStatus", + "logical_key": 25, + "key": 125, + "name": "PAYMENT", + "label": "Awaiting Payment", + "color": "secondary", + "model": [ + "order", + "salesorder" + ] + } + }, + { + "model": "common.inventreecustomuserstatemodel", + "pk": 4, + "fields": { + "reference_status": "BuildStatus", + "logical_key": 25, + "key": 125, + "name": "APPROVAL", + "label": "Pending Approval", + "color": "dark", + "model": [ + "build", + "build" + ] + } + }, { "model": "company.company", "pk": 1, @@ -46490,13 +46554,13 @@ "pk": 1, "fields": { "metadata": null, - "quantity": "1.00000", "reference": "", "notes": "Apparently let out the magic smoke", "link": "", "target_date": "2023-04-20", "order": 2, "item": 1012, + "quantity": "1.00000", "received_date": "2023-03-28", "outcome": 10, "price_currency": "USD", @@ -46509,13 +46573,13 @@ "pk": 2, "fields": { "metadata": null, - "quantity": "1.00000", "reference": "", "notes": "Wrong color", "link": "", "target_date": "2023-06-23", "order": 2, "item": 1020, + "quantity": "1.00000", "received_date": null, "outcome": 10, "price_currency": "USD", @@ -46528,13 +46592,13 @@ "pk": 3, "fields": { "metadata": null, - "quantity": "1.00000", "reference": "", "notes": "", "link": "", "target_date": null, "order": 3, "item": 1017, + "quantity": "1.00000", "received_date": "2023-03-28", "outcome": 40, "price_currency": "USD", @@ -47582,7 +47646,7 @@ "model": "part.partpricing", "pk": 425, "fields": { - "updated": "2024-08-08T06:55:23.435Z", + "updated": "2024-12-27T23:14:14.045Z", "currency": "USD", "scheduled_for_update": false, "part": 88, @@ -49652,7 +49716,7 @@ "model": "part.partpricing", "pk": 471, "fields": { - "updated": "2024-08-08T06:55:24.007Z", + "updated": "2024-12-27T23:14:14.036Z", "currency": "USD", "scheduled_for_update": false, "part": 81, @@ -49790,7 +49854,7 @@ "model": "part.partpricing", "pk": 474, "fields": { - "updated": "2024-08-08T06:55:22.152Z", + "updated": "2024-12-27T23:14:14.033Z", "currency": "USD", "scheduled_for_update": false, "part": 52, @@ -50940,7 +51004,7 @@ "model": "part.partpricing", "pk": 499, "fields": { - "updated": "2024-10-17T08:39:31.468Z", + "updated": "2024-12-27T23:14:14.031Z", "currency": "USD", "scheduled_for_update": false, "part": 74, @@ -51124,7 +51188,7 @@ "model": "part.partpricing", "pk": 503, "fields": { - "updated": "2024-07-27T05:08:26.078Z", + "updated": "2024-12-27T23:14:14.038Z", "currency": "USD", "scheduled_for_update": false, "part": 83, @@ -51216,7 +51280,7 @@ "model": "part.partpricing", "pk": 505, "fields": { - "updated": "2024-07-27T05:07:09.124Z", + "updated": "2024-12-27T23:14:14.040Z", "currency": "USD", "scheduled_for_update": false, "part": 85, @@ -52136,7 +52200,7 @@ "model": "part.partpricing", "pk": 525, "fields": { - "updated": "2024-08-08T06:55:20.601Z", + "updated": "2024-12-27T23:14:14.042Z", "currency": "USD", "scheduled_for_update": false, "part": 108, @@ -69685,7 +69749,8 @@ "units": "", "description": "Component package code", "checkbox": false, - "choices": "" + "choices": "", + "selectionlist": null } }, { @@ -69697,7 +69762,8 @@ "units": "ohms", "description": "Resistance value", "checkbox": false, - "choices": "" + "choices": "", + "selectionlist": null } }, { @@ -69709,7 +69775,8 @@ "units": "percent", "description": "", "checkbox": false, - "choices": "" + "choices": "", + "selectionlist": null } }, { @@ -69721,7 +69788,8 @@ "units": "mm", "description": "Part length", "checkbox": false, - "choices": "" + "choices": "", + "selectionlist": null } }, { @@ -69733,7 +69801,8 @@ "units": "mm", "description": "Metric thread pitch", "checkbox": false, - "choices": "" + "choices": "", + "selectionlist": null } }, { @@ -69745,7 +69814,8 @@ "units": "mm", "description": "", "checkbox": false, - "choices": "" + "choices": "", + "selectionlist": null } }, { @@ -69757,7 +69827,8 @@ "units": "mm", "description": "", "checkbox": false, - "choices": "" + "choices": "", + "selectionlist": null } }, { @@ -69769,7 +69840,8 @@ "units": "", "description": "Part color", "checkbox": false, - "choices": "Red, Blue, Green, Orange, Yellow, Black, White, Pink, Purple" + "choices": "Red, Blue, Green, Orange, Yellow, Black, White, Pink, Purple", + "selectionlist": null } }, { @@ -69781,7 +69853,8 @@ "units": "m^3", "description": "", "checkbox": false, - "choices": "" + "choices": "", + "selectionlist": null } }, { @@ -69793,7 +69866,8 @@ "units": "", "description": "", "checkbox": false, - "choices": "" + "choices": "", + "selectionlist": null } }, { @@ -69805,7 +69879,8 @@ "units": "mm", "description": "", "checkbox": false, - "choices": "" + "choices": "", + "selectionlist": null } }, { @@ -69817,7 +69892,8 @@ "units": "", "description": "", "checkbox": false, - "choices": "" + "choices": "", + "selectionlist": null } }, { @@ -69829,7 +69905,8 @@ "units": "", "description": "", "checkbox": false, - "choices": "1, 2, 3, 4, 5, 6, 7" + "choices": "1, 2, 3, 4, 5, 6, 7", + "selectionlist": null } }, { @@ -69841,7 +69918,8 @@ "units": "V", "description": "Rated voltage", "checkbox": false, - "choices": "" + "choices": "", + "selectionlist": null } }, { @@ -69853,7 +69931,8 @@ "units": "F", "description": "Capacitance value", "checkbox": false, - "choices": "" + "choices": "", + "selectionlist": null } }, { @@ -69865,7 +69944,8 @@ "units": "H", "description": "Inductance value", "checkbox": false, - "choices": "" + "choices": "", + "selectionlist": null } }, { @@ -69877,7 +69957,8 @@ "units": "W", "description": "Power Rating", "checkbox": false, - "choices": "" + "choices": "", + "selectionlist": null } }, { @@ -69889,7 +69970,8 @@ "units": "", "description": "Wire gauge (conductor CSA)", "checkbox": false, - "choices": "" + "choices": "", + "selectionlist": null } }, { @@ -69901,7 +69983,8 @@ "units": "", "description": "Is this part polarized?", "checkbox": true, - "choices": "" + "choices": "", + "selectionlist": null } }, { @@ -88053,7 +88136,8 @@ "fields": { "metadata": null, "part_1": 89, - "part_2": 92 + "part_2": 92, + "note": "" } }, { @@ -88062,7 +88146,8 @@ "fields": { "metadata": null, "part_1": 89, - "part_2": 93 + "part_2": 93, + "note": "" } }, { @@ -88071,7 +88156,8 @@ "fields": { "metadata": null, "part_1": 89, - "part_2": 90 + "part_2": 90, + "note": "" } }, { @@ -88080,7 +88166,8 @@ "fields": { "metadata": null, "part_1": 89, - "part_2": 91 + "part_2": 91, + "note": "" } }, { @@ -88089,7 +88176,8 @@ "fields": { "metadata": null, "part_1": 84, - "part_2": 82 + "part_2": 82, + "note": "" } }, { @@ -88981,7 +89069,7 @@ "pk": 1, "fields": { "password": "pbkdf2_sha256$600000$eW6hr1msXY3U1vkqy3K4wd$/egntyTaLBCUPnM1nM2LIbbDGjKfccvIOgexovlFKjo=", - "last_login": "2024-11-18T13:48:17.277Z", + "last_login": "2024-12-27T09:31:45.105Z", "is_superuser": true, "username": "admin", "first_name": "", @@ -115069,6 +115157,134 @@ } } }, + { + "model": "stock.stockitemtracking", + "pk": 1392, + "fields": { + "tracking_type": 5, + "item": 1225, + "date": "2024-12-27T23:10:58.558Z", + "notes": "", + "user": [ + "admin" + ], + "deltas": { + "status": 50 + } + } + }, + { + "model": "stock.stockitemtracking", + "pk": 1393, + "fields": { + "tracking_type": 5, + "item": 220, + "date": "2024-12-27T23:11:06.959Z", + "notes": "", + "user": [ + "admin" + ], + "deltas": { + "status": 50 + } + } + }, + { + "model": "stock.stockitemtracking", + "pk": 1394, + "fields": { + "tracking_type": 5, + "item": 994, + "date": "2024-12-27T23:11:12.531Z", + "notes": "", + "user": [ + "admin" + ], + "deltas": { + "status": 50 + } + } + }, + { + "model": "stock.stockitemtracking", + "pk": 1395, + "fields": { + "tracking_type": 5, + "item": 1241, + "date": "2024-12-27T23:11:16.624Z", + "notes": "", + "user": [ + "admin" + ], + "deltas": { + "status": 50 + } + } + }, + { + "model": "stock.stockitemtracking", + "pk": 1396, + "fields": { + "tracking_type": 5, + "item": 717, + "date": "2024-12-27T23:11:23.911Z", + "notes": "", + "user": [ + "admin" + ], + "deltas": { + "status": 50 + } + } + }, + { + "model": "stock.stockitemtracking", + "pk": 1397, + "fields": { + "tracking_type": 5, + "item": 342, + "date": "2024-12-27T23:11:28.340Z", + "notes": "", + "user": [ + "admin" + ], + "deltas": { + "status": 50 + } + } + }, + { + "model": "stock.stockitemtracking", + "pk": 1398, + "fields": { + "tracking_type": 5, + "item": 1073, + "date": "2024-12-27T23:11:33.039Z", + "notes": "", + "user": [ + "admin" + ], + "deltas": { + "status": 50 + } + } + }, + { + "model": "stock.stockitemtracking", + "pk": 1399, + "fields": { + "tracking_type": 5, + "item": 1089, + "date": "2024-12-27T23:11:36.384Z", + "notes": "", + "user": [ + "admin" + ], + "deltas": { + "status": 50 + } + } + }, { "model": "stock.stockitem", "pk": 2, @@ -122723,11 +122939,11 @@ "model": "stock.stockitem", "pk": 220, "fields": { - "metadata": null, + "metadata": {}, "notes": null, "barcode_data": "", "barcode_hash": "", - "updated": "2021-11-15T00:00:00Z", + "updated": "2024-12-27T23:11:07.001Z", "parent": null, "part": 85, "supplier_part": 197, @@ -122750,11 +122966,11 @@ "stocktake_user": null, "review_needed": false, "delete_on_deplete": true, - "status": 10, + "status": 50, "purchase_price_currency": "USD", "purchase_price": "7.500000", "owner": null, - "status_custom_key": null, + "status_custom_key": 150, "lft": 1, "rght": 2, "tree_id": 198, @@ -127811,11 +128027,11 @@ "model": "stock.stockitem", "pk": 342, "fields": { - "metadata": null, + "metadata": {}, "notes": null, "barcode_data": "", "barcode_hash": "", - "updated": "2022-04-29T00:00:00Z", + "updated": "2024-12-27T23:11:28.382Z", "parent": null, "part": 88, "supplier_part": null, @@ -127838,11 +128054,11 @@ "stocktake_user": null, "review_needed": false, "delete_on_deplete": false, - "status": 10, + "status": 50, "purchase_price_currency": "USD", "purchase_price": null, "owner": null, - "status_custom_key": null, + "status_custom_key": 150, "lft": 1, "rght": 2, "tree_id": 319, @@ -140601,7 +140817,7 @@ "notes": null, "barcode_data": "", "barcode_hash": "", - "updated": "2024-07-27T05:11:23.060Z", + "updated": "2024-12-27T23:11:23.954Z", "parent": null, "part": 52, "supplier_part": 694, @@ -140626,11 +140842,11 @@ ], "review_needed": false, "delete_on_deplete": true, - "status": 10, + "status": 50, "purchase_price_currency": "USD", "purchase_price": "0.285040", "owner": null, - "status_custom_key": null, + "status_custom_key": 150, "lft": 1, "rght": 2, "tree_id": 621, @@ -152245,11 +152461,11 @@ "model": "stock.stockitem", "pk": 994, "fields": { - "metadata": null, + "metadata": {}, "notes": null, "barcode_data": "", "barcode_hash": "", - "updated": "2022-09-07T00:00:00Z", + "updated": "2024-12-27T23:11:12.575Z", "parent": 231, "part": 108, "supplier_part": null, @@ -152272,11 +152488,11 @@ "stocktake_user": null, "review_needed": false, "delete_on_deplete": true, - "status": 10, + "status": 50, "purchase_price_currency": "USD", "purchase_price": null, "owner": null, - "status_custom_key": null, + "status_custom_key": 150, "lft": 4, "rght": 5, "tree_id": 208, @@ -155567,11 +155783,11 @@ "model": "stock.stockitem", "pk": 1073, "fields": { - "metadata": null, + "metadata": {}, "notes": null, "barcode_data": "", "barcode_hash": "", - "updated": "2022-11-12T00:00:00Z", + "updated": "2024-12-27T23:11:33.081Z", "parent": null, "part": 81, "supplier_part": null, @@ -155594,11 +155810,11 @@ "stocktake_user": null, "review_needed": false, "delete_on_deplete": false, - "status": 10, + "status": 50, "purchase_price_currency": "USD", "purchase_price": null, "owner": null, - "status_custom_key": null, + "status_custom_key": 150, "lft": 1, "rght": 2, "tree_id": 975, @@ -156239,11 +156455,11 @@ "model": "stock.stockitem", "pk": 1089, "fields": { - "metadata": null, + "metadata": {}, "notes": null, "barcode_data": "", "barcode_hash": "", - "updated": "2022-11-12T00:00:00Z", + "updated": "2024-12-27T23:11:36.425Z", "parent": null, "part": 81, "supplier_part": null, @@ -156266,11 +156482,11 @@ "stocktake_user": null, "review_needed": false, "delete_on_deplete": false, - "status": 10, + "status": 50, "purchase_price_currency": "USD", "purchase_price": null, "owner": null, - "status_custom_key": null, + "status_custom_key": 150, "lft": 1, "rght": 2, "tree_id": 991, @@ -161957,7 +162173,7 @@ "notes": null, "barcode_data": "", "barcode_hash": "", - "updated": "2024-07-27T05:08:25.650Z", + "updated": "2024-12-27T23:10:58.563Z", "parent": null, "part": 83, "supplier_part": null, @@ -161980,11 +162196,11 @@ "stocktake_user": null, "review_needed": false, "delete_on_deplete": true, - "status": 10, + "status": 50, "purchase_price_currency": "USD", "purchase_price": null, "owner": null, - "status_custom_key": null, + "status_custom_key": 150, "lft": 1, "rght": 2, "tree_id": 1120, @@ -162631,7 +162847,7 @@ "notes": null, "barcode_data": "", "barcode_hash": "", - "updated": "2024-10-17T08:29:29.668Z", + "updated": "2024-12-27T23:11:16.666Z", "parent": null, "part": 74, "supplier_part": null, @@ -162654,11 +162870,11 @@ "stocktake_user": null, "review_needed": false, "delete_on_deplete": false, - "status": 10, + "status": 50, "purchase_price_currency": "USD", "purchase_price": null, "owner": null, - "status_custom_key": null, + "status_custom_key": 150, "lft": 1, "rght": 2, "tree_id": 1135, @@ -204287,7 +204503,7 @@ "model": "order.salesorder", "pk": 4, "fields": { - "metadata": null, + "metadata": {}, "reference_int": 4, "notes": "", "barcode_data": "", @@ -204308,11 +204524,11 @@ "address": null, "reference": "SO0004", "customer": 32, - "status": 10, + "status": 25, "customer_reference": "", "shipment_date": null, "shipped_by": null, - "status_custom_key": null + "status_custom_key": 125 } }, { @@ -204973,7 +205189,7 @@ "fields": { "metadata": {}, "reference_int": 13, - "notes": null, + "notes": "", "barcode_data": "", "barcode_hash": "", "total_price_currency": "USD", @@ -204998,7 +205214,7 @@ "issue_date": null, "complete_date": null, "destination": null, - "status_custom_key": null + "status_custom_key": 125 } }, { @@ -208091,7 +208307,7 @@ "fields": { "metadata": {}, "reference_int": 23, - "notes": null, + "notes": "", "barcode_data": "", "barcode_hash": "", "reference": "BO0023", @@ -208104,7 +208320,7 @@ "quantity": 10, "completed": 0, "status": 25, - "batch": "", + "batch": null, "creation_date": "2024-08-08", "target_date": null, "completion_date": null, @@ -208116,7 +208332,7 @@ "link": "", "priority": 0, "project_code": null, - "status_custom_key": null, + "status_custom_key": 125, "lft": 1, "rght": 2, "tree_id": 19,