Daily updates from Odoo
Monday, June 23, 2025
1 change
New functionality added to Odoo
Users can now add prompt blocks to email templates and mail composers so AI can generate tailored email content when messages are sent. The feature resolves customer-specific placeholders for each recipient, helping teams create more personalized communications across standard, share, and mass-mailing flows.
Original PR description
Allow users to insert **/prompt** blocks inside email templates so they can ask, for example, "Write an introduction for CompanyName working in Industry." - The **/prompt** command inserts a prompt…
Allow users to insert **/prompt** blocks inside email templates so they can ask, for example, "Write an introduction for CompanyName working in Industry." - The **/prompt** command inserts a prompt block inside suitable HTML fields (e.g. the body of a `mail.template` or a `mail.compose.message` composer). - When the email is sent: - Dynamic placeholders inside the block are resolved against each record. - The resulting string is sent to the LLM service. - The block is replaced with the AI response, split on `\n` to preserve paragraphs. - Supported in all composers (standard, "Share", mass-mailing, etc.); multi-record flows results to per-record prompt evaluation. - Adds an `ai.composer` record to hold the system prompt (e.g. instructing the LLM not to add a subject and to treat output as customer-facing). - Dynamically includes author and the mail's computed language (defaults to *en_US*). - Introduces `prompt_plugin`, registered in `DYNAMIC_PLACEHOLDER_PLUGINS`, with: - A read-only AI-prompt icon. - Support only for dynamic placeholders inside the block. - Includes tests in `test_mail_enterprise` for prompt evaluation and multi-record flows. Task-ID: 4762393