diff --git a/website_cookiefirst/README.rst b/website_cookiefirst/README.rst index 6ac68db54e..4380cc5463 100644 --- a/website_cookiefirst/README.rst +++ b/website_cookiefirst/README.rst @@ -73,6 +73,11 @@ Contributors - Ioan Galan +- `NICO SOLUTIONS - ENGINEERING & + IT `__: + + - Nils Coenen nils.coenen@nico-solutions.de + Maintainers ----------- diff --git a/website_cookiefirst/__manifest__.py b/website_cookiefirst/__manifest__.py index 3f8a19cde9..e746bdbfb9 100644 --- a/website_cookiefirst/__manifest__.py +++ b/website_cookiefirst/__manifest__.py @@ -4,7 +4,7 @@ "name": "Website Cookiefirst", "summary": "Cookiefirst integration", "category": "Website", - "version": "16.0.1.0.0", + "version": "17.0.1.0.0", "author": "Studio73, Odoo Community Association (OCA)", "website": "https://github.com/OCA/website", "license": "AGPL-3", diff --git a/website_cookiefirst/readme/CONTRIBUTORS.md b/website_cookiefirst/readme/CONTRIBUTORS.md index 1bd17ca07b..e746d79db8 100644 --- a/website_cookiefirst/readme/CONTRIBUTORS.md +++ b/website_cookiefirst/readme/CONTRIBUTORS.md @@ -1,2 +1,4 @@ -- [Studio73](https://www.studio73.es): +- [Studio73](https://www.studio73.es): - Ioan Galan \<\> +- [NICO SOLUTIONS - ENGINEERING & IT](https://www.nico-solutions.de): + - Nils Coenen diff --git a/website_cookiefirst/static/description/index.html b/website_cookiefirst/static/description/index.html index 02993b8b99..f1d1100aab 100644 --- a/website_cookiefirst/static/description/index.html +++ b/website_cookiefirst/static/description/index.html @@ -420,6 +420,11 @@

Contributors

  • Ioan Galan <ioan@studio73.es>
  • +
  • NICO SOLUTIONS - ENGINEERING & +IT: +
  • diff --git a/website_cookiefirst/tests/__init__.py b/website_cookiefirst/tests/__init__.py new file mode 100644 index 0000000000..482667d890 --- /dev/null +++ b/website_cookiefirst/tests/__init__.py @@ -0,0 +1,4 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import test_website +from . import test_res_config_settings diff --git a/website_cookiefirst/tests/test_res_config_settings.py b/website_cookiefirst/tests/test_res_config_settings.py new file mode 100644 index 0000000000..1c6478068a --- /dev/null +++ b/website_cookiefirst/tests/test_res_config_settings.py @@ -0,0 +1,27 @@ +# Copyright 2023 NICO SOLUTIONS - ENGINEERNG & IT, Nils Coenen +# License APL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo.tests.common import TransactionCase + + +class TestResConfigSettings(TransactionCase): + def setUp(self): + super().setUp() + self.res_config_settings = self.env["res.config.settings"] + + def test_cookiefirst_enabled(self): + website = self.env["website"].create( + { + "name": "Test Website", + "cookiefirst_identifier": "test_identifier", + } + ) + res_config_settings = self.res_config_settings.create( + { + "website_id": website.id, + "cookiefirst_identifier": "test_identifier", + } + ) + self.assertTrue(res_config_settings.cookiefirst_enabled) + res_config_settings.cookiefirst_enabled = False + self.assertFalse(website.cookiefirst_identifier) diff --git a/website_cookiefirst/tests/test_website.py b/website_cookiefirst/tests/test_website.py new file mode 100644 index 0000000000..9b1679817c --- /dev/null +++ b/website_cookiefirst/tests/test_website.py @@ -0,0 +1,15 @@ +# Copyright 2023 NICO SOLUTIONS - ENGINEERNG & IT, Nils Coenen +# License APL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo.tests.common import TransactionCase + + +class TestWebsite(TransactionCase): + def setUp(self): + super().setUp() + self.website = self.env["website"].create( + {"name": "Test Website", "cookiefirst_identifier": "1234567890"} + ) + + def test_cookiefirst_identifier(self): + self.assertEqual(self.website.cookiefirst_identifier, "1234567890") diff --git a/website_cookiefirst/views/res_config_settings_views.xml b/website_cookiefirst/views/res_config_settings_views.xml index a98422a4f0..4f9d07cb70 100644 --- a/website_cookiefirst/views/res_config_settings_views.xml +++ b/website_cookiefirst/views/res_config_settings_views.xml @@ -1,38 +1,29 @@ - res.config.settings - - - -
    - -
    -
    -
    -
    -
    -
    + + res.config.settings.view.form.inherit.cookiefirst + + res.config.settings + + + + + +
    +
    +
    +
    +
    +