From bdc55733119ae875b2d01dbdd07f880d87a0a678 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sun, 28 Sep 2025 13:34:22 +1000 Subject: [PATCH] Re-order barcode scanning priority (#693) * Re-order barcode scanning priority - Closes https://github.com/inventree/inventree-app/issues/692 * dart format * Try with removed line * Try without pythonscript * just pub get * try with fvm * Remove fvm * set working dir * try just pub get * Install python first * Updates * Use fvm * Adjust CI --- .github/workflows/ci.yaml | 23 +++++++++++++---------- assets/release_notes.md | 5 +++++ find_dart_files.py | 2 ++ lib/barcode/barcode.dart | 6 +++--- pubspec.yaml | 2 +- 5 files changed, 24 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b61677de..2ecf506b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -30,6 +30,11 @@ jobs: with: submodules: recursive + - name: Install Python + uses: actions/setup-python@v4 + with: + python-version: 3.9 + - name: Setup Java uses: actions/setup-java@v3 with: @@ -53,20 +58,18 @@ jobs: - name: Collect Translation Files run: | cd lib/l10n - python3 collect_translations.py + python collect_translations.py - name: Static Analysis Tests + working-directory: . run: | - python3 find_dart_files.py - flutter pub get - flutter analyze + python ./find_dart_files.py + dart pub global activate fvm + fvm install + fvm flutter pub get + fvm flutter analyze dart format --output=none --set-exit-if-changed . - - name: Install Python - uses: actions/setup-python@v4 - with: - python-version: 3.9 - - name: Start InvenTree Server run: | sudo apt-get install python3-dev python3-pip python3-venv python3-wheel g++ @@ -82,7 +85,7 @@ jobs: - name: Unit Tests run: | - flutter test --coverage + fvm flutter test --coverage - name: Coveralls uses: coverallsapp/github-action@master diff --git a/assets/release_notes.md b/assets/release_notes.md index de12516f..78696039 100644 --- a/assets/release_notes.md +++ b/assets/release_notes.md @@ -1,3 +1,8 @@ +### 0.19.3 - September 2025 +--- + +- Fixes incorrect priority of barcode scanner results + ### 0.19.2 - August 2025 --- diff --git a/find_dart_files.py b/find_dart_files.py index dbb1479b..80fba3a1 100644 --- a/find_dart_files.py +++ b/find_dart_files.py @@ -13,6 +13,8 @@ from pathlib import Path if __name__ == "__main__": dart_files = Path("lib").rglob("*.dart") + print("Discovering dart files..."); + with open("test/coverage_helper_test.dart", "w") as f: f.write("// ignore_for_file: unused_import\n\n") f.write("// dart format off\n\n") diff --git a/lib/barcode/barcode.dart b/lib/barcode/barcode.dart index ddbb319e..8fe50caa 100644 --- a/lib/barcode/barcode.dart +++ b/lib/barcode/barcode.dart @@ -250,12 +250,12 @@ class BarcodeScanHandler extends BarcodeHandler { // The following model types can be matched with barcodes List validModels = [ - InvenTreePart.MODEL_TYPE, - InvenTreeCompany.MODEL_TYPE, InvenTreeStockItem.MODEL_TYPE, - InvenTreeStockLocation.MODEL_TYPE, InvenTreeSupplierPart.MODEL_TYPE, InvenTreeManufacturerPart.MODEL_TYPE, + InvenTreePart.MODEL_TYPE, + InvenTreeStockLocation.MODEL_TYPE, + InvenTreeCompany.MODEL_TYPE, ]; if (InvenTreeAPI().supportsOrderBarcodes) { diff --git a/pubspec.yaml b/pubspec.yaml index e1629a55..0b9b3d55 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: inventree description: InvenTree stock management -version: 0.19.2+101 +version: 0.19.3+102 environment: sdk: ^3.8.1