Repository navigation
[20.0][MIG] mail_activity_team: Migration to 20.0 - #1
Merged
Merged
Conversation
Currently translated at 100.0% (24 of 24 strings) Translation: social-13.0/social-13.0-mail_activity_team Translate-URL: https://translation.odoo-community.org/projects/social-13-0/social-13-0-mail_activity_team/it/
When an activity is scheduled due to automatic processes the onchanges won't adapt the proper user team, so we could have a mismatch that provokes an exceptions due to the designed constaints
- If a user is archived but there's an automatic activity, the team check wouldn't locate him. We have to ensure the context. - When the automatic activity gets a user with no team, we should set the team to a void one as well. TT30470
If you schedule an activity and you don't force the team as False, errors might araise. For example, on holidays.
Replaced for web_domain_field module
The user couldn't see the proper count of his own activities. It was allways showing the team activities counter. TT35885
Currently translated at 71.8% (23 of 32 strings) Translation: social-15.0/social-15.0-mail_activity_team Translate-URL: https://translation.odoo-community.org/projects/social-15-0/social-15-0-mail_activity_team/it/
…exists on server actions
A monkey patch is required on mail.activity's create method to prevent an unboundError (see odoo/odoo#197864). In order to open the team activities (Late/Today/Future) from the systray widget, domain clause mangling is applied in mail.activity.mixin's web_search_read. Includes OCA/social#1469 that was not ported to 17.0 yet. Aligned ir.rule with upstream mail.activity rule wrt. creation (https://github.com/odoo/odoo/blob/b1ffd68e4094d9456dd4ae8f0fa12b50e5ce9d67/addons/mail/security/mail_security.xml#L223-L232). Co-authored-by: Wodran Van de Sande <wodran.vandesande@dynapps.be>
…s provided mail.activity's `create` checks if a value for `team_id` is being passed, and in that case drops values for `user_id`. However, a value for `team_id` will always be present in the create values because there is a default method for the field. In case all teams have been deleted, or if team selection is restricted as per customization, the value for `team_id` will still be present, but empty. In that case, we don't want the value for `user_id` to be dropped silently from the values.
mail_post_defer breaks tests for mail_tracking, so it's better to split it. OCA/social@b782115 @moduon MT-10471
Currently translated at 100.0% (35 of 35 strings) Translation: mail-18.0/mail-18.0-mail_activity_team Translate-URL: https://translation.odoo-community.org/projects/mail-18-0/mail-18-0-mail_activity_team/it/
Currently translated at 100.0% (35 of 35 strings) Translation: mail-18.0/mail-18.0-mail_activity_team Translate-URL: https://translation.odoo-community.org/projects/mail-18-0/mail-18-0-mail_activity_team/it/
…le user and model IDs
Currently translated at 100.0% (43 of 43 strings) Translation: mail-18.0/mail-18.0-mail_activity_team Translate-URL: https://translation.odoo-community.org/projects/mail-18-0/mail-18-0-mail_activity_team/it/
Migration changes: - Bump version to 19.0.1.0.0 - Remove legacy 18.0 migrations directory - Replace _() with self.env._() for 19.0 translation API - Replace groups_id with group_ids (field renamed in 19.0) - Rewrite _get_activity_groups to match 19.0 ORM-based API (replaces raw SQL with ORM search, per-record counting, access rights checks, and new return format with domain/view_type) - Update JS: fetchData → fetchStoreData for 19.0 store API - Replace self._context with self.env.context - Update tests for new per-record counting semantics - Remove obsolete migration test
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: mail-19.0/mail-19.0-mail_activity_team Translate-URL: https://translation.odoo-community.org/projects/mail-19-0/mail-19-0-mail_activity_team/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: mail-19.0/mail-19.0-mail_activity_team Translate-URL: https://translation.odoo-community.org/projects/mail-19-0/mail-19-0-mail_activity_team/
- Security: ir.model.access.csv and the mail.activity record rule (write/unlink on team activities) are now rows of security/ir.access.csv. - res.users._get_activity_groups: rebuilt on top of the new core helpers _divide_activities_in_groups / _format_activity_group instead of raw SQL; the team badge still only counts urgent activities that are not assigned to the current user. - mail.activity: _to_store_defaults -> _store_activity_fields. user_id is computed by the core in 20.0 (fallback to the current user): keep team activities unassigned instead. The core _onchange_activity_type_id was removed, the module onchange no longer calls super. - Signatures adapted: activity_schedule (activity_user_id_fname), _determine_responsible, _run_action_next_activity_multi; _search_my_activity_date_deadline rewritten with Domain. - Views: follow the o_outlined layout of the activity popup and of the schedule wizard, role_id is not required when a team is set, search filter anchor is now filter_activities_my. - JS: proxy state instead of DOM manipulation in the systray patch, @mail/model/export imports, team shown next to the assignee and in the activity tooltip (templates use this.). - Tests adapted: activity_format and triggered_next_type_id no longer exist, deadlines are computed from the activity type, teams can only be created by system users. Assisted-by: Claude Fable 5.1
Assisted-by: Claude Fable 5.1
Available types: 'task#', 't#' (case insensitive) Examples:
|
alan196
pushed a commit
that referenced
this pull request
Nov 30, 2026
[19.0][MIG] mail_gateway_whatsapp: review fixes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migration of
mail_activity_teamfrom 19.0 to 20.0 (history ported with oca-port).Changes for 20.0
ir.model.access.csvand themail.activityrecord rule (write/unlink on activities of the user's teams) converted tosecurity/ir.access.csv; the security XML only held that rule and was removed.res.users._get_activity_groups): the core replaced its SQL with_divide_activities_in_groups/_format_activity_group. The team override now searches the team activities and reuses those helpers;_format_activity_groupkeeps the previous semantics of the badge (only urgent team activities not assigned to the current user). Access rules are now respected (the old SQL bypassed them)._to_store_defaults->_store_activity_fields;user_idis a computed field in 20.0 with a fallback to the current user, overridden so team activities can stay unassigned; the core_onchange_activity_type_idwas removed (module onchange kept withoutsuper).activity_schedule(..., activity_user_id_fname),_determine_responsible(on_demand_responsible, on_demand_responsible_fname, applied_on_record, on_demand_role),_run_action_next_activity->_run_action_next_activity_multi;_search_my_activity_date_deadlinerewritten withDomain(... "any" ...)like the core.o_outlinedlayout (team fields added with the same pattern and Material icons);role_idis only required when neither a user nor a team is set; search filter anchorfilter_user_id_uid->filter_activities_my.proxystate instead of DOM manipulation in the systray patch, templates withthis., imports from@mail/model/export; the team is shown next to the assignee and in the activity tooltip (mail.ActivityTooltip), since the expanded table ofmail.Activityno longer exists.activity_team_user_idslabel "test field" -> "Activity Team Members".activity_format/triggered_next_type_idno longer exist, deadlines are computed from the activity type delay,BaseCommonnow runs as a regular user by default.Tests
-i mail_activity_team --test-enable --test-tags /mail_activity_teamon a fresh database with demo data: 43 tests, 0 failed, 0 errors, no warnings/deprecations.Assisted-by: Claude Fable 5.1