Daily updates from Odoo
Saturday, August 30, 2025
1 change · master
Code cleanup and technical improvements
The AI and live chat apps now identify AI agents directly instead of relying on their linked contact records, simplifying internal handling and reducing unnecessary checks. This also improves access handling for AI agents and fixes cases where removed website snippets or archived agents could leave live chat configuration inconsistent.
Original PR description
In the AI app, there are multiple functions that receive the partner_id of the ai.agent as a parameter. This complicates the code and results in unnecessary checks on the partner_id to make sure it is connected to an AI Agent. This commit replaces the usages of partner_id of ai.agent (unless actually needed) with the id of the agent. To do so: 1. ai_agent_id is stored on discuss.channel model. 2. All rpc calls to AI Controllers are changed to pass ai_agent_id instead of partner_id. 3. All functions inside AI app are changed to use ai_agent_id instead of partner_id. However, there are some functions that actually require partner_id. These functions are left without modification. Community PR: https://github.com/odoo/odoo/pull/223008 task-4991208