Daily updates from Odoo
Navigate
Branch
Saturday, February 15, 2025
9 changes
7 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
Resolved issues and error corrections
The Documents app now correctly opens the information and tags side panel when users choose that option from the Actions menu. This restores expected access to document details and collaboration information after selecting a document.
Original PR description
This commit restores the missing "documents-toggle-chatter" bus handler. Steps to reproduce: open Documents select a document (kanban or list, same) next to the selection box, open Actions menu click « info & tags » => nothing happens instead of opening the chatter (on the right) task-4318322
Miscellaneous changes
This commits brings the following changes to Documents. Mostly UI improvements: Keep image preview aspect ratio ============================== Currently, images are distorted because the aspect ratio is not respected. Images must retain their original proportions, with the addition of horizontal or vertical spacing if necessary, so that each so that each preview frame has the same dimensions. Also, we want the background of the image wrapper being the same as the body. Add toolt
Original PR description
This commits brings the following changes to Documents. Mostly UI improvements: Keep image preview aspect ratio ============================== Currently, images are distorted because the aspect ratio…
This commits brings the following changes to Documents. Mostly UI improvements: Keep image preview aspect ratio ============================== Currently, images are distorted because the aspect ratio is not respected. Images must retain their original proportions, with the addition of horizontal or vertical spacing if necessary, so that each so that each preview frame has the same dimensions. Also, we want the background of the image wrapper being the same as the body. Add tooltip to toggle chatter btn ================================= Add the following tooltip to the toggle chatter button: "Info & tags". Display existing email alias in help content =========================================== When an email alias has been configured for a given folder, and a search on this folder returns 0 record, the helper content displayed should include the email alias. In case of a search on 'Home' or 'Company': no message about alias, like for 'My Drive' or 'Shared with me'. Also, in 'documents_details_panel': Change labels Email Alias for Email, and Alias Tags for Tags. Enhance Home kanban view style ============================== Enhance the style of the file / folder group titles by turning their h3 element into a h4*, and removing the border-bottom class. * actually we keep the elements as they are, to avoid conflicting with potential customizations, and reduce the police size. Avoid scrollbar on topbar Chatter ================================ Limit the display, on large devices, of the horizontal scrollbar in the Chatter topbar by adding 20px to the Chatter container width, and showing the scrollbar only when the cursor is over that area. Scroll to selected record when info panel on =========================================== When toggling the information panel on, the space available to display documents/folders is significantly reduced. Sometimes, the selected document moves further down the screen and disappears from the view. This commit makes it so the view instantly scroll to the selected document when the info panel is toggled on. Improve email aliases display ============================ We remove the 'Email Aliases' menu item from the 'Configuration' menu and add an optional column in the list view to display the email aliases (widget=email). Also we hide the Alias Name and Domain columns. We keep the fields in the view as they are needed for the details panel. Hide member invite instead of disabling it ========================================= We currently disable the member invite component in the permission panel for users with insufficient rights (not editor) or for inactive documents/folders. But the restriction is not really obvious (visually) for users. We decided to hide the invitation to members to limit their confusion. Add database creator to highest security group ============================================== Generally the user who creates the database receives the highest permissions for each application, except for specific cases. This commits follows the general logic and links 'base.user_admin' to the 'System Administrator' group. Fix spacing in control panel ============================ This commit aims to limit the vertical spacing between the control panel and the menu section. The minimum height applied to breadcrumbs to prevent vertical shift of the view when the breadcrumbs changes dimension has been modified. This height is defined in 'rem' rather than 'vh' to avoid affecting the height of the control panel, particularly on high-resolution screens. Finally, this FW port fixes a bug introduced in https://github.com/odoo/enterprise/commit/0d904521645b7001233545bab1569f1b1869ef63 using an obsolete handler for toggling the chatter from the documents actions. task-4444059 Forward-Port-Of: odoo/enterprise#79400 Forward-Port-Of: odoo/enterprise#77554
… on company parts Forward-Port-Of: odoo/enterprise#79363
Original PR description
… on company parts Forward-Port-Of: odoo/enterprise#79363
Steps to reproduce: 1. Install `delivery_ups_rest` module 2. Create a user having only the group `sales_team.group_sale_salesman` 3. Log in with that user 4. Create a sale order and attempt to save it This will lead to an access error as creation of sale order will try to update `property_ups_carrier_account` in `res.partner`. Error: `You are not allowed to modify 'Contact' (res.partner) records.` Runbot Errors: + https://runbot.odoo.com/odoo/runbot.build.error/110813 + https://r
Original PR description
Steps to reproduce: 1. Install `delivery_ups_rest` module 2. Create a user having only the group `sales_team.group_sale_salesman` 3. Log in with that user 4. Create a sale order and attempt to save it This will lead to an access error as creation of sale order will try to update `property_ups_carrier_account` in `res.partner`. Error: `You are not allowed to modify 'Contact' (res.partner) records.` Runbot Errors: + https://runbot.odoo.com/odoo/runbot.build.error/110813 + https://runbot.odoo.com/odoo/runbot.build.error/110814 Forward-Port-Of: odoo/enterprise#77999
This PR fix an issue we encountered when trying to create a credit note from an electronic journal without any token created yet (for example because any electronic invoice was created yet). At that time, an error like the following was raised: `binascii.Error: Invalid base64-encoded string: number of data characters (5) cannot be 1 more than a multiple of 4` In previous versions we already had this fix: https://github.com/odoo/enterprise/commit/01ff42bd7c5e69cca9b63b1f027f566aa589a845. So w
Original PR description
This PR fix an issue we encountered when trying to create a credit note from an electronic journal without any token created yet (for example because any electronic invoice was created yet). At that time, an error like the following was raised: `binascii.Error: Invalid base64-encoded string: number of data characters (5) cannot be 1 more than a multiple of 4` In previous versions we already had this fix: https://github.com/odoo/enterprise/commit/01ff42bd7c5e69cca9b63b1f027f566aa589a845. So we follow the same approach. After this PR, the certificate should be generated if it did not exists, and the credit note should be created as expected. **Steps to reproduce the error:** - Install l10n_ar_edi - Check that there is no connection to AFIP on "AFIP/Connections" menu. - Select an invoice, and create a credit note. - Change the journal to "Electronic Invoice" on the CN wizard. - Click on "Reverse" button. The error should appear. Forward-Port-Of: odoo/enterprise#79037
2 changes
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.Miscellaneous changes
Issue reproducible on runbot: a blank page appears when clicking on "Identify manually" in the Attendance kiosk mode with the error `Cannot find the definition of component "Pager"` in the console, because the Pager component is missing from the components declaration. Note: also add correct props validation to make kiosk mode work in debug mode. opw-4573687 Forward-Port-Of: odoo/odoo#197661
Original PR description
Issue reproducible on runbot: a blank page appears when clicking on "Identify manually" in the Attendance kiosk mode with the error `Cannot find the definition of component "Pager"` in the console, because the Pager component is missing from the components declaration. Note: also add correct props validation to make kiosk mode work in debug mode. opw-4573687 Forward-Port-Of: odoo/odoo#197661