production_health
Identify late starts and stuck manufacturing orders with a single call. Get a verdict on production health.
Instructions
Report manufacturing health — late starts and stuck orders — in one call.
Composes open mrp.production orders (confirmed / progress / to_close) into a by-state backlog, orders that should have started but haven't (confirmed with date_start in the past), orders running longer than stuck_days, and a rule-based verdict.
Args: stuck_days: Days an order may run (progress/to_close) before it counts as stuck (default 14). top_n: Rows in the behind-start / stuck lists (default 5). timezone_offset: UTC offset for "today" (default 7 = Asia/Ho_Chi_Minh). company: Optional company name (ilike) or id to scope the report.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top_n | No | ||
| company | No | ||
| stuck_days | No | ||
| timezone_offset | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |