Daily updates from Odoo
Saturday, April 19, 2025
2 changes · master
New functionality added to Odoo
Adds tools for employees to create fields whose values are generated by AI from existing record information, such as summaries, classifications, sentiment, or lead assignment suggestions. It also lets Studio users configure these AI fields and enables automated server actions that update records using AI prompts, helping reduce manual data entry and standardize decisions.
Original PR description
Purpose: --------- Add AI Fields, AI Property Fields and AI server actions, computed by a LLM based on a prompt. The goal is to allow internal users to configure fields whose values are automatically…
Purpose: --------- Add AI Fields, AI Property Fields and AI server actions, computed by a LLM based on a prompt. The goal is to allow internal users to configure fields whose values are automatically generated or server actions that will update records based on existing record data. Users can reference other fields in the prompt widget using the "/field" command, and other records for relational fields (M2O/M2M) to suggest possible values using the "/record" command. Some use cases include: - Auto-assigning leads to the most suitable salesperson - Performing sentiment analysis on received messages - Generating classifications or summaries Technical: ---------- #### Fields: - Supports ai fields (added manually or using the "ai" attribute in the field definition) and ai properties fields (new option in the property definition editor popover). - Manual computation is available via an "AI" button next to each field in form views. - Prompts are parsed and processed with access to QWeb expressions. Only admins and members of "mail.group_mail_template_editor" can use unrestricted fields. Other users are limited to safe QWeb expressions. - On creation of a new ai field/ai property, we compute the field/property values for existing records using an ai_domain (id > "last id" - 50). - Crons are provided for computing fields/properties on record, ai field or ai property creation or on property definition change: - For ai fields, only NULL textual fields (`char`, `text`, `html`) are processed. We skip non-text fields to avoid overwriting falsy values. An empty string will be written if no answer is returned. - For ai properties, all property types (except separators) for which the key is not present in the properties field are processed. A falsy value is written if no answer is returned. - No dependency tracking is implemented: prompts are not recomputed if referenced fields change after creation. - AI fields can be added from studio, by dragging the new "AI Field" component from the sidebar into the view. #### Server Actions: Adds a new type of server actions, "Update With AI". This new type of actions update a record field (like the standard "Update" actions), but using a prompt instead of code. Task-4526274
Enhancements to existing features
Activities are easier to manage with a clearer default personal filter, simpler activity types, and support for unassigned work items. Completed activities are now retained for reporting, helping teams track history more consistently across business workflows.
Original PR description
Early merge of parts from odoo/enterprise#81992 . Improve activity filtering Idea is to ease activities management, both from personal and global point of view. Now having a default 'My Activities'…
Early merge of parts from odoo/enterprise#81992 . Improve activity filtering Idea is to ease activities management, both from personal and global point of view. Now having a default 'My Activities' filter, instead of a domain. This allows to switch from personal to global activity management easily. Cleanup activity type data Purpose is to have less activity types, as we want people to use some main types instead of having too much of them. Too much activities leads to complicated flows and code. Especially we want to promote usage of plans with better summaries instead of specific types. Always keep activities We now keep all done activities, as it is used in various reporting. Previously it was controller through a 'keep_done' flag. We remove it as it is now considered as standard for all activity types. Note that 'ActivityMixin.activity_unlink()' still unlinks activities as indicated by the name. Use 'activity_feedback' when you want to close activities through the mixin, which is going to archive them. Remark: unlinking activities during a given transaction trigerred a cache invalidation. As it is not the case anymore we had to update some tests so that fields are computed again. This is mainly a test artifact, as in real life data is refreshed through UI. Mainly some triggers should be updated but hey, one thing at a time. Activities can now be unassigned Sometimes you may want to create activities to perform without assigning them directly. We therefore remove the required on user_id field. However in case of personal activities not linked to records (i.e. no model / res_id set) user_id is still required. Reason is that no-one is going to know they exist and take care of them if they don't appear on user activity feed nor documents. Making unassigned activities appear on everyone's activity feed is not a good idea, as in big companies this is going to bloat your activities. allow to schedule personal activities Since https://github.com/odoo/odoo/pull/204571 activities can be personal, aka not linked to a document using (res_model, res_id) pair. In this commit we continue this work by allowing to use the scheduler for personal activities. This PR contains mainly the python and model code to make it work. Interface and flows will be improved soon in an upcoming PR. Task-4592571 Co-Authored-By: Celeste Guilleux <guce@odoo.com>