Friday, May 5, 2023
1 change · master
Code cleanup and technical improvements
The Point of Sale app no longer loads a large shared back-office asset package that contained many files it did not need. This should make POS screens load more efficiently and reduce unwanted side effects, while keeping testing support in place.
Original PR description
pos*: l10n_ae_pos, l10n_co_pos, l10n_fr_pos_cert, l10n_gcc_pos, l10n_in_pos, l10n_sa_pos, point_of_sale, pos_adyen, pos_discount, pos_epson_printer, pos_epson_printer_restaurant, pos_hr,…
pos*: l10n_ae_pos, l10n_co_pos, l10n_fr_pos_cert, l10n_gcc_pos, l10n_in_pos, l10n_sa_pos, point_of_sale, pos_adyen, pos_discount, pos_epson_printer, pos_epson_printer_restaurant, pos_hr, pos_hr_restaurant, pos_loyalty, pos_mercury, pos_restaurant, pos_restaurant_adyen, pos_restaurant_stripe, pos_sale, pos_sale_loyalty, pos_sale_product_configurator, pos_six, pos_stripe Previously, the pos assets included almost the entirety of the assets_backend. Most of the contents of the assets_backend is completely useless in the PoS, meaning that the PoS will load slower because it loads much more JS than it needs. It also means that it gets all the side effects of this bundle (global event listeners, among other things) that we don't want. This commit removes the dependency of the pos assets on the assets_backend to solve these issues. The pos assets are now their own bundle with only what is needed in the PoS. As for the unit testing bundle, the same logic applies but unfortunately, because the unit testing code from web that we want to use (eg automatic cleanups, cleaning of registries, etc) depends on the legacy code, we need to include a lot more files than would otherwise be needed. This situation will probably be improved as legacy code is removed from web, but in the mean time, it is not very important for this bundle to be lean, as it's a test bundle and loading speed is less important. Linked to: https://github.com/odoo/enterprise/pull/40502 Linked to: odoo/upgrade#4626