odoo-addon-base-ical


Nameodoo-addon-base-ical JSON
Version 15.0.1.0.0.3 PyPI version JSON
download
home_pagehttps://github.com/OCA/server-backend
SummaryProvide (readonly) .ics URLs to calendar-like models
upload_time2024-05-06 15:18:35
maintainerNone
docs_urlNone
authorHunki Enterprises BV, Odoo Community Association (OCA)
requires_python>=3.8
licenseAGPL-3
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ================================
Readonly publishing of calendars
================================

.. 
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! This file is generated by oca-gen-addon-readme !!
   !! changes will be overwritten.                   !!
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! source digest: sha256:fcc362c6ec99b15b1310731ed8fe11a12ee242565f3b449ad387f663683ae54d
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
    :target: https://odoo-community.org/page/development-status
    :alt: Alpha
.. |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%2Fserver--backend-lightgray.png?logo=github
    :target: https://github.com/OCA/server-backend/tree/15.0/base_ical
    :alt: OCA/server-backend
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
    :target: https://translation.odoo-community.org/projects/server-backend-15-0/server-backend-15-0-base_ical
    :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/server-backend&target_branch=15.0
    :alt: Try me on Runboat

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

This module allows administrators to configure iCalendars based on an arbitrary selection on arbitrary models.

Users can selectively subscribe to them by enabling them in their profile form.

This is useful for exposing Odoo data to calendaring application like Nextcloud.

.. IMPORTANT::
   This is an alpha version, the data model and design can change at any time without warning.
   Only for development or testing purpose, do not use in production.
   `More details on development status <https://odoo-community.org/page/development-status>`_

**Table of contents**

.. contents::
   :local:

Configuration
=============

To configure this module, you need to:

#. Go to Settings/Technical/iCalendars
#. Create a iCalendar, fill in the model you want to expose and possibly a domain to restrict records. You can use the ``user`` variable to restrict things relative to the user using the iCalendar
#. A iCalendar is only available to the allowed users. Use the `Allow automatically` to make the iCalendar available to all users
#. See the examples below for a start

Examples
~~~~~~~~

Simple example, for model ``calendar.event``, you'd fill in ``record.allday and record.start_date or record.start`` as `DTSTART` and ``record.allday and record.stop_date or record.stop`` as `DTEND`.

Advanced example, for model ``calendar.event``, you'd use ``calendar = record._get_ics_file()`` in the code.

Advanced example, for model ``hr.leave``, you can use the following code and ``[("employee_id.user_id", "=", user.id)]`` in the `domain` to export the own time offs. This is a bit more complex because of the way Odoo handles the begin and end times of leaves, and you'll want the extra day as most clients interpret the end date as non-inclusive.:

.. code-block:: python

   confirmed = ("validate", "validate1")
   if record.request_unit_half or record.request_unit_hours:
      event = {
         "dtstart": event["dtstart"].date(),
         "dtend": event["dtend"].date() + timedelta(days=1),
      }
   else:
     event = {
         "dtstart": record.date_from,
         "dtend": record.date_to,
      }

   event["summary"] = record.name
   event["status"] = "CONFIRMED" if record.state in confirmed else "TENTATIVE"

Advanced example, for model ``mail.activity``, you can use the following code and ``[("user_id", "=", user.id)]`` and `domain` to export all user activities.

.. code-block:: python

   todo = {
      "summary": record.display_name,
      "due": record.date_deadline,
      "description": html2plaintext(record.note) if record.note else ""
   }

Usage
=====

To use this module, you need to:

#. Go to your profile form
#. Click `Enable` on one of the calendars listed in tab `Calendars`
#. Copy the URL to the application you use

Known issues / Roadmap
======================

* support all of https://datatracker.ietf.org/doc/html/rfc5545#section-3.8
* allow users to define their own calendars

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-backend/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 <https://github.com/OCA/server-backend/issues/new?body=module:%20base_ical%0Aversion:%2015.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.

Credits
=======

Authors
~~~~~~~

* Hunki Enterprises BV

Contributors
~~~~~~~~~~~~

* Holger Brunn <mail@hunki-enterprises.com> (https://hunki-enterprises.com)
* Florian Kantelberg <florian.kantelberg@initos.com> (https://www.initos.com)

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.

.. |maintainer-hbrunn| image:: https://github.com/hbrunn.png?size=40px
    :target: https://github.com/hbrunn
    :alt: hbrunn

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-hbrunn| 

This module is part of the `OCA/server-backend <https://github.com/OCA/server-backend/tree/15.0/base_ical>`_ project on GitHub.

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



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/OCA/server-backend",
    "name": "odoo-addon-base-ical",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Hunki Enterprises BV, Odoo Community Association (OCA)",
    "author_email": "support@odoo-community.org",
    "download_url": null,
    "platform": null,
    "description": "================================\nReadonly publishing of calendars\n================================\n\n.. \n   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n   !! This file is generated by oca-gen-addon-readme !!\n   !! changes will be overwritten.                   !!\n   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n   !! source digest: sha256:fcc362c6ec99b15b1310731ed8fe11a12ee242565f3b449ad387f663683ae54d\n   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png\n    :target: https://odoo-community.org/page/development-status\n    :alt: Alpha\n.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png\n    :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html\n    :alt: License: AGPL-3\n.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--backend-lightgray.png?logo=github\n    :target: https://github.com/OCA/server-backend/tree/15.0/base_ical\n    :alt: OCA/server-backend\n.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png\n    :target: https://translation.odoo-community.org/projects/server-backend-15-0/server-backend-15-0-base_ical\n    :alt: Translate me on Weblate\n.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png\n    :target: https://runboat.odoo-community.org/builds?repo=OCA/server-backend&target_branch=15.0\n    :alt: Try me on Runboat\n\n|badge1| |badge2| |badge3| |badge4| |badge5|\n\nThis module allows administrators to configure iCalendars based on an arbitrary selection on arbitrary models.\n\nUsers can selectively subscribe to them by enabling them in their profile form.\n\nThis is useful for exposing Odoo data to calendaring application like Nextcloud.\n\n.. IMPORTANT::\n   This is an alpha version, the data model and design can change at any time without warning.\n   Only for development or testing purpose, do not use in production.\n   `More details on development status <https://odoo-community.org/page/development-status>`_\n\n**Table of contents**\n\n.. contents::\n   :local:\n\nConfiguration\n=============\n\nTo configure this module, you need to:\n\n#. Go to Settings/Technical/iCalendars\n#. Create a iCalendar, fill in the model you want to expose and possibly a domain to restrict records. You can use the ``user`` variable to restrict things relative to the user using the iCalendar\n#. A iCalendar is only available to the allowed users. Use the `Allow automatically` to make the iCalendar available to all users\n#. See the examples below for a start\n\nExamples\n~~~~~~~~\n\nSimple example, for model ``calendar.event``, you'd fill in ``record.allday and record.start_date or record.start`` as `DTSTART` and ``record.allday and record.stop_date or record.stop`` as `DTEND`.\n\nAdvanced example, for model ``calendar.event``, you'd use ``calendar = record._get_ics_file()`` in the code.\n\nAdvanced example, for model ``hr.leave``, you can use the following code and ``[(\"employee_id.user_id\", \"=\", user.id)]`` in the `domain` to export the own time offs. This is a bit more complex because of the way Odoo handles the begin and end times of leaves, and you'll want the extra day as most clients interpret the end date as non-inclusive.:\n\n.. code-block:: python\n\n   confirmed = (\"validate\", \"validate1\")\n   if record.request_unit_half or record.request_unit_hours:\n      event = {\n         \"dtstart\": event[\"dtstart\"].date(),\n         \"dtend\": event[\"dtend\"].date() + timedelta(days=1),\n      }\n   else:\n     event = {\n         \"dtstart\": record.date_from,\n         \"dtend\": record.date_to,\n      }\n\n   event[\"summary\"] = record.name\n   event[\"status\"] = \"CONFIRMED\" if record.state in confirmed else \"TENTATIVE\"\n\nAdvanced example, for model ``mail.activity``, you can use the following code and ``[(\"user_id\", \"=\", user.id)]`` and `domain` to export all user activities.\n\n.. code-block:: python\n\n   todo = {\n      \"summary\": record.display_name,\n      \"due\": record.date_deadline,\n      \"description\": html2plaintext(record.note) if record.note else \"\"\n   }\n\nUsage\n=====\n\nTo use this module, you need to:\n\n#. Go to your profile form\n#. Click `Enable` on one of the calendars listed in tab `Calendars`\n#. Copy the URL to the application you use\n\nKnown issues / Roadmap\n======================\n\n* support all of https://datatracker.ietf.org/doc/html/rfc5545#section-3.8\n* allow users to define their own calendars\n\nBug Tracker\n===========\n\nBugs are tracked on `GitHub Issues <https://github.com/OCA/server-backend/issues>`_.\nIn case of trouble, please check there if your issue has already been reported.\nIf you spotted it first, help us to smash it by providing a detailed and welcomed\n`feedback <https://github.com/OCA/server-backend/issues/new?body=module:%20base_ical%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.\n\nDo not contact contributors directly about support or help with technical issues.\n\nCredits\n=======\n\nAuthors\n~~~~~~~\n\n* Hunki Enterprises BV\n\nContributors\n~~~~~~~~~~~~\n\n* Holger Brunn <mail@hunki-enterprises.com> (https://hunki-enterprises.com)\n* Florian Kantelberg <florian.kantelberg@initos.com> (https://www.initos.com)\n\nMaintainers\n~~~~~~~~~~~\n\nThis module is maintained by the OCA.\n\n.. image:: https://odoo-community.org/logo.png\n   :alt: Odoo Community Association\n   :target: https://odoo-community.org\n\nOCA, or the Odoo Community Association, is a nonprofit organization whose\nmission is to support the collaborative development of Odoo features and\npromote its widespread use.\n\n.. |maintainer-hbrunn| image:: https://github.com/hbrunn.png?size=40px\n    :target: https://github.com/hbrunn\n    :alt: hbrunn\n\nCurrent `maintainer <https://odoo-community.org/page/maintainer-role>`__:\n\n|maintainer-hbrunn| \n\nThis module is part of the `OCA/server-backend <https://github.com/OCA/server-backend/tree/15.0/base_ical>`_ project on GitHub.\n\nYou are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.\n\n\n",
    "bugtrack_url": null,
    "license": "AGPL-3",
    "summary": "Provide (readonly) .ics URLs to calendar-like models",
    "version": "15.0.1.0.0.3",
    "project_urls": {
        "Homepage": "https://github.com/OCA/server-backend"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "836ad0156ed28b0521d0f398db88fa00dfc1bd746989b27a9a87590c87a9e497",
                "md5": "303ca9aa5d6c1a7d7f874737fc580d6e",
                "sha256": "337e28ee94f6d22609f573d1ce2dbb80c4f0f0fbe282133035d1fed238ba5c8f"
            },
            "downloads": -1,
            "filename": "odoo_addon_base_ical-15.0.1.0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "303ca9aa5d6c1a7d7f874737fc580d6e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 37662,
            "upload_time": "2024-05-06T15:18:35",
            "upload_time_iso_8601": "2024-05-06T15:18:35.191961Z",
            "url": "https://files.pythonhosted.org/packages/83/6a/d0156ed28b0521d0f398db88fa00dfc1bd746989b27a9a87590c87a9e497/odoo_addon_base_ical-15.0.1.0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-06 15:18:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "OCA",
    "github_project": "server-backend",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "odoo-addon-base-ical"
}
        
Elapsed time: 0.32416s