← Back to Pull requests

[19.0][ADD] web_grid_view: add community grid view type #3641

Open
alvaro-domatix opened this pull request with 2637 lines diff across 42 files
View on GitHub
alvaro-domatix alvaro-domatix commented on Aug 13, 2026 17:09 UTC
Author

web_grid_view

Adds a grid view type to Odoo.

A grid view renders records as a 2-dimensional matrix: rows group records by a
field (typically a many2one, with an optional section level), columns represent
consecutive time periods, and each cell aggregates a measure of the records that
fall in that row and column. Useful for timesheets, planning, forecasting and any
data that fits a row/column/date layout.

Features

  • Row grouping with an optional section level

  • Date columns with selectable ranges: day, week, month, year

  • Configurable measure field

  • Inline cell editing through grid_update_cell

  • Section, column and grand totals

  • Magnifier to open the records behind a cell

  • Sticky headers and row titles

  • Includes a demo grid view on ir.cron
  • Usage

    <record id="view_my_model_grid" model="ir.ui.view">
        <field name="name">my.model.grid</field>
        <field name="model">my.model</field>
        <field name="arch" type="xml">
            <grid_view string="My Grid" editable="1">
                <field name="project_id" type="row" section="1" />
                <field name="user_id" type="row" />
                <field name="date" type="col">
                    <range
                        name="week"
                        string="Week"
                        span="week"
                        step="day"
                        default="1"
                    />
                </field>
                <field name="unit_amount" type="measure" widget="float_time" />
            </grid_view>
        </field>
    </record>
    

    Add grid_view to the action's view_mode to use it.

    Diff: 2637 lines (+2637 / -0) across 42 files Reviewer: polcerverapyming Review duration: 157650m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.79) × (1 − Review Confidence (0.77)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.79 · 2637 lines diff across 42 files
    0.79
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.61 · 4 substantive comment(s)
    0.61
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    77%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.400
    Mass File Touch mass_file_touch
    0.080
    Real PR Conversation Timeline
    6 items
    pedrobaeza pedrobaeza commented on Aug 13, 2026 22:05 UTC
    Contributor

    Can you include demo data with an example over ir.cron for example?

    pedrobaeza pedrobaeza commented on code on Aug 13, 2026 22:05 UTC
    Code Review
    web_grid_view/models/demo.py:1
    @@ -0,0 +1,54 @@
    +# Copyright 2026 Domatix
    +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
    +
    +from odoo import fields, models
    +
    +
    +class GridDemoEntry(models.Model):
    +    _name = "grid.demo.entry"

    This model shouldn't be here, as it's loaded no matter if demo or not.

    alvaro-domatix alvaro-domatix commented on Aug 14, 2026 08:48 UTC
    Author

    Done! @pedrobaeza

    pedrobaeza pedrobaeza commented on Aug 14, 2026 08:50 UTC
    Contributor

    Thanks, I will review next week and tell you back.

    polcerverapyming polcerverapyming approved these changes on Oct 14, 2026 11:00 UTC
    Approved Reviewer

    Everything works perfectly! The grid view displays scheduled actions correctly, and the Day, Week and Month controls work as expected.

    Assignees
    alvaro-domatix alvaro-domatix
    Labels
    risk: low confidence: 77.4% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 78.5% (HIGH) · Higher = larger blast radius
    78.5%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 77.4% · Lower = rushed or shallow review
    77.4%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.7% · Safe to merge
    17.7%
    Repository