Daily updates from Odoo
Saturday, February 15, 2025
3 changes
2 changes
Enhancements to existing features
This update renames and separates user access group relationships so Odoo can distinguish between groups assigned directly and groups inherited automatically. This makes permissions behavior clearer and more reliable across accounting and related enterprise features, with limited direct impact for everyday users.
Original PR description
see: https://github.com/odoo/odoo/pull/179354 The `groups_id` from `res.groups` fields have been removed and replaced by `group_ids` and `all_group_ids`. The `users` from `res.groups` fields have…
see: https://github.com/odoo/odoo/pull/179354
The `groups_id` from `res.groups` fields have been removed and replaced by `group_ids` and `all_group_ids`.
The `users` from `res.groups` fields have been removed and replaced by `user_ids` and `all_user_ids`.
Models:
```
<res.groups>:
implied_ids = Many2many <res.groups> Users of this group are also implicitely part of these inherited groups
all_implied_ids = Many2many <res.groups> Transitive and recursive closure
implied_by_ids = Many2many <res.groups> Automatically added from
all_implied_by_ids = Many2many <res.groups> Reversed transitive and recursive closure
user_ids = Many2many <res.users> Users with this group specifically
all_user_ids = Many2many <res.users> Users and implied users
<res.users>:
group_ids = Many2many <res.groups> Group added directly to this user
all_group_ids = Many2many <res.groups> Groups and implied groups
```
Concept:
```
The groups involved are to be interpreted as sets.
Thus we can define groups that we will call for example N, Z... such as mathematical sets.
┌──────────────────────────────────────────┐
│ C ┌──────────────────────────┐ │
│ │ R ┌───────────────────┐ │ ┌──────┐ | "C"
│ │ │ Q ┌────────────┐ │ │ │ I | | "I" implied "C"
│ │ │ │ Z ┌─────┐ │ │ │ │ | | "R" implied "C"
│ │ │ │ │ N │ │ │ │ │ │ │ "Q" implied "R"
│ │ │ │ └─────┘ │ │ │ │ │ │ "P" implied "R"
│ │ │ └────────────┘ │ │ │ │ │ "Z" implied "Q"
│ │ └───────────────────┘ │ │ │ │ "N" implied "Z"
│ │ ┌───────────────┐ │ │ │ │
│ │ │ P │ │ │ │ │
│ │ └───────────────┘ │ └──────┘ │
│ └──────────────────────────┘ │
└──────────────────────────────────────────┘
For example:
* A manager group will imply a user group: all managers are users (like Z imply C);
* A group "computer developer employee" will imply that he is an employee group, a user
group, that he has access to the timesheet user group.... "computer developer employee"
is therefore a set of users in the intersection of these groups. These users will
therefore have all the rights of these groups in addition to their own access rights.
```
XML data example:
```xml
<record model="res.groups" id="group_system">
<field name="name">Settings</field>
<field name="implied_ids" eval="[Command.link(ref('group_erp_manager')), Command.link(ref('group_sanitize_override'))]"/>
<field name="user_ids" eval="[Command.link(ref('base.user_root')), Command.link(ref('base.user_admin'))]"/>
</record>
```
```xml
<record model="res.groups" id="group_no_one">
<field name="name">Technical Features</field>
<field name="implied_by_ids" eval="[Command.link(ref('group_user')), Command.link(ref('group_system'))]"/>
</record>
or
<record model="res.groups" id="group_no_one">
<field name="name">Technical Features</field>
</record>
<record id="group_user">
<field name="implied_ids" eval="[Command.link(ref('group_no_one'))]"/>
</record>
<record id="group_system">
<field name="implied_ids" eval="[Command.link(ref('group_no_one'))]"/>
</record>
```
PY example:
```py
group_helpdesk = self.env.ref('helpdesk.group_helpdesk_user')
group_export = self.env.ref('base.group_allow_export')
group_portal = self.env.ref('base.group_portal')
# we want all users having helpdesk and portal (directly or by implication).
user_portal_helpdesck = self.env['res.users'].search([('all_group_ids', 'in', group_helpdesk.id), ('all_group_ids', 'in', group_portal.id)])
# For these users we want to add access to export.
user_portal_helpdesck.group_ids += group_export
# we want all users having export
user_export = group_export.all_user_ids
# we want all users having specifically export (not by imply)
user_has_export = group_export.user_ids
```Document folders can once again be reordered with drag and drop in Company and My Drive, making organization easier for users. Folder and document names can now be translated again, and the Documents page/detail panel has been stabilized to avoid loading and update issues.
Original PR description
This PR will: - fix an async issue in the DocumentsSearchPanel - fix a field update issue in the DocumentsDetailPanel - make the document/folder name translatable. - add folder drag and drop sorting in the search panel, for 'Company' and 'My Drive' task-4512349
1 change
Enhancements to existing features
Discuss calls can now fall back to a direct peer-to-peer connection if the central call server disconnects or does not respond quickly. This should reduce dropped or stuck calls and adds better diagnostic logging so support teams can troubleshoot connection issues more easily.
Original PR description
- Add a fallback to p2p if disconnected from the SFU while still being in the call or after a 5 seconds timeout. - Add logging where: * We obtain a track from a peer or the SFU * The state of the SFU…
- Add a fallback to p2p if disconnected from the SFU while still being
in the call or after a 5 seconds timeout.
- Add logging where:
* We obtain a track from a peer or the SFU
* The state of the SFU connection changes
* Our rtcSession is removed from the Odoo server
* The peer-to-peer connections attempt connection recoveries
- Raise the default log level of peer-to-peer to `WARN`
- Add an `important` option to rtc logging so that logs that are
important are recorded even without activating the logging setting.
- Remove the generated error trade for logs as it added a lot of noise
and the message itself should be enough.
- Add logging snapshots of p2p and sfu when disconnecting and
downloading the logs.
- Remove the reactive session cleanup as it is redundant
with the `onDelete` of the `thread/rtcSessions` field.
- Remove `rtc.state.serverState` and put it as the `connectionState`
of `selfSession`.
- Await the peer to be ready before sending the tracks.
- Add a new p2p state "searching for network" to make it easier to know
when the connection is stuck where we may need TURN/SFU through a
difficult network.
- Prevent possible traceback when receiving a track for a missing
session in peer-to-peer.