diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 648fa1f05f6e236319c91e5b08159b9b3ee285a1_LmdpdGxhYi1jaS55bWw=..92e6a04b848eddd1d9bdc6afef488c51984d6000_LmdpdGxhYi1jaS55bWw= 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,8 @@ include: - project: xcg/ci-templates file: /odoo/18.0/gitlab-ci.yaml + +variables: + TEST_OPTIONS: --test-tags=odoo_addons_mail + # Also install mail to run mail dependant tets + ODOO_SCRIPTS_MODULE_LIST: mail diff --git a/NEWS.rst b/NEWS.rst index 648fa1f05f6e236319c91e5b08159b9b3ee285a1_TkVXUy5yc3Q=..92e6a04b848eddd1d9bdc6afef488c51984d6000_TkVXUy5yc3Q= 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -1,6 +1,11 @@ Changelog ========= +18.0.2.2.0 +---------- + +Remove mail dependency, to avoid forcing its installation, only needed when using some specific converters. + 18.0.2.1.0 ---------- diff --git a/__manifest__.py b/__manifest__.py index 648fa1f05f6e236319c91e5b08159b9b3ee285a1_X19tYW5pZmVzdF9fLnB5..92e6a04b848eddd1d9bdc6afef488c51984d6000_X19tYW5pZmVzdF9fLnB5 100644 --- a/__manifest__.py +++ b/__manifest__.py @@ -21,7 +21,7 @@ "name": "Converter", "license": "AGPL-3", "summary": "Convert odoo records to/from plain data structures.", - "version": "18.0.2.1.0", + "version": "18.0.2.2.0", "category": "Hidden", "author": "XCG Consulting", "website": "https://orbeet.io/", @@ -25,7 +25,7 @@ "category": "Hidden", "author": "XCG Consulting", "website": "https://orbeet.io/", - "depends": ["mail"], + "depends": ["base"], "installable": True, "external_dependencies": {"python": ["fastjsonschema"]}, } diff --git a/mail_template.py b/mail_template.py index 648fa1f05f6e236319c91e5b08159b9b3ee285a1_bWFpbF90ZW1wbGF0ZS5weQ==..92e6a04b848eddd1d9bdc6afef488c51984d6000_bWFpbF90ZW1wbGF0ZS5weQ== 100644 --- a/mail_template.py +++ b/mail_template.py @@ -29,6 +29,8 @@ """This converter wraps ``mail.template::_render_template``. Multiple records are allowed but ``mail.template::_render_template`` still runs once per record; to accomodate, we provide ``ctx["records"]``. + + Using this converter requires the mail module to be installed. """ def __init__(self, template: str, post_eval: bool = False): diff --git a/tests/test_mail_template.py b/tests/test_mail_template.py index 648fa1f05f6e236319c91e5b08159b9b3ee285a1_dGVzdHMvdGVzdF9tYWlsX3RlbXBsYXRlLnB5..92e6a04b848eddd1d9bdc6afef488c51984d6000_dGVzdHMvdGVzdF9tYWlsX3RlbXBsYXRlLnB5 100644 --- a/tests/test_mail_template.py +++ b/tests/test_mail_template.py @@ -1,7 +1,7 @@ ############################################################################## # # Converter Odoo module -# Copyright © 2023 XCG Consulting <https://xcg-consulting.fr> +# Copyright © 2023, 2024 XCG Consulting <https://xcg-consulting.fr> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -20,6 +20,6 @@ from odoo import tests # type: ignore[import-untyped] -from .. import MailTemplate +from ..mail_template import MailTemplate @@ -24,5 +24,6 @@ +@tests.tagged("-standard", "odoo_addons_mail") class Test(tests.TransactionCase): """Test converter that wraps ``mail.template::_render_template``."""