Files
ERP-APP-INVENTORY/README.md
BACHIR SOULDI 37b0762921 first commit
2026-07-16 14:29:15 +01:00

3.8 KiB

Inventory App

A Flutter mobile app for conducting physical stock inventories against an Axelor ERP backend. Warehouse staff scan product QR codes, count stock by zone, and submit inventory lines directly to Axelor's REST API.

Features

  • Login against the Axelor ERP using session-cookie authentication, with the session persisted locally and re-validated on app start.
  • Inventory counting — scan a product QR code, pick a zone/stock location, choose a counting type (Comptage 1, Comptage Contrôle), enter a quantity and condition, and submit the count as an InventoryLine.
  • Zone scanning — scan a location QR code to auto-select the stock location for the current count.
  • Product creation — create a new product on the fly (name, family/sub-family, serial number, condition) with an initial inventory line, including a picture upload flow.
  • My Scans — review the inventory lines the current user has already submitted.
  • Bureau inventory — a dedicated search/review screen for inventory lines at a given location.
  • Panoramic viewer — 360° image viewer tab.
  • Profile — view the logged-in user's Axelor profile and log out.
  • Light/dark theme support.

Tech stack

Project structure

lib/
  controllers/    # GetX controllers (home, user, theme, simple UI state)
  models/         # Axelor entity DTOs (Product, Depot, InventoryLine, TrackingNumber, ...)
  service/        # AxelorClient (REST API) and product image upload flow
  views/          # Screens (login, home, QR scanner, product view, profile, ...)
  widgets/        # Shared glassmorphism-style UI components
  utils.dart      # Local, gitignored config (Axelor endpoints) — see Setup below
  constants.dart  # App-wide constants and text styles

Setup

Prerequisites

  • Flutter SDK (Dart SDK ^3.7.2, see pubspec.yaml)
  • Access to an Axelor ERP instance to point the app at

1. Install dependencies

flutter pub get

2. Configure the Axelor endpoint (required — the app will not build without this)

Two files hold real, environment-specific values and are gitignored so they never get committed. Copy each template and fill in your own values:

cp lib/utils.example.dart lib/utils.dart
cp android/app/src/main/res/xml/network_security_config.xml.example android/app/src/main/res/xml/network_security_config.xml
  • lib/utils.dart — sets Utils.url (the Axelor base URL, e.g. https://your-erp-host.example.com/prod) and Utils.ticketUrl (an external ticketing link opened from the drawer).
  • android/.../network_security_config.xml — Android's cleartext-traffic domain allowlist. Set the <domain> entry to match the host in Utils.url (only needed if your ERP is served over plain HTTP; otherwise this can be left with a dummy value).

3. Run the app

flutter run

Notes

  • The inventory ID targeted by counts is hardcoded in lib/constants.dart (kInventoryId) — update it to match the active inventory in your Axelor instance.
  • Session cookies are persisted via get_storage and validated against Axelor on each app start; an invalid/expired session bounces the user back to the login screen.