Daily updates from Odoo
Tuesday, April 29, 2025
2 changes
Code cleanup and technical improvements
This refactor standardizes the test setup for Point of Sale-related modules by using shared products with simple prices and tax rates. It makes future testing easier and removes or merges duplicated backend tests where equivalent frontend coverage already exists, with no expected change for everyday users.
Original PR description
*: l10n_br_edi_pos, l10n_ke_edi_oscu_pos The aim of this commit is to make test writing easier, by choosing easy-to-calculate prices with their corresponding taxes. The products created have prices…
*: l10n_br_edi_pos, l10n_ke_edi_oscu_pos
The aim of this commit is to make test writing easier, by choosing
easy-to-calculate prices with their corresponding taxes.
The products created have prices of 10 or 20 with taxes of 5, 10 or 15
percent.
A global class will be created and inherited by all Point of Sale tests,
with the aim of always using products already available. If a different
product is required in a specific test, existing products can be
modified.
---
Test in file: `point_of_sale/tests/test_point_of_sale_flow.py`:
- Test `test_order_refund_lots` is removed and adapted in the frontend
tour `test_lot`
- Test `test_order_to_invoice` is removed because frontend is already
testing this behavior, related tests:
- Test `test_02_pos_with_invoiced`
- Test `test_order_and_invoice_amounts`
- And more in submodules...
- Test `test_order_with_deleted_tax` is removed because it is using
`sync_from_ui` method which should not be used in the backend.
Frontend tours are already testing its behavior
- Test `test_order_refund_picking` is merged with `test_order_to_picking`
- Test `test_order_with_different_payments_and_refund` is removed
because its description don't correspond to the actual behavior of the
test. The goal of the test isn't clear.
- Test `test_product_combo_creation` is removed because its already
tested in owner module.
- Test `test_order_refund_with_owner` was merged with the frontend
test `test_lot`
- Test `test_change_is_deducted_from_cash` was merged with the frontend
test `test_tracking_number_closing_session`This update standardizes how linked record values are handled across Odoo screens such as forms, lists, kanban views, documents, accounting, appointments, helpdesk, field service, and knowledge. The change is mostly internal, helping the platform support richer related information while keeping standard server data calls unchanged.
Original PR description
Currently, in the RelationalModel, the value of a many2one is represented by an Array [id, display_name]. In the PR [1], we already introduced a change on their value. The value is still an Array but properties are set on it too. This allows to add relatedFields on many2ones. With this commit, we fully replace the array value by an object thus properties 0 and 1 are not available anymore. Calling an orm method like read or search_read still gives the array representation, the change is done only by using RelationalModel (in form view, list, kanban, fields, etc.). [1]: https://github.com/odoo/odoo/pull/202534 task-3547961 task-4658840