Daily updates from Odoo
Thursday, October 30, 2025
2 changes · master
Code cleanup and technical improvements
IoT communication has been streamlined so websocket and WebRTC messages are handled consistently. Messages now target one IoT Box or device at a time, reducing complexity and making behavior easier to maintain across connected devices.
Original PR description
We extracted websocket/webrtc message handeling in a commont method from a parent class, in order to be able to send the same messages through both protocols and observe the same behaviour. We also removed the possibility to target multiple IoT Boxes/IoT devices in a single websocket message. Now, we'll need to send one message per IoT Device/Box. We also simplified the websocket onMessage method to get rid of the listeners logic, which was meant to add multiple listeners on the same device (originally used for the recently removed "last value sent" field). Community PR: odoo/odoo#230131
Point of Sale tax calculations are now handled consistently at the full order level instead of separately in different modules. This improves accuracy for complex tax cases, cash rounding, invoices, and certified/localized PoS flows, reducing discrepancies at checkout and in accounting.
Original PR description
*: l10n_de_pos_cert, l10n_eu_iot_scale_cert, l10n_it_pos, l10n_se_pos, pos_appointment, pos_blackbox_be, pos_settle_due, pos_tyro Before this commit taxes computation was a mess in PoS, with…
*: l10n_de_pos_cert, l10n_eu_iot_scale_cert, l10n_it_pos,
l10n_se_pos, pos_appointment, pos_blackbox_be, pos_settle_due,
pos_tyro
Before this commit taxes computation was a mess in PoS, with differents
implementations in different places, and some of them not taking into
account all the complexity of the tax system (taxes included in price,
taxes on taxes, etc.).
This commit aims to unify all the tax computation logic in a single
place, and to make it more robust and easier to understand.
---
What's changes:
Rounding methods available in PoS are now:
1) Rounding applied only on cash payments
In this case the remaining due is rounded only if there is at least
one cash payment line and the remaining due is less than the
rounding tolerance.
2) Rounding applied on all payment methods
In this case the remaining due is always rounded even if a card
payment method is used. The remaining due is rounded if it is less
than the rounding tolerance. No payment method is rounded in this
case, the whole order is rounded instead.
Taxes computation is now done globally on the order, and not on each
line. This way we ensure that the total tax amount is always correct,
even if there is some rounding issues on the lines.
---
Changes in tests:
`test_cash_rounding_down_add_invoice_line_not_only_round_cash_method_with_residual_rounding`
`test_cash_rounding_up_add_invoice_line_not_only_round_cash_method`
Are removed because the tested behavior is not longer present. Now when
rounding is enabled with only_round_cash_method=False, the whole order
is always rounded.
Accounting tests are now principally tested with Hoot instead of tours.
---
Developer note:
No prices should be calculated manually in the code base. Getters have
been created for this purpose in the following files:
- `product_template_accounting.js`
- `pos_order_accounting.js`
- `pos_order_line_accounting.js`
In the future, all PRs containing tax calculations must justify them.
taskId: 5143758
Forward-Port-Of: odoo/enterprise#96123