Daily updates from Odoo
Friday, March 29, 2024
2 changes
1 change
Code cleanup and technical improvements
Automated product tours and tests now use event behavior that more closely matches real user interactions, such as typing and key presses. This makes the tours easier to understand and reduces hidden automatic behavior, improving reliability across many business flows.
Original PR description
In this commit, events in addons/web_tour/static/src/tour_service/tour_utils.js writed with native dispatchEvents has been refactored to use Hoot events. These events are much closer to the behavior…
In this commit, events in
addons/web_tour/static/src/tour_service/tour_utils.js writed with native dispatchEvents has been refactored to use Hoot events. These events are much closer to the behavior of a user (e.g. instead of overwriting the value of an input, it simulates the encoding using keydowns).
The motivation of these changes is to make the tours more understandable and significantly less implicit. As a result, “automatic” behaviors have been removed.
Here below are the main modifications made in RunningTourActionHelper class :
- The auto method has been removed.
- remove_text() has been replaced by clear().
- text() has been splitted in edit(), fill(), select(), selectByIndex(), selectByLabel() and editor().
- Default "Test" string has been removed. No text => No text (Then, note that `run edit` will just clear the input)
- New events has been added like range(), press() and blur().
A New feature has been added in tour_compiler.js :
You can now chain events in run attribute of a step with `&&` :
e.g. :
```
{
extra_trigger: ".o_web_studio_sidebar .o_web_studio_properties.active",
trigger: "input[name='string']",
run: "edit new name && press Enter",
},
```
Still to do in a next PR :
- refactor click()
- refactor drag_and_drop_native()
task~3820046
https://github.com/odoo/odoo/pull/1580551 change
Code cleanup and technical improvements
This update makes tax rounding compensation functionality available to all countries, not just France. Previously, only the French tax report could automatically handle and compensate for rounding differences when closing taxes. Now this capability is built into the core tax reporting system, allowing other countries to benefit from the same functionality without duplicating code.
Original PR description
The tax closing in France did an override of `_postprocess_vat_closing_entry_results` to be able to compute and compensate (by creating a move) difference from rounding taxes. As this functionality starts to be needed in other countries, we extract that method to `account_generic_tax_report` and made it generic. task-3691312 Forward-Port-Of: odoo/enterprise#56510