Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 128 additions & 0 deletions web_fullcalendar_resource/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
=========================
Web Fullcalendar Resource
=========================

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

.. |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%2Fweb-lightgray.png?logo=github
:target: https://github.com/OCA/web/tree/18.0/web_fullcalendar_resource
:alt: OCA/web
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/web-18-0/web-18-0-web_fullcalendar_resource
: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/web&target_branch=18.0
:alt: Try me on Runboat

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

This module adds a new ``resource`` view type to the web client: an OWL
calendar that displays events in vertical columns, one per resource,
based on the `FullCalendar
Scheduler <https://fullcalendar.io/docs/resource-timegrid-view>`__
plugins.

It reuses Odoo's standard calendar view as much as possible. Only the
arch parser (to read the ``resource_field`` attribute), the model (to
load the resources) and the renderer (to enable the ``resourceTimeGrid``
views) are specialized.

The bundled FullCalendar Scheduler plugins
(``static/lib/fullcalendar/``, v6.1.11) are tri-licensed (commercial /
CC BY-NC-ND / GPLv3). They are used here under the GPLv3 option, enabled
through the ``schedulerLicenseKey = "GPL-My-Project-Is-Open-Source"``
setting, which is compatible with the AGPL-3 license of this module. The
FullCalendar core (shipped by the ``web`` module) is MIT-licensed; only
the Scheduler plugins are covered by this tri-license.

**Table of contents**

.. contents::
:local:

Usage
=====

To use the resource view, declare an ``ir.ui.view`` of type ``resource``
whose arch root is a ``<resource>`` tag. It accepts the same attributes
as the standard ``<calendar>`` view, plus the mandatory
``resource_field`` attribute, which points to the field used to split
events into columns.

.. code:: xml

<resource date_start="date_start" date_stop="date_stop"
resource_field="resource_id" mode="day">
<field name="name"/>
<field name="resource_id" filters="1"/>
</resource>

The ``resource_field`` may be a ``many2one``, ``many2many`` or
``one2many`` field; an event spanning several resources is then shown in
every matching column.

Add the ``resource`` view mode to the related window action so the view
becomes selectable:

.. code:: xml

<field name="view_mode">resource,calendar,list,form</field>

By default, only the resources actually referenced by the loaded records
are displayed as columns. A business module can show every resource of a
domain by extending ``ResourceCalendarModel`` and overriding
``showAllResources`` and ``resourceDomain()``.

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

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

* Le Filament

Contributors
------------

- `Le Filament <https://le-filament.com>`__:

- Hugo Trentesaux

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/web <https://github.com/OCA/web/tree/18.0/web_fullcalendar_resource>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions web_fullcalendar_resource/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
32 changes: 32 additions & 0 deletions web_fullcalendar_resource/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright 2026 Le Filament (https://le-filament.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Web Fullcalendar Resource",
"summary": "OWL calendar view with one vertical column per resource "
"(based on FullCalendar Scheduler plugins)",
"version": "18.0.1.0.0",
"author": "Le Filament, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/web",
"license": "AGPL-3",
"category": "Productivity",
"development_status": "Beta",
"depends": [
"web",
],
"assets": {
# The Scheduler plugins must be loaded AFTER the FullCalendar core.
# They self-register on FullCalendar.globalPlugins.
# Order: premium-common -> resource -> resource-daygrid -> resource-timegrid
"web.fullcalendar_lib": [
"web_fullcalendar_resource/static/lib/fullcalendar/premium-common/index.global.js",
"web_fullcalendar_resource/static/lib/fullcalendar/resource/index.global.js",
"web_fullcalendar_resource/static/lib/fullcalendar/resource-daygrid/index.global.js",
"web_fullcalendar_resource/static/lib/fullcalendar/resource-timegrid/index.global.js",
],
"web.assets_backend": [
"web_fullcalendar_resource/static/src/resource_calendar/**/*",
],
},
"installable": True,
"application": False,
}
2 changes: 2 additions & 0 deletions web_fullcalendar_resource/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import ir_ui_view
from . import ir_actions_act_window_view
13 changes: 13 additions & 0 deletions web_fullcalendar_resource/models/ir_actions_act_window_view.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2026 Le Filament (https://le-filament.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


class IrActionsActWindowView(models.Model):
_inherit = "ir.actions.act_window.view"

view_mode = fields.Selection(
selection_add=[("resource", "Resource")],
ondelete={"resource": "cascade"},
)
19 changes: 19 additions & 0 deletions web_fullcalendar_resource/models/ir_ui_view.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2026 Le Filament (https://le-filament.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


class IrUiView(models.Model):
_inherit = "ir.ui.view"

type = fields.Selection(selection_add=[("resource", "Resource")])

def _get_view_info(self):
# Declare the "resource" view type to the web client (icon, etc.).
# Without this, session.view_info does not contain "resource" and the
# action service rejects the action ("View types not defined resource").
return {
**super()._get_view_info(),
"resource": {"icon": "fa fa-calendar-check-o"},
}
3 changes: 3 additions & 0 deletions web_fullcalendar_resource/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
2 changes: 2 additions & 0 deletions web_fullcalendar_resource/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [Le Filament](https://le-filament.com):
- Hugo Trentesaux
17 changes: 17 additions & 0 deletions web_fullcalendar_resource/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
This module adds a new `resource` view type to the web client: an OWL
calendar that displays events in vertical columns, one per resource,
based on the [FullCalendar
Scheduler](https://fullcalendar.io/docs/resource-timegrid-view) plugins.

It reuses Odoo's standard calendar view as much as possible. Only the
arch parser (to read the `resource_field` attribute), the model (to load
the resources) and the renderer (to enable the `resourceTimeGrid` views)
are specialized.

The bundled FullCalendar Scheduler plugins (`static/lib/fullcalendar/`,
v6.1.11) are tri-licensed (commercial / CC BY-NC-ND / GPLv3). They are
used here under the GPLv3 option, enabled through the
`schedulerLicenseKey = "GPL-My-Project-Is-Open-Source"` setting, which
is compatible with the AGPL-3 license of this module. The FullCalendar
core (shipped by the `web` module) is MIT-licensed; only the Scheduler
plugins are covered by this tri-license.
28 changes: 28 additions & 0 deletions web_fullcalendar_resource/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
To use the resource view, declare an `ir.ui.view` of type `resource`
whose arch root is a `<resource>` tag. It accepts the same attributes as
the standard `<calendar>` view, plus the mandatory `resource_field`
attribute, which points to the field used to split events into columns.

``` xml
<resource date_start="date_start" date_stop="date_stop"
resource_field="resource_id" mode="day">
<field name="name"/>
<field name="resource_id" filters="1"/>
</resource>
```

The `resource_field` may be a `many2one`, `many2many` or `one2many`
field; an event spanning several resources is then shown in every
matching column.

Add the `resource` view mode to the related window action so the view
becomes selectable:

``` xml
<field name="view_mode">resource,calendar,list,form</field>
```

By default, only the resources actually referenced by the loaded records
are displayed as columns. A business module can show every resource of a
domain by extending `ResourceCalendarModel` and overriding
`showAllResources` and `resourceDomain()`.
Loading
Loading