diff --git a/.github/workflows/import_data.yaml b/.github/workflows/import_data.yaml index ae1440f..aded3b8 100644 --- a/.github/workflows/import_data.yaml +++ b/.github/workflows/import_data.yaml @@ -3,12 +3,42 @@ name: Import Dataset on: ["push", "pull_request"] jobs: - build: + stable: runs-on: ubuntu-latest env: INVENTREE_DB_ENGINE: sqlite3 - INVENTREE_DB_NAME: inventree_db.sqlite3 + INVENTREE_DB_NAME: inventree_db_stable.sqlite3 + INVENTREE_BACKUP_DIR: $GITHUB_WORKSPACE/path/to/backup + INVENTREE_MEDIA_ROOT: $GITHUB_WORKSPACE/path/to/media + INVENTREE_STATIC_ROOT: $GITHUB_WORKSPACE/path/to/static + + steps: + - name: Checkout Code + uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Install InvenTree + run: | + sudo apt-get install python3-dev python3-pip python3-venv python3-wheel g++ + pip3 install invoke + git clone --depth 1 https://github.com/inventree/inventree inventree -b stable + cd inventree + invoke install + - name: Import Database Records + run: | + cd inventree + invoke migrate + invoke import-records -c -f $GITHUB_WORKSPACE/inventree_data.json + + latest: + runs-on: ubuntu-latest + + env: + INVENTREE_DB_ENGINE: sqlite3 + INVENTREE_DB_NAME: inventree_db_latest.sqlite3 INVENTREE_BACKUP_DIR: $GITHUB_WORKSPACE/path/to/backup INVENTREE_MEDIA_ROOT: $GITHUB_WORKSPACE/path/to/media INVENTREE_STATIC_ROOT: $GITHUB_WORKSPACE/path/to/static diff --git a/inventree_data.json b/inventree_data.json index 6142b49..c56f89d 100644 --- a/inventree_data.json +++ b/inventree_data.json @@ -45471,7 +45471,7 @@ "part": 74, "sale_price_currency": "USD", "sale_price": "12.450000", - "shipped": "0.00000" + "shipped": "1.00000" } }, { @@ -46430,7 +46430,7 @@ "pk": 91, "fields": { "line": 27, - "shipment": null, + "shipment": 12, "item": 1286, "quantity": "1.00000" } @@ -46440,7 +46440,7 @@ "pk": 92, "fields": { "line": 27, - "shipment": null, + "shipment": 14, "item": 1294, "quantity": "1.00000" } @@ -46450,7 +46450,7 @@ "pk": 93, "fields": { "line": 27, - "shipment": null, + "shipment": 12, "item": 1295, "quantity": "1.00000" } @@ -46460,7 +46460,7 @@ "pk": 94, "fields": { "line": 29, - "shipment": null, + "shipment": 7, "item": 1288, "quantity": "1.00000" } @@ -46470,7 +46470,7 @@ "pk": 95, "fields": { "line": 29, - "shipment": null, + "shipment": 13, "item": 1287, "quantity": "1.00000" } @@ -46480,7 +46480,7 @@ "pk": 96, "fields": { "line": 29, - "shipment": null, + "shipment": 7, "item": 1289, "quantity": "1.00000" } @@ -88981,7 +88981,7 @@ "pk": 1, "fields": { "password": "pbkdf2_sha256$600000$eW6hr1msXY3U1vkqy3K4wd$/egntyTaLBCUPnM1nM2LIbbDGjKfccvIOgexovlFKjo=", - "last_login": "2024-11-08T13:41:20.839Z", + "last_login": "2024-11-18T13:48:17.277Z", "is_superuser": true, "username": "admin", "first_name": "", @@ -115051,6 +115051,24 @@ } } }, + { + "model": "stock.stockitemtracking", + "pk": 1391, + "fields": { + "tracking_type": 60, + "item": 1287, + "date": "2024-11-18T13:50:05.056Z", + "notes": null, + "user": [ + "admin" + ], + "deltas": { + "customer": 34, + "salesorder": 8, + "customer_name": "Customer D" + } + } + }, { "model": "stock.stockitem", "pk": 2, @@ -164545,14 +164563,14 @@ "notes": null, "barcode_data": "", "barcode_hash": "", - "updated": "2024-07-27T05:10:45.490Z", + "updated": "2024-11-18T13:50:05.052Z", "parent": null, "part": 74, "supplier_part": null, - "location": 14, + "location": null, "packaging": "", "belongs_to": null, - "customer": null, + "customer": 34, "serial": "162", "serial_int": 162, "link": "", @@ -164562,7 +164580,7 @@ "consumed_by": null, "is_building": false, "purchase_order": null, - "sales_order": null, + "sales_order": 8, "expiry_date": null, "stocktake_date": null, "stocktake_user": null, @@ -204135,6 +204153,38 @@ "link": "" } }, + { + "model": "order.salesordershipment", + "pk": 13, + "fields": { + "metadata": {}, + "notes": null, + "order": 8, + "shipment_date": "2024-11-18", + "delivery_date": null, + "checked_by": null, + "reference": "2", + "tracking_number": "TRK-0001", + "invoice_number": "", + "link": "https://shipping.co/track-123" + } + }, + { + "model": "order.salesordershipment", + "pk": 14, + "fields": { + "metadata": {}, + "notes": null, + "order": 11, + "shipment_date": null, + "delivery_date": null, + "checked_by": null, + "reference": "SHIP-ABC", + "tracking_number": "TRK-XYZ", + "invoice_number": "INV-123", + "link": "" + } + }, { "model": "order.salesorder", "pk": 1,