Skip to main content
Version: v1.0.0(int)

W143: Bulk-import work orders

Creates many WOs at once from an uploaded CSV or Excel file. Triggered from the Data page, WO import. Atomic; all rows succeed or none do.

Steps

  1. Parse the upload. Read the file into rows of { header, items[] }. Collect parse errors into a list.

  2. Abort on parse failures. If any rows failed to parse, raise a ValidationError.

  3. Create each WO inside one transaction. Open withTransaction. For each parsed row, run the Create WO flow (W129) steps 1 to 7. The step-7 reconciliation projector seeds FG ORDER / DEMAND / ALLOCATE ledger entries per the row's initial status (nothing for a Draft row).

  4. Commit. Any failure rolls the whole batch back.

Returns

The list of created WO numbers.

Business rules

  • All or nothing. Atomic import.

Errors

  • ValidationError. Parse failures or any single row failing the Create WO rules.