nu_pos_react/src/state/machines/orderMachine.ts
Order states
Kitchen status mapping
Order metadata
Guest count and staff assignment are set when an order is created via theStartOrderModal. The guest count can also be edited after creation by tapping the guest count indicator in the order panel header. This reopens the same modal in edit mode, pre-filled with the current count.
The SET_TABLE_META action updates guestCount and staffName on the active order.
Core events
Business rules
- Entering
paidforcesstatus = "paid"— no further edits are allowed. - Draft loads normalize missing
statusto"open". - Split behavior: Source check becomes
"changed", destination checks inherit"sent"(not treated as new tickets). - After payment is complete and the user taps Done, the app submits the order to Odoo. On success it navigates back to the floor plan, preserving area context (
/?area=...) when available.
Configurable kitchen notifications
Thesend_changes_to_kitchen setting on the shared POS config (nu.pos.config) controls whether non-quantity operations notify the kitchen:
Configure in Odoo: Point of Sale > Configuration > select config > “Send non-quantity changes to kitchen” checkbox.
This setting applies to:
- Splitting a sent order (source order status)
- Removing items from a sent order
- Adding items to a sent order
- Transferring items between orders
Kitchen provenance
Order items carry optionalkitchenTicketId and kitchenSentAt fields to remember the ticket and time they were originally sent. This is used when splitting a sent check — the new checks know which kitchen ticket their items came from.