feat: ordering from the menu tablet at a table (platform-v2 step 6.6, D-30)

- tablet_orders (0034) + services/tablet_orders.py: venue rules (menu_tablet.ordering) with
  per-tablet overrides: kitchen or waiter confirms first, no open order open/refuse, limits
  (items per order, of one dish, time between orders)
- /api/menu-tablet: quote, order, order/{id}, bill (see + ask), requests accept/decline, ordering
- terminal: Add to the order (POS ProductDialog), cart, note, send, live status, the bill
- waiter: TabletRequests on the table page, tablet_order message theme with Open the table
- manager: Settings -> Menu tablets
- tests: test_tablet_orders.py, menu-tablet unit, menu_tablet.mjs e2e (the done-when)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-18 14:42:37 +02:00
co-authored by Claude Opus 5.5
parent c43dc8b55b
commit c1af7770cf
34 changed files with 1491 additions and 28 deletions
+13 -1
View File
@@ -1,5 +1,5 @@
"""Module manifest — see core/modules/model.py and APPS_PLATFORM §4."""
from core.modules.model import ConfigField, DeviceApp, Limit, Module, Mount, Perm
from core.modules.model import ConfigField, DeviceApp, Limit, Module, Mount, Perm, SettingDef
POINTS = ('in_store', 'in_store_takeaway', 'qr_table', 'online_takeaway', 'online_delivery', 'online_preorder', 'none')
@@ -18,6 +18,10 @@ MODULE = Module(
routers=(
Mount('routers.menu_tablet', '/api/menu-tablet'),
),
# Ordering from a tablet at a table (6.6, D-30): the venue's rules, each overridable per tablet
settings=(
SettingDef('menu_tablet.ordering', '{}', 'Ordering from menu tablets at tables (plan step 6.6): confirm (kitchen | waiter), no_order (open | refuse), max_items, max_of_one, min_seconds. Edited in Settings > Menu tablets.', type='json'),
),
# How the menu looks on this tablet (owner 2026-11-17: views, photos, descriptions, grouping…)
device_app=DeviceApp(login_modes=('none',), scope=(), config=(
ConfigField('view', 'enum', default='expanded', choices=('compact', 'expanded', 'full'), group='look'),
@@ -34,5 +38,13 @@ MODULE = Module(
# A tablet on a table (5.7b): only then guests can call a waiter
ConfigField('table', 'ref', default=None, choices_from='tables', group='table'),
ConfigField('call_waiter', 'bool', default=True, group='table'),
# Guests order from it (6.6, D-30): off until the venue turns it on; the rest -1 / venue = the venue's setting
ConfigField('ordering', 'bool', default=False, group='order'),
ConfigField('bill', 'bool', default=True, group='order'),
ConfigField('order_confirm', 'enum', default='venue', choices=('venue', 'kitchen', 'waiter'), group='order'),
ConfigField('order_no_order', 'enum', default='venue', choices=('venue', 'open', 'refuse'), group='order'),
ConfigField('order_max_items', 'int', default=-1, choices=(-1, 5, 10, 15, 20, 30, 50), group='order'),
ConfigField('order_max_of_one', 'int', default=-1, choices=(-1, 1, 2, 3, 5, 10, 20), group='order'),
ConfigField('order_min_seconds', 'int', default=-1, choices=(-1, 0, 30, 60, 120, 300, 600), group='order'),
)),
)