Skip to content

Commit

Permalink
[MIG] website_cookiebot: Migration to 16.0
Browse files Browse the repository at this point in the history
TT44375
  • Loading branch information
pilarvargas-tecnativa committed Aug 22, 2023
1 parent df772a8 commit 69afc3a
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 15 deletions.
19 changes: 10 additions & 9 deletions website_cookiebot/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ Website Cookiebot
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fwebsite-lightgray.png?logo=github
:target: https://github.com/OCA/website/tree/15.0/website_cookiebot
:target: https://github.com/OCA/website/tree/16.0/website_cookiebot
:alt: OCA/website
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/website-15-0/website-15-0-website_cookiebot
:target: https://translation.odoo-community.org/projects/website-16-0/website-16-0-website_cookiebot
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/186/15.0
:alt: Try me on Runbot
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/website&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Expand All @@ -40,7 +40,7 @@ To configure this module, you need to:

#. Go to *Website > Configuration > Settings*
#. Under *Select the Website to Configure*, choose a website.
#. Enable *Cookiebot* option.
#. In the privacy section enable *Cookiebot* option.
#. Click on *`How to configure Cookiebot <https://cookiebot.com/goto/help>`__*.
#. Follow the instructions, except step 3 (do not insert the ``<script>`` tags, the module will do it for you).
#. Fill in your *Domain Group ID* (e.g. ``00000000-0000-0000-0000-000000000000``)
Expand All @@ -55,7 +55,7 @@ To use this module, once configured for your website, you just need to browse
that website. You will see the Cookiebot consent banner, and a *Cookies Policy*
link in the footer.

.. figure:: https://raw.githubusercontent.com/OCA/website/15.0/website_cookiebot/static/description/screenshot.png
.. figure:: https://raw.githubusercontent.com/OCA/website/16.0/website_cookiebot/static/description/screenshot.png
:alt: Cookiebot consent banner

Remember that, if your browser is configured to block 3rd party cookies,
Expand All @@ -68,7 +68,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/website/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/website/issues/new?body=module:%20website_cookiebot%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/website/issues/new?body=module:%20website_cookiebot%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Expand All @@ -91,6 +91,7 @@ Contributors
* `Tecnativa <https://www.tecnativa.com/>`__:
* Jairo Llopis
* Stefan Ungureanu
* Pilar Vargas

Maintainers
~~~~~~~~~~~
Expand All @@ -105,6 +106,6 @@ 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.

This module is part of the `OCA/website <https://github.com/OCA/website/tree/15.0/website_cookiebot>`_ project on GitHub.
This module is part of the `OCA/website <https://github.com/OCA/website/tree/16.0/website_cookiebot>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 1 addition & 1 deletion website_cookiebot/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Website Cookiebot",
"summary": "Ask for cookies consent connecting with Cookiebot",
"category": "Website",
"version": "15.0.1.0.0",
"version": "16.0.1.0.0",
"author": "Trey (www.trey.es), Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/website",
"license": "AGPL-3",
Expand Down
2 changes: 1 addition & 1 deletion website_cookiebot/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ To configure this module, you need to:

#. Go to *Website > Configuration > Settings*
#. Under *Select the Website to Configure*, choose a website.
#. Enable *Cookiebot* option.
#. In the privacy section enable *Cookiebot* option.
#. Click on *`How to configure Cookiebot <https://cookiebot.com/goto/help>`__*.
#. Follow the instructions, except step 3 (do not insert the ``<script>`` tags, the module will do it for you).
#. Fill in your *Domain Group ID* (e.g. ``00000000-0000-0000-0000-000000000000``)
Expand Down
1 change: 1 addition & 0 deletions website_cookiebot/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
* `Tecnativa <https://www.tecnativa.com/>`__:
* Jairo Llopis
* Stefan Ungureanu
* Pilar Vargas
12 changes: 12 additions & 0 deletions website_cookiebot/wizards/res_config_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,15 @@ class ResConfigSettings(models.TransientModel):
def _compute_cookiebot_enabled(self):
for record in self:
record.cookiebot_enabled = bool(record.cookiebot_dgid)

Check warning on line 25 in website_cookiebot/wizards/res_config_settings.py

View check run for this annotation

Codecov / codecov/patch

website_cookiebot/wizards/res_config_settings.py#L25

Added line #L25 was not covered by tests

@api.onchange("website_cookies_bar")
def _onchange_website_cookies_bar(self):
for record in self:
if record.website_cookies_bar:
record.cookiebot_enabled = False

Check warning on line 31 in website_cookiebot/wizards/res_config_settings.py

View check run for this annotation

Codecov / codecov/patch

website_cookiebot/wizards/res_config_settings.py#L31

Added line #L31 was not covered by tests

@api.onchange("cookiebot_enabled")
def _onchange_cookiebot_enabled(self):
for record in self:
if record.cookiebot_enabled:
record.website_cookies_bar = False

Check warning on line 37 in website_cookiebot/wizards/res_config_settings.py

View check run for this annotation

Codecov / codecov/patch

website_cookiebot/wizards/res_config_settings.py#L37

Added line #L37 was not covered by tests
5 changes: 1 addition & 4 deletions website_cookiebot/wizards/res_config_settings_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="website.res_config_settings_view_form" />
<field name="arch" type="xml">
<xpath
expr="//div[@id='google_analytics_dashboard_setting']"
position="after"
>
<xpath expr="//div[@id='website_cookies_bar_setting']" position="after">
<div class="col-xs-12 col-md-6 o_setting_box" id="cookiebot_setting">
<div class="o_setting_left_pane">
<field name="cookiebot_enabled" />
Expand Down

0 comments on commit 69afc3a

Please sign in to comment.