Friday, August 21, 2026
2 changes · master
Code cleanup and technical improvements
Point of Sale customer displays now communicate with terminals more directly and only when a display is actually connected. This reduces unnecessary background activity, improves reliability after startup or reload, and makes future display-related changes easier to maintain.
Original PR description
pos*: point_of_sale, pos_loyalty, pos_hr, pos_online_payment, pos_stock, l10n_in_pos, l10n_id_pos Refactor the customer display communication to make it more efficient, decouple the terminal and…
pos*: point_of_sale, pos_loyalty, pos_hr, pos_online_payment, pos_stock,
l10n_in_pos, l10n_id_pos
Refactor the customer display communication to make it more efficient,
decouple the terminal and display sides, and avoid unnecessary requests
when no display is connected.
- Replace the effect on `pos_service` with targeted listeners on order-related events.
- Split `customerDisplayService` into two OWL plugins: `CustomerDisplayTerminalPlugin` for the PoS terminal and `CustomerDisplayPlugin` for the customer display.
- Centralize payload generation through `GeneratePrinterData` and remove the deprecated `CustomerDisplayPosAdapter`.
- Replace `device_uuid` with a `device_identifier` generated by `DeviceIdentifierSequence`.
- Use a registration route to track connected customer displays: displays announce themselves with `ADD` and `REMOVE`, while terminals use `PING` to discover displays after startup or reload.
- Skip payload generation and requests when no customer display is connected.
- Refactor customer display tests to exercise the real application flow and assert against system-generated payloads.
```mermaid
flowchart LR
POS([PosStore])
UI([Customer display UI])
subgraph Terminal["CustomerDisplayTerminalPlugin — app/plugins"]
direction TB
initT["init({ identifier, models, scale, bus, ... })"]
sendOrder["sendOrder(order)"]
build["_buildDisplayPayload()"]
send["send(payload)"]
sendOrder --> build --> send
end
subgraph DisplaySide["CustomerDisplayPlugin — customer_display"]
direction TB
initD["init({ bus })"]
onData["_onDataReceived()"]
data[("data — signal")]
onData --> data
end
POS -->|initCustomerDisplay| initT
POS -->|order or screen changed| sendOrder
UI -->|mounted| initD
send -->|"update_customer_display — bus"| onData
send -.->|"BroadcastChannel — only if the request fails"| onData
data -->|render| UI
```
Task-5911881Point of Sale customer display updates are now handled through a centralized communication component instead of depending on broader service activity. This should reduce unnecessary processing and make connected display and scale integrations more consistent across supported POS setups.
Original PR description
pos*: pos_iot, pos_mobile, l10n_eu_iot_scale_cert Customer display previously relied on an effect on `pos_service` to dispatch updates, which was inefficient and unnecessarily dependent on the full service lifecycle while only order data was required. This commit refactors and centralizes the customer display logic: - Replace effect-based updates with targeted event listeners on order-related events to reduce overhead and improve performance - Make `customerDisplayService` the single source of truth for all customer display communication (send/receive) - Standardize payload generation using `GeneratePrinterData` And remove deprecated `CustomerDisplayPosAdapter` - Replace `device_uuid` with `device_identifier` generated via `DeviceIdentifierSequence` for consistent device identification Task-5911881 Related PR: - https://github.com/odoo/odoo/pull/257781