Friday, December 1, 2023
4 changes · master
Code cleanup and technical improvements
This update reorganizes and cleans up the website shop and checkout code to make it easier to maintain. It focuses on internal quality, consistency, and validation around shopping, delivery, payment, reordering, comparison, loyalty, pickup, and stock-related shop flows, with little direct change expected for end users.
Original PR description
Enterprise PR: https://github.com/odoo/enterprise/pull/45427 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update streamlines how Odoo's messaging and live chat components prepare and share data behind the scenes. It reduces duplicate data and custom handling, making future maintenance safer and faster without introducing major visible changes for users.
Original PR description
With this commit, insert in JS models has been simplified. To do so: - Python formatters were adapted so that the data could be inserted in JS models with few LOCs. - Some fields have been renamed to match Python formatters. - Some non-relational fields have been replaced with relational fields. This eases insert and reduces data redundancy. - Some fields have been combined into one, e.g. `store.guest` and `store.user` just becomes `store.self`. - Some non-computed fields have been turned into computed fields, to remove custom code in `static insert()` and `update()` method overrides. https://github.com/odoo/enterprise/pull/50720
The website product comparison feature was reorganized by splitting large Python files into smaller files focused on individual business objects. This does not change customer-facing behavior, but it makes the code easier to maintain and update safely in the future.
This update streamlines how Odoo’s messaging and discussion features prepare and share data between the server and browser. It reduces duplicated data handling and custom code, making the messaging foundation easier to maintain while keeping expected user behavior largely unchanged.
Original PR description
With this commit, insert in JS models has been simplified. To do so: - Python formatters were adapted so that the data could be inserted in JS models with few LOCs. - Some fields have been renamed to match Python formatters. - Some non-relational fields have been replaced with relational fields. This eases insert and reduces data redundancy. - Some fields have been combined into one, e.g. `store.guest` and `store.user` just becomes `store.self`. - Some non-computed fields have been turned into computed fields, to remove custom code in `static insert()` and `update()` method overrides. https://github.com/odoo/odoo/pull/141904