Skip to content

[19.0][MIG] mail_autosubscribe: Migration to 19.0 - #250

Open
dreispt wants to merge 41 commits into
OCA:19.0from
dreispt:19.0-mig-mail_autosubscribe
Open

[19.0][MIG] mail_autosubscribe: Migration to 19.0#250
dreispt wants to merge 41 commits into
OCA:19.0from
dreispt:19.0-mig-mail_autosubscribe

Conversation

@dreispt

@dreispt dreispt commented Aug 18, 2026

Copy link
Copy Markdown
Member

Port mail_autosubscribe from 18.0 to 19.0 and bump the version to 19.0.1.0.0.

Key Odoo 19.0 API updates applied:

  • mail.autosubscribe: replace _sql_constraints with a models.Constraint attribute.
  • mail.template._generate_template_recipients updated for the 19.0 signature and to keep adding autosubscribe followers when default or suggested recipients are used, while respecting use_autosubscribe_followers through the no_autosubscribe_followers context.
  • base._message_get_default_recipients updated signature to accept and forward with_cc and all_tos.
  • Tests now use odoo.orm.model_classes.add_to_registry instead of odoo_test_helper, and demo data references have been replaced with self-created partner fixtures.

ivantodorovich and others added 30 commits August 18, 2026 14:33
Currently translated at 100.0% (20 of 20 strings)

Translation: social-14.0/social-14.0-mail_autosubscribe
Translate-URL: https://translation.odoo-community.org/projects/social-14-0/social-14-0-mail_autosubscribe/ca/
This should fix the tests, that are currently failing on CI with:

```
2022-07-05 16:19:13,250 259 INFO odoo odoo.service.server: Starting post tests
2022-07-05 16:19:13,253 259 ERROR odoo odoo.tests.loader: Can not `import mail_autosubscribe`.
Traceback (most recent call last):
  File "/opt/odoo/odoo/tests/loader.py", line 33, in _get_tests_modules
    mod = importlib.import_module('.tests', modpath)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/__w/social/social/mail_autosubscribe/tests/__init__.py", line 1, in <module>
    from . import test_mail_autosubscribe
  File "/__w/social/social/mail_autosubscribe/tests/test_mail_autosubscribe.py", line 5, in <module>
    from odoo_test_helper import FakeModelLoader
ModuleNotFoundError: No module named 'odoo_test_helper'
```
Currently translated at 100.0% (20 of 20 strings)

Translation: social-16.0/social-16.0-mail_autosubscribe
Translate-URL: https://translation.odoo-community.org/projects/social-16-0/social-16-0-mail_autosubscribe/it/
Currently translated at 100.0% (20 of 20 strings)

Translation: social-16.0/social-16.0-mail_autosubscribe
Translate-URL: https://translation.odoo-community.org/projects/social-16-0/social-16-0-mail_autosubscribe/es/
…context to tests

The external dependency odoo_test_helper must be defined in test-requirements.txt
not in the manifest.
Also, a context has been added to the tests to avoid executing the code of the
"_message_get_default_recipients" method added by this module in a test
environment as long as it is not the module itself that is being tested.

TT48102
OCA-git-bot and others added 10 commits August 18, 2026 14:33
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: mail-18.0/mail-18.0-mail_autosubscribe
Translate-URL: https://translation.odoo-community.org/projects/mail-18-0/mail-18-0-mail_autosubscribe/
Currently translated at 84.2% (16 of 19 strings)

Translation: mail-18.0/mail-18.0-mail_autosubscribe
Translate-URL: https://translation.odoo-community.org/projects/mail-18-0/mail-18-0-mail_autosubscribe/de/
Currently translated at 100.0% (19 of 19 strings)

Translation: mail-18.0/mail-18.0-mail_autosubscribe
Translate-URL: https://translation.odoo-community.org/projects/mail-18-0/mail-18-0-mail_autosubscribe/de/
Currently translated at 73.6% (14 of 19 strings)

Translation: mail-18.0/mail-18.0-mail_autosubscribe
Translate-URL: https://translation.odoo-community.org/projects/mail-18-0/mail-18-0-mail_autosubscribe/fr/
Currently translated at 100.0% (19 of 19 strings)

Translation: mail-18.0/mail-18.0-mail_autosubscribe
Translate-URL: https://translation.odoo-community.org/projects/mail-18-0/mail-18-0-mail_autosubscribe/fr/
@OCA-git-bot OCA-git-bot added series:19.0 mod:mail_autosubscribe Module mail_autosubscribe labels Aug 18, 2026
@dreispt dreispt changed the title [MIG] mail_autosubscribe: Migration to 19.0 [19.0][MIG] mail_autosubscribe: Migration to 19.0 Aug 19, 2026
@devin-ai-integration
devin-ai-integration Bot force-pushed the 19.0-mig-mail_autosubscribe branch from 60985df to 01160ee Compare August 19, 2026 09:15
Port mail_autosubscribe from 18.0 to 19.0.

- Replace _sql_constraints with models.Constraint for Odoo 19.0 registry constraints.
- Update _generate_template_recipients for the Odoo 19.0 signature and to keep adding autosubscribe followers when default or suggested recipients are used, while respecting use_autosubscribe_followers through the no_autosubscribe_followers context.
- Update _message_get_default_recipients signature to accept and pass with_cc and all_tos.
- Replace odoo_test_helper fake model loader with odoo.orm.model_classes.add_to_registry in tests.
- Replace demo data references in tests with self-created partner fixtures.

Assisted-by: Devin:SWE-1.7
@devin-ai-integration
devin-ai-integration Bot force-pushed the 19.0-mig-mail_autosubscribe branch from 01160ee to 00ae5fc Compare August 19, 2026 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:mail_autosubscribe Module mail_autosubscribe series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.