Daily updates from Odoo
Friday, August 19, 2022
4 changes
Enhancements to existing features
Restricted fields and sections in back-end views are now handled consistently: users without the right access group will no longer receive those elements in the view at all. This simplifies behavior for developers and supports future performance improvements by making back-end view caching easier and less costly.
Original PR description
This revision is to make uniform the behavior of the `groups` attribute on the Python model fields and on the node in the view architecture. In both cases, remove the node from the view completely.…
This revision is to make uniform the behavior of the `groups` attribute on the Python model fields and on the node in the view architecture. In both cases, remove the node from the view completely. Before this revision, in a back-end view: - In the Python model, if a field has the `groups` attribute set and the user is not part of the groups, the field is removed, completely, from the view. - In the view architecture, if a node has the `groups` attribute set and the user is not part of the groups, the node is made invisible (not completely removed, just made invisible). in a front-end view: - if a node has a "groups" or "t-groups" set and the user is not part of the groups, the node is removed from the view. So it's 2/3 cases removing nodes restricted to a group. and 1/3 case making invisible nodes restricted to a group. It's simpler to have a uniform behavior for the 3 cases, simpler to understandard for developers. In addition, this will help for the goal to cache back-end views. It makes possible to convert views using the `groups_id` field by moving the content of these views directly in the view to which they add content which is suppose to be completely removed when the user has not the according group. By getting rid of the `groups_id` many2many field on `ir.ui.view`, it makes possible to cache the view architecture without requiring to use the groups in the cache key. Currently, if we want to cache the view architecture, it would be required to use the intersection of the user groups with the `groups_id` groups of the view, making it costly to compute the cache key, therefore altering the performance point to cache the view architectures. Related community PR: odoo/odoo#95729
Saved SEPA direct debit payment tokens now use a shorter, modern masked format such as •••• 1234 instead of long strings of Xs. This improves readability for customers and staff when viewing subscriptions, payment flows, and related communications.
Original PR description
Before this commit, tokens were prefixed with usually 12 X’s. To improve readability, modernity and to shorten the length, this commit changes token prefixes to a standard of •••• 1111. task-2832669 See also: - https://github.com/odoo/odoo/pull/94978 - https://github.com/odoo/upgrade/pull/3738
The employee referral dashboard has been modernized to improve maintainability and keep the experience aligned with Odoo’s current interface framework. This should help ensure a smoother, more consistent dashboard experience for users while making future improvements easier.
Resolved issues and error corrections
This update adjusts several accounting and Studio screens to work correctly with the newer Bootstrap version used by Odoo. It prevents errors and broken expand/dropdown behavior in reports, follow-up views, asset reports, and Studio-managed views.
Original PR description
in bootstrap 5.x the toggle attribute changed from `data-toggle` to
`data-bs-toggle`, so we have to change `data("toggle")` by
`data("bs-toggle")`
https://getbootstrap.com/docs/4.6/components/collapse/
https://getbootstrap.com/docs/5.1/components/collapse/
Also using `$el[0].dataset.bsToggle` instead of `$el.data("toggle")` is
better since `data()` can be confusing
```js
const a = document.createElement("a");
> <a></a>
a.setAttribute("data-bs-toggle", "dropdown")
> <a data-bs-toggle="dropdown"></a>
a.dataset
> DOMStringMap {toggle: 'dropdown', bsToggle: 'dropdown'}
$(a).data()
> {}
```
https://pad.odoo.com/p/wowl_views
[aju] https://watch.screencastify.com/v/XuuQTkKRFX3lJh1vnvt9 project.task
kanban view > schedule an activity > mark it as done > traceback
https://pastebin.com/i96Krxrb
community: https://github.com/odoo/odoo/pull/98339