diff --git a/calendar_dav/README.rst b/calendar_dav/README.rst new file mode 100644 index 00000000..d24d79ef --- /dev/null +++ b/calendar_dav/README.rst @@ -0,0 +1,77 @@ +============ +Calendar dav +============ + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:b283df6e2c726e1688e3f97e5378e9ad908bd5b5206e5fc14c99df20bad44fc2 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcalendar-lightgray.png?logo=github + :target: https://github.com/OCA/calendar/tree/18.0/calendar_dav + :alt: OCA/calendar +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/calendar-18-0/calendar-18-0-calendar_dav + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/calendar&target_branch=18.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module adds the missing link between basedav and the Odoo calendar. +Collections should point to the UUID field of the calendar.event models. + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* initOS GmbH + +Contributors +------------ + +- Florian Kantelberg + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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/calendar `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/calendar_dav/__init__.py b/calendar_dav/__init__.py new file mode 100644 index 00000000..ec5c5f09 --- /dev/null +++ b/calendar_dav/__init__.py @@ -0,0 +1,5 @@ +# Copyright 2022 initOS GmbH +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import models +from .hooks import post_init_hook diff --git a/calendar_dav/__manifest__.py b/calendar_dav/__manifest__.py new file mode 100644 index 00000000..330daed7 --- /dev/null +++ b/calendar_dav/__manifest__.py @@ -0,0 +1,20 @@ +# Copyright 2022 initOS GmbH +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +{ + "name": "Calendar dav", + "summary": "Extension of the base_dav module to work better with the calendar", + "version": "18.0.1.0.0", + "category": "Calendar", + "website": "https://github.com/OCA/calendar", + "author": "initOS GmbH, Odoo Community Association (OCA)", + "license": "AGPL-3", + "application": False, + "installable": True, + "auto_install": True, + "post_init_hook": "post_init_hook", + "depends": [ + "base_dav", + "calendar", + ], +} diff --git a/calendar_dav/hooks.py b/calendar_dav/hooks.py new file mode 100644 index 00000000..20c9e42f --- /dev/null +++ b/calendar_dav/hooks.py @@ -0,0 +1,16 @@ +# Copyright 2022 initOS GmbH +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +import logging +from uuid import uuid4 + +_logger = logging.getLogger(__name__) + + +def post_init_hook(env): + """ + Fetches all the PO and resets the sequence of the purchase order lines. + """ + _logger.info("Setting unique UUID for calendar events") + for event in env["calendar.event"].search([]): + event.uuid = str(uuid4()) diff --git a/calendar_dav/i18n/calendar_dav.pot b/calendar_dav/i18n/calendar_dav.pot new file mode 100644 index 00000000..b063ea31 --- /dev/null +++ b/calendar_dav/i18n/calendar_dav.pot @@ -0,0 +1,25 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * calendar_dav +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: calendar_dav +#: model:ir.model,name:calendar_dav.model_calendar_event +msgid "Event" +msgstr "" + +#. module: calendar_dav +#: model:ir.model.fields,field_description:calendar_dav.field_calendar_event_uuid +msgid "Uuid" +msgstr "" + diff --git a/calendar_dav/models/__init__.py b/calendar_dav/models/__init__.py new file mode 100644 index 00000000..9caa0bc5 --- /dev/null +++ b/calendar_dav/models/__init__.py @@ -0,0 +1,4 @@ +# Copyright 2022 initOS GmbH +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import calendar_event diff --git a/calendar_dav/models/calendar_event.py b/calendar_dav/models/calendar_event.py new file mode 100644 index 00000000..63f8fab0 --- /dev/null +++ b/calendar_dav/models/calendar_event.py @@ -0,0 +1,12 @@ +# Copyright 2022 initOS GmbH +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from uuid import uuid4 + +from odoo import fields, models + + +class CalendarEvent(models.Model): + _inherit = "calendar.event" + + uuid = fields.Char(readonly=True, default=lambda self: str(uuid4())) diff --git a/calendar_dav/pyproject.toml b/calendar_dav/pyproject.toml new file mode 100644 index 00000000..4231d0cc --- /dev/null +++ b/calendar_dav/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/calendar_dav/readme/CONTRIBUTORS.md b/calendar_dav/readme/CONTRIBUTORS.md new file mode 100644 index 00000000..64b8141b --- /dev/null +++ b/calendar_dav/readme/CONTRIBUTORS.md @@ -0,0 +1 @@ +- Florian Kantelberg \<\> diff --git a/calendar_dav/readme/DESCRIPTION.md b/calendar_dav/readme/DESCRIPTION.md new file mode 100644 index 00000000..c4f3644c --- /dev/null +++ b/calendar_dav/readme/DESCRIPTION.md @@ -0,0 +1,2 @@ +This module adds the missing link between basedav and the Odoo calendar. +Collections should point to the UUID field of the calendar.event models. diff --git a/calendar_dav/static/description/icon.png b/calendar_dav/static/description/icon.png new file mode 100644 index 00000000..3a0328b5 Binary files /dev/null and b/calendar_dav/static/description/icon.png differ diff --git a/calendar_dav/static/description/index.html b/calendar_dav/static/description/index.html new file mode 100644 index 00000000..94e99dbf --- /dev/null +++ b/calendar_dav/static/description/index.html @@ -0,0 +1,424 @@ + + + + + +Calendar dav + + + +
+

Calendar dav

+ + +

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

+

This module adds the missing link between basedav and the Odoo calendar. +Collections should point to the UUID field of the calendar.event models.

+

Table of contents

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • initOS GmbH
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

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

+

This module is part of the OCA/calendar project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 00000000..1f6361c0 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1 @@ +odoo-addon-base_dav @ git+https://github.com/OCA/server-backend.git@refs/pull/431/head#subdirectory=base_dav