Tuesday, July 23, 2024
4 changes · master
Code cleanup and technical improvements
This update restructures how related data is prepared for several communication-related features, including Knowledge, VoIP, and WhatsApp. It supports future improvements while keeping current user-facing behavior largely unchanged.
Original PR description
\* = knowledge, voip, whatsapp And adapted the most simple cases. Part of task-3605717 https://github.com/odoo/odoo/pull/172863
This update prepares Odoo’s guided test tours for a simpler way to identify content inside pop-up windows. It reduces internal complexity and helps keep future maintenance of automated user flows more consistent, with no expected direct impact on end users.
Original PR description
In order to simplify the structure of a tour step, it was decided to remove the "in_modal" key. The purpose of this key is to search for the trigger in a modal element. But actually you just need to add ".modal" to the selector. This functionality therefore really has little added value. That's why we're removing it. In this commit, we prepare the ground to be able to remove this functionality by adding .modal to the selectors and forcing the fact of not looking in a modal (in_modal: false) otherwise that would be duplicative. task~3974087 https://github.com/odoo/odoo/pull/173861
This change updates internal automated tours so visibility checks are handled consistently without a separate allowInvisible setting. It reduces maintenance complexity for test scenarios across accounting, knowledge, payroll, studio, and website studio areas, with no expected direct impact for end users.
Original PR description
In this commit, we remove the allowInvisible key from the structure of a tour step. By default, each trigger in a step must be visible. If we play with a pseudo selector :visible (or :not(:visible)) then tour_compiler does not check if the element is visible (canContinue) in the DOM and the trigger only returns what is targeted. Example: trigger: ".my_element" => Must be visible trigger: ".my_element:visible" => Must be visible. But the tour_compiler doesn't check anything. The verification is done using the pseudo selector trigger: ".my_element:not(:visible)" => Should NOT be visible using the pseudo selector task~3974087 https://github.com/odoo/odoo/pull/172085
The automated tour testing helper now saves field edits more consistently by triggering the expected follow-up events immediately. This reduces confusion for developers maintaining business workflows and makes test scenarios easier to write and keep reliable across multiple Odoo apps.
Original PR description
Before this commit, in rounds, the edit() helper does not directly trigger blur events and changes after modifying the value of a field (input or textarea). This was a desired behavior but which implies that it is then necessary to add another event which then triggers the blur & change events, for example: - && press Enter - && press Tab - && click body - && click .where_you_want However, this causes confusion because it is not what is expected by users of the API. In this commit, to simplify the API, we trigger the blur and change events directly in the edit() helper. task~3922501 https://github.com/odoo/odoo/pull/166466