Skip to content

Warehouse Operations

Overview

Warehouse operations cover physical device handling: tasks (putaway, pick, pack, relocate), packing boxes for shipping, device movements for audit trail, and barcode scanning.


Part 1: Warehouse Tasks

  • My Tasks: Inventory → Device Inventory → Warehouse Operations → My Tasks
  • All Tasks: Inventory → Device Inventory → Warehouse Operations → All Tasks

Warehouse Tasks

Task Types

Type Description
Putaway Move received devices from receiving dock to storage locations
Pick Retrieve devices from storage for a sales order
Relocate Move devices between storage locations
QC Move Move devices to/from QC area
Pack Pack devices into shipping boxes

Task Lifecycle

pending → assigned → in_progress → done
  • pending: Task created (e.g., auto-created after manifest complete)
  • assigned: Worker claims the task (assign to self)
  • in_progress: Worker starts the task, begins scanning devices
  • done: All devices processed, task completed

Working a Task

  1. View "My Tasks" to see assigned tasks
  2. Click a task to open it
  3. Start the task (status → in_progress)
  4. Scan devices with barcode scanner
  5. Complete the task (status → done)

Part 2: Packing Boxes

  • Path: Inventory → Device Inventory → Warehouse Operations → Packing Boxes

Packing Boxes

  • Model: packing.box

Box States

draft → packing → ready → shipped → cancelled

Packing Workflow

  1. Create box for a Sales Order
  2. Scan devices into the box using barcode (JSON-RPC endpoint: scan_device(imei))
  3. Progress tracking: count of packed devices vs expected
  4. Mark ready to ship when all devices packed
  5. Mark shipped:
  6. action_mark_shipped() triggers:
  7. Marks devices as sold via action_mark_sold()
  8. Creates COGS GL entry
  9. Creates customer invoice
  10. Creates settlement reports (if consignment)
  11. Print label with barcode for the box

Box Fields

Field Description
sale_order_id Link to SO being fulfilled
state draft, packing, ready, shipped, cancelled
device_count Number of devices packed
box_barcode Unique barcode for the box

Part 3: Device Movements

  • Path: Inventory → Device Inventory → Warehouse Operations → Movement History

Movement History

  • Model: device.movement

Overview

Every physical movement of a device is recorded as a device.movement record, creating a full audit trail.

Movement Types

Type Description Triggered By
receiving Device received from vendor Manifest receive
putaway Moved from receiving to storage Putaway task
pick Retrieved from storage for order Pick task
pack Placed in packing box Packing box scan
qc_in Moved to QC area QC handoff
qc_out Returned from QC area QC complete
relocate Moved between locations Relocate task
ship Shipped to customer Mark shipped
retail_transfer Moved to retail location Retail reservation

Movement Fields

Field Description
lot_id Device (stock.lot)
movement_type Type of movement (see above)
source_location_id Where device came from
dest_location_id Where device went
user_id Who performed the movement
timestamp When it happened

Automatic Location Updates

On movement creation, lot._update_current_location(dest_location) is called automatically to keep the device's current_location_id in sync.


Part 4: Barcode Scanning

Barcode scanning is used throughout the module:

Context How It Works
Manifest Receiving Scan IMEI → _quick_receive() → creates lot + quant
Delivery Picking Scan IMEI → _quick_pick() → matches to manifest line
Packing Boxes Scan IMEI → scan_device() → adds to box
Warehouse Tasks Scan IMEI → completes task line
  • Uses advisory locks (pg_try_advisory_xact_lock) for race condition prevention
  • Accessible via Barcode app → Manifest Receiving
  • Also available inline on manifest and task forms