[19.0][MIG] mail_autosubscribe: Migration to 19.0 - #250
Open
dreispt wants to merge 41 commits into
Open
Conversation
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/
make sure partner is a tuple
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
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/
devin-ai-integration
Bot
force-pushed
the
19.0-mig-mail_autosubscribe
branch
from
August 19, 2026 09:15
60985df to
01160ee
Compare
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
Bot
force-pushed
the
19.0-mig-mail_autosubscribe
branch
from
August 19, 2026 09:29
01160ee to
00ae5fc
Compare
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.
Port
mail_autosubscribefrom 18.0 to 19.0 and bump the version to19.0.1.0.0.Key Odoo 19.0 API updates applied:
mail.autosubscribe: replace_sql_constraintswith amodels.Constraintattribute.mail.template._generate_template_recipientsupdated for the 19.0 signature and to keep adding autosubscribe followers when default or suggested recipients are used, while respectinguse_autosubscribe_followersthrough theno_autosubscribe_followerscontext.base._message_get_default_recipientsupdated signature to accept and forwardwith_ccandall_tos.odoo.orm.model_classes.add_to_registryinstead ofodoo_test_helper, and demo data references have been replaced with self-created partner fixtures.