Thursday, September 7, 2023
7 changes · master
Code cleanup and technical improvements
Odoo is standardizing how dates are handled by replacing the older Moment library with Luxon. This helps reduce loaded assets and simplifies ongoing maintenance without changing core business workflows.
Original PR description
luxon and moment are both used in the solution, but these two libraries facilitate the manipulation of dates. It was decided to replace all uses of moment with luxon so we can then remove moment.js from the code and lighten the assets. task-3391739 PR Ent : https://github.com/odoo/enterprise/pull/46987
This change streamlines how Odoo loads interface templates by replacing older loading functions with a centralized template registry. It should make the platform easier to maintain and reduce complexity across web-based apps, with little direct impact on day-to-day users.
Original PR description
In this commit, the loadXML function has been removed. We use registry with xml_templates to load XML templates for OWL Apps. task-3266441 PR Enterprise : https://github.com/odoo/enterprise/pull/47001
The point of sale app now uses one shared number pad across its screens instead of several separate versions. This makes the checkout interface easier to maintain and helps keep the cashier experience more consistent over time.
Original PR description
At the moment, the point_of_sale module has 3 different implementations of numpads. This is absurd. In this PR we unify them all into a single numpad component. One of the reasons why there are…
At the moment, the point_of_sale module has 3 different implementations of numpads. This is absurd. In this PR we unify them all into a single numpad component.
One of the reasons why there are multiple numpads is because each requires a slightly different set of buttons. The new `Numpad` component provides a simple API which allows the consumer to specify what the buttons should be.
This is done by proving the `buttons` prop, which has the following type:
```js
buttons: {
type: Array,
element: {
type: Object,
shape: {
value: String,
text: { type: String, optional: true },
class: { type: String, optional: true },
disabled: { type: Boolean, optional: true },
},
},
}
```
In this PR we also provide a simple set of helper functions for the tours and adapt all of the existing tests accordingly.
https://github.com/odoo/enterprise/pull/46427
Task: 3470346
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update simplifies an internal part of the appointment page editor so it can identify nearby page elements more flexibly. It is a behind-the-scenes cleanup that should make future appointment editor changes easier and safer without changing the user experience.
Original PR description
To improve the api, make closestElement take a predicate as an argument. task-2984709
This change streamlines how several Odoo app screens load their interface templates. It is an internal cleanup that should make the web platform easier to maintain without changing day-to-day user workflows.
Original PR description
In this commit, the loadXML function has been removed. We use registry with xml_templates to load XML templates for OWL Apps. task-3266441 PR Community : https://github.com/odoo/odoo/pull/134520
The spreadsheet breadcrumb template was reorganized to remove repeated code. This is an internal cleanup that should make future maintenance easier without changing how users interact with spreadsheets.
Original PR description
This PR refactors `spreadsheet_breadcrumbs.xml` to reduce existing code duplicacy. Task ID : 3424046
The barcode product expiry area now uses one shared date-handling library instead of maintaining duplicate date tools. This internal cleanup helps reduce loaded assets and supports easier maintenance without changing user-facing workflows.
Original PR description
luxon and moment are both used in the solution, but these two libraries facilitate the manipulation of dates. It was decided to replace all uses of moment with luxon so we can then remove moment.js from the code and lighten the assets. task-3391739 PR Com : https://github.com/odoo/odoo/pull/134470