-
-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
Description
Module
ai_oca_bridge
Describe the bug
When a bridge sends a post_message with attachment_ids in its JSON, it returns a 400 error.
INFO devel werkzeug: 51.75.157.34 - - [20/Aug/2025 10:37:55] "POST /ai/response/7/26833a97271259d6621224345edd32c34e83d799a37d5b4e454d4bf7bac0e724 HTTP/1.0" 400 - 23 0.023 0.026
Investigating this, it occurs if the file related to the attachment_ids belongs to a model that the user does not have permissions for.
To Reproduce
Affected versions: 16.0
Steps to reproduce the behavior:
- Create and configure an AI bridge with a user who does not have administrator permissions
- usage: thread
- result kind: asynchronous
- result type: post a message
- Activate the bridge that has been created.
- Send the following JSON to the ‘_response_url’ that it sends you:
{
"body": "attachment",
"message_type": "comment",
"subtype_xmlid": "mail.mt_comment",
"attachment_ids": [1]
}
Expected behavior
The bridge is functioning normally, but the message will not appear.
Additional context
Running on doodba, using odoo OCB v16. Only repo available is OCA/ai
Reactions are currently unavailable