Skip to content

[17.0][ADD] mail_activity_plan_domain: New Module#182

Open
cristina-hidalgo-tecnativa wants to merge 1 commit into
OCA:17.0from
Tecnativa:17.0-add-mail_activity_plan_domain
Open

[17.0][ADD] mail_activity_plan_domain: New Module#182
cristina-hidalgo-tecnativa wants to merge 1 commit into
OCA:17.0from
Tecnativa:17.0-add-mail_activity_plan_domain

Conversation

@cristina-hidalgo-tecnativa
Copy link
Copy Markdown

This modules adds a filter_domain field to activity plans and their templates. Plans only appear in the scheduling wizard when the active record matches the plan domain. During execution, activities whose template domain does not match the record are silently skipped, allowing a single plan to handle heterogeneous records.

@Tecnativa TT61908
@pedrobaeza @victoralmau

@OCA-git-bot OCA-git-bot added series:17.0 mod:mail_activity_plan_domain Module mail_activity_plan_domain labels Apr 16, 2026
Copy link
Copy Markdown
Member

@victoralmau victoralmau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, the best approach is to use the same method that mail already has in version 18.0: https://github.com/odoo/odoo/blob/754898c58fded0e3c3c30702f15258f1dadcfa6c/addons/mail/models/mail_activity_plan.py#L30 and add to ROADAMP that it is only necessary up to 17.0; in addition, it would also be necessary to add to OpenUpgrade that this new module is no longer required.

@pedrobaeza pedrobaeza added this to the 17.0 milestone Apr 16, 2026
Comment thread mail_activity_plan_domain/models/mail_activity_schedule.py Outdated
Comment thread mail_activity_plan_domain/wizards/mail_activity_schedule.py
Comment thread mail_activity_plan_domain/wizards/mail_activity_schedule.py Outdated
Comment thread mail_activity_plan_domain/models/mail_activity_schedule.py Outdated
Comment thread mail_activity_plan_domain/models/mail_activity_schedule.py Outdated
Comment thread mail_activity_plan_domain/tests/test_mail_activity_plan_domain.py Outdated
@pedrobaeza
Copy link
Copy Markdown
Member

@victoralmau I don't get your comment. This one is for having a domain inside the model, not a model restriction.

@cristina-hidalgo-tecnativa cristina-hidalgo-tecnativa force-pushed the 17.0-add-mail_activity_plan_domain branch 3 times, most recently from 9cce30c to 9f10ef4 Compare April 16, 2026 11:30
Copy link
Copy Markdown
Member

@victoralmau victoralmau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review OK.

These comments are just suggestions:

  • I don't think the users decorator is necessary.
  • It would be helpful to add assertIn and assertNotIn to all plans to confirm whether or not they are available in the different tests.

Comment thread mail_activity_plan_domain/tests/test_mail_activity_plan_domain.py Outdated
Comment thread mail_activity_plan_domain/tests/test_mail_activity_plan_domain.py
@cristina-hidalgo-tecnativa cristina-hidalgo-tecnativa force-pushed the 17.0-add-mail_activity_plan_domain branch from 9f10ef4 to 6726d7c Compare June 2, 2026 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:mail_activity_plan_domain Module mail_activity_plan_domain series:17.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants