Tuesday, October 1, 2024
6 changes · 17.0
Resolved issues and error corrections
Fixed a visual glitch where sample placeholder records briefly appeared after creating the first Kanban record with quick create. This makes the pipeline view feel smoother and avoids confusing users with temporary sample data.
Original PR description
#### Issue: When there are no records in pipeline and you create a new record with quick create for a moment sample data is displayed. #### Technical: When a record is created, from relational_model `load` method is called, which uses sample data in rendering because while creating a record we're not rendering the page thus 'load' method uses old data/config with sample data. [Reference Here](https://github.com/odoo/odoo/blob/17.0/addons/web/static/src/model/relational_model/relational_model.js#L189) #### After this PR: There will be no flickering sample data on quick create. Task-4196741
Fixes a visual glitch where sample cards could briefly appear as normal records when creating a new item in an empty grouped Kanban view. This makes the quick create experience smoother and less confusing, especially on slower connections.
Original PR description
Have a grouped kanban view with existing groups but no records s.t. sample records are displayed (e.g. in CRM pipeline with a default filter, or in Project in a new project). Click on the "+" icon in…
Have a grouped kanban view with existing groups but no records s.t. sample records are displayed (e.g. in CRM pipeline with a default filter, or in Project in a new project). Click on the "+" icon in a column to quick create a record. The first time, it's fine. Click on the menu again to relaunch the action (do not reload the webclient), and do the same: there's a flickering as sample records briefly appear "as real records" (i.e. they're not displayed as ghosts), before completely desappearing. This is even more obvious on a slow network. The difference between the first time and the others is that the form view used in the quick create must be loaded the first time, and is in cache afterwards. When we click on the "+" icon, the following happens: - we remove sample records from the groups and we enable the quick create in a column => triggers a rendering of the KanbanRenderer - in the same tick, we toggle the useSampleModel flag on the model => triggers a rendering of the Controller After its rendering, the Controller no longer has the classname `o_view_sample_data` which ensures that sample records are displayed as ghosts. After its rendering, the Renderer no longer contains sample records. The flickering occurs when the rendering of the Renderer is async (the one of the Controller being always sync, as it doesn't wait for his children to be re-rendered, as their props didn't change). Indeed, in that case, there's a small timeframe during which the controller no longer has the classname `o_view_sample_data` but the renderer still contains sample records. Normally, the rendering of the Renderer should always be sync. Indeed, we triggered the loadViews in its onWillStart but we didn't wait for the rpc to return (we have a `isLoaded` flag, and we have an empty rendering while `isLoaded` is false). However, when the loadViews is already in the cache, the promise is resolves in the next microTick, and we directly render the component with the state `isLoaded` true, i.e. with the KanbanQuickCreateController. But that component is always async, as it loads the form view data (onchange) in its onWillStart, and must wait for it. As a consequence, in that case, the whole rendering of the Renderer is delayed. To fix the issue, this commit simply ensures that the rendering of the KanbanRecordQuickCreate is **always** sync, by toggling the `isLoaded` flag in onMounted instead of onWillStart. That way, the Renderer is rendered without the sample records in the same animationFrame as the Controller, and only then we toggle the KanbanQuickCreateController. Closes #181743 Task~4196741
Hong Kong payroll now separates different leave types that occur within the same work period. This helps payroll entries reflect leave more accurately while preserving compatibility with existing customizations.
Original PR description
This is part of the change in [0efd1e5fc60b209608ab209b1c079561e4aa6b01](https://github.com/odoo/odoo/pull/179661/commits/0efd1e5fc60b209608ab209b1c079561e4aa6b01). When several leaves are taken over a singular work interval we need to create several leave entries for each work interval, hence the need to return a list. To avoid disturbing customizations the function _get_interval_leave_work_entry_type has to be left in. opw-3944955
A test display showing the difference between actual and expected daily time was accidentally left visible in the timesheet timer. This fix removes the unintended display so users only see the actual time spent on tasks, not internal testing information.
Original PR description
Steps to reproduce: - Timesheet > Register time for any task The display of time spent on the task also contains the diff with the expected time for the day, which should not be displayed here. I mistakenly left in a display meant for testing purposes only added in commit 56c7e8ccf5eb92baee258842fe72efa3d1956b96 opw-4123649
This update fixes a visual problem where buttons were appearing cropped or misaligned in the signature request form. The fix reorganizes how the button visibility is controlled, resulting in a cleaner and properly displayed interface for users sending signature requests.
Original PR description
Before this commit, the div was addded for additional condition for button visibility which causing button asymtry and cropping button. after this commit, moved visibility condition in invisible attribute of button.
A recent improvement to how fiscal positions are determined in the system now requires additional database queries. This update adjusts the performance test expectations to match the new query count, ensuring tests continue to pass accurately.
Original PR description
After a fix in `res_partner._get_fiscal_position`
we extract the line `eu_country_codes =
set(self.env.ref('base.europe').country_ids.mapped('code'))`
from a condition, therefore we make extra queries and we have to adapt
the `assertQueryCount`.
opw-4072691