Thursday, September 7, 2023
1 change · master
Code cleanup and technical improvements
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-pr