Thursday, August 27, 2026
2 changes · master
Code cleanup and technical improvements
Point of Sale data loading has been redesigned so stores can sync only the records that changed instead of reloading everything each time. This should improve startup speed and scalability, especially for businesses with large product, customer, loyalty, restaurant, self-order, or localization datasets.
Original PR description
pos*: l10n_ar_pos, l10n_es_edi_verifactu_pos, l10n_in_pos, l10n_pe_pos, l10n_sa_edi_pos, point_of_sale, pos_discount, pos_event, pos_glory_cash, pos_hr, pos_loyalty, pos_online_payment_self_order,…
pos*: l10n_ar_pos, l10n_es_edi_verifactu_pos, l10n_in_pos, l10n_pe_pos,
l10n_sa_edi_pos, point_of_sale, pos_discount, pos_event, pos_glory_cash,
pos_hr, pos_loyalty, pos_online_payment_self_order, pos_qfpay,
pos_restaurant, pos_sale, pos_self_order, pos_self_order_event,
pos_self_order_qfpay
Rework the POS data loading mechanism to improve scalability and support
incremental syncing based on `write_date` timestamps.
- Move field/relation metadata computation into `PosLoadMixin` via new
`_load_data_relations()` and `_load_pos_data_domain_and_dependencies()`
methods, removing the centralized logic from `pos_session.py`
- Refactor `load_data()` to accept a `local_data` dict (model → {id:
write_date}) so the frontend can request only records newer than what
is already cached in IndexedDB
- Add `_load_pos_metadata()` and `_read_pos_data_from_metadata()` to
clearly separate metadata collection from record reading
- Add `load_pos_data_force_loading()` hook for models that always require
a full reload regardless of local cache
- Automatically append `write_date` to loaded fields for cache comparison
- Add template as record in the indexedDB cache
- Refactor `data_service.js`: extract `syncInitialData`, `cleanLocalData`,
`cleanOldModels`, and `handleLoadingDataError`; handle stale model
cleanup in IndexedDB when modules are uninstalled
- Compress multiple calls (load_data, load_data_params,
filter_local_data, ..) into a single load_data call.
- Change some loading method to use load_data instead of a custom method
for each model.
task-id: 4982785
Enterprise PR: https://github.com/odoo/enterprise/pull/93803
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prEnterprise Point of Sale modules were aligned with Odoo's newer data loading approach, making setup and screen data retrieval more consistent across countries and POS features. This mainly supports reliability and maintainability, with added tests for preparation screen loading to reduce regression risk.
Original PR description
Align all enterprise POS modules with the refactored data loading mechanism introduced in community. pos_enterprise: - Add `PosLoadMixin` override with `_load_prep_data_domain_and_dependencies()`,…
Align all enterprise POS modules with the refactored data loading mechanism introduced in community. pos_enterprise: - Add `PosLoadMixin` override with `_load_prep_data_domain_and_dependencies()`, `_load_prep_metadata()`, and `_read_prep_data_from_metadata()` to mirror the new metadata-based loading pattern for preparation display data - Refactor `pos_prep_display.py`: replace `load_data_params()` and `load_preparation_data()` with `_load_metadata()` using the new mixin; remove the centralized `_load_pos_data_relations()` call on `pos.session` - Update `_load_pos_data_domain()` signature to remove the `config` parameter and resolve it from `data['pos.config']` directly - Adapt `data_service.js` patch: merge `loadFieldsAndRelations()` into `loadInitialData()` using `getFieldsAndRelations()`/`initFieldsAndRelations()`; simplify `initData()` pos_settle_due: - Remove `ir_ui_view.py` override that manually exposed two view IDs — these are now handled by the generic `ir.ui.view` loading in community - Inject the two view IDs (`customer_due_pos_order_list_view`, `due_account_move_list_view`) directly into `pos.config` read data via `_load_pos_data_read()` instead l10n_br_edi_pos, l10n_cl_edi_pos, l10n_ec_edi_pos, pos_appointment, pos_blackbox_be, pos_enterprise, pos_event_iot, pos_iot, pos_planning, pos_settle_due, pos_self_order_restaurant_appointment: - Update `_load_pos_data_domain()` signatures to drop the `config` argument in line with the new mixin interface task-id: 4982785 Community PR: https://github.com/odoo/odoo/pull/225341