diff --git a/website_cookiefirst/README.rst b/website_cookiefirst/README.rst index 6ac68db54e..bfe6ea25f7 100644 --- a/website_cookiefirst/README.rst +++ b/website_cookiefirst/README.rst @@ -29,8 +29,9 @@ Website Cookiefirst |badge1| |badge2| |badge3| |badge4| |badge5| This module integrates Odoo website with GDPR through the functionality -of Cookiefirst , you need to register your -website domain in Cookiefirst's portal. +of Cookiefirst +<`https://cookiefirst.com/\\> >`__, you need +to register your website domain in Cookiefirst's portal. **Table of contents** @@ -48,6 +49,11 @@ To configure this module, you need to: '00000000-0000-0000-0000-000000000000'). 4. Click on "Save" button. +⚠️ **Please note: if another cookie consent solution is installed (e.g. +Cookiebot), the execution of the Cookiefirst script will be prevented. +Make sure that no other cookie consent solution is installed when using +the Cookiefirst module.** + Bug Tracker =========== @@ -73,6 +79,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/CONFIGURE.md b/website_cookiefirst/readme/CONFIGURE.md index 9e0347216c..eb90a8e3dd 100644 --- a/website_cookiefirst/readme/CONFIGURE.md +++ b/website_cookiefirst/readme/CONFIGURE.md @@ -5,3 +5,8 @@ To configure this module, you need to: 3. Fill in your 'Cookiefirst ID' (e.g. '00000000-0000-0000-0000-000000000000'). 4. Click on "Save" button. + +⚠️ **Please note: if another cookie consent solution is +installed (e.g. Cookiebot), the execution of the Cookiefirst +script will be prevented. Make sure that no other cookie +consent solution is installed when using the Cookiefirst module.** 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..8a1db84763 100644 --- a/website_cookiefirst/static/description/index.html +++ b/website_cookiefirst/static/description/index.html @@ -1,4 +1,3 @@ - @@ -9,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -275,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -301,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -371,8 +371,9 @@

Website Cookiefirst

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/website Translate me on Weblate Try me on Runboat

This module integrates Odoo website with GDPR through the functionality -of Cookiefirst <https://cookiefirst.com/>, you need to register your -website domain in Cookiefirst’s portal.

+of Cookiefirst +<https://cookiefirst.com/\>, you need +to register your website domain in Cookiefirst’s portal.

Table of contents

    @@ -396,6 +397,10 @@

    Configuration

    ‘00000000-0000-0000-0000-000000000000’).
  • Click on “Save” button.
  • +

    ⚠️ Please note: if another cookie consent solution is installed (e.g. +Cookiebot), the execution of the Cookiefirst script will be prevented. +Make sure that no other cookie consent solution is installed when using +the Cookiefirst module.

Maintainers

This module is maintained by the OCA.

-Odoo Community Association + +Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

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 + + + + + +
+
+
+
+
+