Daily updates from Odoo
Wednesday, April 30, 2025
5 changes · master
Resolved issues and error corrections
Non-admin users can now use AI agent chats and close them without running into permission errors. The update also fixes API key access, demo data links, and hides an admin-only progress banner so agent forms open more reliably.
Original PR description
## Purpose This PRs corrects some permission issues for non-admin users. Specifically, it allows non-admin users to delete their chat channel with the agent upon closing the chat window, and corrects the retrieval of API keys in the `llm_api_service` class. It also corrects the demo data to have proper link between the attachment and the agent, and hides the progress banner form the agent form for non-admin users. This solves the permission issues that were faced when the user tried to chat with the agent, or to access its form.
The AI message action now works correctly even when an incoming message cannot be matched to a known contact. This prevents an error from interrupting users when viewing or acting on those messages.
Original PR description
Purpose: -------- A message can have no author (when 'email_from' does not match any partner). When this is the case, the messageActionsInternal patch throws an error because it assumed that a message always has an author. Task-4762361
AI agent attachments are now linked directly to their owning agent so access permissions can be checked reliably. This prevents users from encountering attachment access issues, with the trade-off that duplicated attachments may need their AI embeddings recalculated.
Original PR description
Using a `Many2many` for the `attachment_ids` and `url_attachment_ids` fields was problematic. The `ir.attachment` model is meant to be used as a `Many2one` or `One2Many` since it is linked to its parent record using ressource fields (`res_model` and `res_id`). When using a `Many2many` field, the `res_id` loses its meaning since it should be able to include multiple IDs to be accurate. In practice, this caused an access rights issue because the `ir.attachment` model [1] relies on the `res_id` to check which user is allowed to access the attachment. To fix this, the attachment fields of the agent are replaced with `One2many` fields. This implies that the attachments aren't shared anymore and the embedding will need to be recomputed in case of duplicated attachments across multiple agents. [1] See function `check` of `base/models/ir_attachments.py`
Spreadsheet list autofill now handles spilled value ranges more accurately instead of always copying from the first item in the sequence. This helps users extend lists horizontally with the expected sequence, reducing manual corrections and data entry errors.
Original PR description
When autofilling value in odoo list, we always autofill based on the first value of the spilling sequence. This change not only fill when overflowing from the current spilling range and autofill with the sequence when doing so horizontally. Task: 4700968
Temporarily disables unreliable VoIP test checks that were failing inconsistently due to timing issues. This helps keep the development validation process stable while the underlying test problems are investigated later.
Original PR description
Some tests seem to have race conditions. We don't have time to debug it right now, so let's just disable the problematic tests for the time being.