SmartERP Documentation An Ashewa Technology Solutions Platform

Factory Processing, Hulling & Lot Segregation

Factory manufacturing orders (MO), parchment hulling, color sorter culls, finished green bean lot generation, and byproduct inventory allocation.

Factory Milling & Hulling Production Runs#

At the central processing facility (typically located in Addis Ababa / Kality or industrial milling zones in Jimma, Hawassa, or Dire Dawa), parchment coffee undergoes multi-stage dry milling:

  1. Pre-cleaning & Destoning: Removal of sticks, stones, and heavy foreign matter.
  2. Hulling: Mechanical stripping of dry parchment husks (for washed coffee) or dried cherry pods (for natural unwashed coffee).
  3. Grading & Size Screening: Separation into standard screen sizes (Screen 14 to Screen 18).
  4. Density Gravity Table: Separation of underdeveloped, insect-damaged, or hollow beans.
  5. Optical Color Sorting & Hand-Picking: Electronic and manual removal of defective black, sour, or moldy beans.

Lot Inheritance & Byproduct Segregation#

When factory supervisors click Mark as Done (button_mark_done()) on the mrp.production order, SmartERP enforces automated lot continuity:

flowchart TD
    A["Raw Parchment Component<br/>(Source Lot: LOT-YIRG-2026-004)"] --> B{"MRP Milling Run"}
    B --> C["Finished Export Green Beans<br/>(Auto Lot: LOT-YIRG-2026-004)"]
    B --> D["Byproduct Husks<br/>(Assigned to Byproduct Lot)"]
    B --> E["Byproduct Triage / Black Rejects<br/>(Assigned to Local Market Lot)"]
    C --> F["Sales Contract Status -> 'Processed'"]

Business Logic Enforced in mrp_production.py#

  • Source Lot Validation: If raw coffee components lack an assigned lot, button_mark_done() raises a strict ValidationError: "Coffee component must have a lot before completing the MO."
  • Finished Lot Naming: The system creates or reuses the source lot name on the finished product (StockLot.create()), guaranteeing uninterrupted traceability from farm gate to destination port.
  • Contract State Automation: Upon order completion, sales_contract_id.state transitions automatically to 'processed', signaling shipping and export clearance teams.

Tip

Keep byproduct recovery ratios balanced. Standard washed Arabica yields approximately 80% exportable green beans and 20% parchment husk and triage. Yield deviations greater than 5% usually indicate machine misalignment or over-drying at the washing station.

Last updated: 2026-11-12