| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Lines of code | 2669 |
| Technical Name |
grev_od_gantt_view |
| License | OPL-1 |
| Website | https://www.grevlin.com |
|
|
Grevlin Visualisation Suite Grev Gantt View — BaseAdd professional, interactive Gantt charts to any Odoo model in minutes. One base module. Unlimited Gantt-enabled models.
|
|
|
Core Features |
||||
|
||||
|
||||
|
What’s Included |
||
|
Preview |
|
|
Changelog |
|
|
Need Help?30 days free support included. Reach us at odoo@grevlin.com Follow us on X: @GrevlinGlobal |
Grev Gantt View — Base
The Grev Gantt View base module provides the grev_gantt view type and the abstract GrevGanttMixin for Odoo 19.0. Any Odoo model — standard or custom — can gain a full-featured, interactive Gantt chart by inheriting the mixin. No Enterprise licence is required.
Note
This module is the engine. It does not add a Gantt chart to any specific model on its own. Install grev_od_project_gantt for project tasks, or grev_od_mrp_gantt for manufacturing work orders. You can also build your own Gantt-enabled module on top of this one.
Overview
Key Features
- Model-agnostic GrevGanttMixin — inherit it on any models.Model subclass to get the get_grev_gantt_data() RPC endpoint and all server-side scheduling helpers.
- Typed dependency links — grev.gantt.link stores Finish-to-Start, Start-to-Start, Finish-to-Finish, and Start-to-Finish links between records of any Gantt-enabled model.
- Baseline snapshots — grev.gantt.baseline stores named planned-start / planned-end snapshots for any record, overlaid as dashed bars on the chart.
- Critical path highlighting — computed in the OWL renderer from the dependency graph.
- Auto-scheduler — drag a bar; successors cascade automatically via web_grev_gantt_reschedule() and _cascade_reschedule().
- S-curve analytics — cumulative planned vs actual progress overlaid on the timeline.
- Resource histogram — capacity load per assignee or work centre.
- Undo / redo — full undo stack backed by action_rollback_grev_gantt_scheduling().
- Export — export the Gantt chart view to PNG or PDF.
Architecture
| Layer | Components |
|---|---|
| Python | grev.gantt.mixin (abstract), grev.gantt.link, grev.gantt.baseline |
| View registration | ir.ui.view with type = 'grev_gantt'; ir.actions.act_window.view |
| OWL controller | GrevGanttController — toolbar, scale switcher, action dispatch |
| OWL renderer | GrevGanttRenderer — Frappe Gantt canvas, bar painting, arrow overlay |
| OWL model | GrevGanttModel — RPC fetch, local cache, link / baseline management |
| Extensions | Critical path, auto-scheduler, S-curve, baselines, resources, undo, export, grouping |
Installation
- Copy the grev_od_gantt_view directory into your Odoo addons path.
- Go to :menuselection:`Settings --> Technical --> Update Apps List`.
- Search for Grev Gantt View and click :guilabel:`Install`.
Important
Odoo 19.0 is required. The module works on both Community and Enterprise editions.
Configuration
Adding Gantt to a Custom Model
To add a Gantt chart to any existing model:
class MyModel(models.Model): _name = 'my.model' _inherit = ['my.model', 'grev.gantt.mixin'] _grev_gantt_start_name = 'date_start' # field containing bar start _grev_gantt_stop_name = 'date_end' # field containing bar end
Then add a grev_gantt arch to a view record:
<record id="view_my_model_grev_gantt" model="ir.ui.view"> <field name="name">my.model.grev_gantt</field> <field name="model">my.model</field> <field name="arch" type="xml"> <grev_gantt date_start="date_start" date_stop="date_end" progress="progress_field" default_scale="week" snap_at="1d" show_critical_path="1"> <field name="project_id"/> </grev_gantt> </field> </record>
Arch Attributes Reference
| Attribute | Description |
|---|---|
| date_start | Field name for bar start (Datetime). |
| date_stop | Field name for bar end (Datetime). |
| progress | Float field (0–100) for bar fill percentage. |
| color | Field whose value drives bar colour (Many2one or Char hex). |
| dependency_field | Many2many field listing predecessor records. |
| dependency_inverted_field | Many2many field listing successor records. |
| show_critical_path | "1" to enable critical path highlight. |
| show_resources | "1" to enable the resource histogram panel. |
| show_baselines | "1" to enable baseline overlay. |
| default_scale | Initial time scale: day, week, month, quarter. |
| snap_at | Drag-drop snap interval: 1h, 1d, 7d. |
| pill_label | "1" to show the record name inside each bar. |
Overridable Hooks
Override these methods in your concrete model to integrate real capacity data:
def _grev_gantt_progress_bar(self, field, res_ids, start_date, stop_date): """Return {res_id: {'value': float, 'max_value': float}}.""" ... def _grev_gantt_unavailability(self, field, res_ids, start_date, stop_date, scale): """Return {res_id: [{'start': datetime_str, 'stop': datetime_str}]}.""" ...
Usage
Creating Dependency Links
Dependency links can be created in two ways:
- Via the task form — if your model defines source_ids / target_ids Many2many fields, changes are automatically mirrored to grev.gantt.link by the mixin's write() override.
- Directly on grev.gantt.link — go to :menuselection:`Technical --> Gantt --> Dependency Links` and create a link manually using the Source Record and Target Record Reference fields.
Creating Baseline Snapshots
Go to :menuselection:`Technical --> Gantt --> Baseline Snapshots` and create a baseline for any Gantt-enabled record. Baselines appear as dashed overlay bars on the chart when :guilabel:`Show Baselines` is toggled on in the Gantt toolbar.
Rescheduling Tasks
Drag any bar left or right on the Gantt chart. The module calls web_grev_gantt_reschedule() on the server, which:
- Updates the dragged record's start and stop dates.
- Computes the shift delta.
- Cascades the same delta to all successor records (depth-first).
- Returns old values so the undo action can roll back the change.
To undo, click :guilabel:`Undo` in the Gantt toolbar.
Technical Reference
grev.gantt.mixin
Abstract model that all Gantt-enabled models inherit.
| Method | Description |
|---|---|
| get_grev_gantt_data(...) | Primary RPC. Returns records, links, baselines, groups, progress bars, unavailabilities. |
| web_grev_gantt_reschedule(record_id, vals, ...) | Reschedules a record and cascades to successors. |
| action_rollback_grev_gantt_scheduling(old_vals) | Rolls back a reschedule operation. |
| _sync_gantt_links(fname, old_ids, new_ids) | Syncs M2M predecessor/successor changes to grev.gantt.link. |
grev.gantt.link
Model-agnostic typed dependency link between any two Gantt-enabled records.
| Field | Description |
|---|---|
| source_id | Reference to the predecessor record (any GrevGanttMixin model). |
| target_id | Reference to the successor record. |
| link_type | 0 FS · 1 SS · 2 FF · 3 SF. |
| lag | Integer days of lead (negative) or lag (positive). |
grev.gantt.baseline
Planned-date snapshot for any Gantt-enabled record.
| Field | Description |
|---|---|
| record_id | Reference to the task / work order (any GrevGanttMixin model). |
| name | Snapshot label (e.g. "Initial Plan", "Rev 2"). |
| baseline_start | Planned start (Datetime). |
| baseline_end | Planned end (Datetime). |
| planned_hours | Planned effort in hours. |
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module