Daily updates from Odoo
Friday, February 23, 2024
2 changes · master
Code cleanup and technical improvements
List views in reporting, spreadsheets, and Studio now update their visible columns more reliably when related field values change. This reduces the chance that users see outdated or incorrectly hidden columns after data changes.
Original PR description
*account_reports,spreadsheet_edition,web_studio This commit is the counterpart of odoo/odoo#153998, where we stop computing list's columns in onWillUpdateProps. Using this hook is often a mistake, as it is only called when the component is re-rendered via a parent. With the fine-grained reactivity, it may happen that the renderer is re-rendered directly (e.g. because it is subscribed to a reactive object that changes). In this case, onWillUpdateProps isn't called, so we don't recompute the columns. Before this commit, this doesn't seem to be possible, but by removing the evalViewModifier props, which is the other change done by this commit, the problem occurs: if a column has a conditional column_invisible attribute, and a field used to evaluate the expression changes, the renderer is re-rendered, as it is the one who is subscribed, whereas before it was the parent (the one defining evalViewModifier). Preliminary ref for task 3649970
Task forms and shared task forms now use a common structure, reducing duplicate setup and making future updates easier to manage. The shared task view also gains fields and behavior that were previously only available in the regular task view, creating a more consistent experience.
Original PR description
Before this commit project task and project sharing task form views were quit slimier but so different because both views contains their different code and because of that if we want do something on both of those views then we have to write same code twice so sometimes its hard to keep trace of what we need in both place and what we need in only one place also there is lots of redundant code because we need same thing in both places. This commit Make a common view which contains common data which we need both side and use this view in both places and while doing that also found some things that should be in sharing so this change will add all things we need in project sharing task form view. task-3231686