Skip to content

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

Open
alvaro-domatix wants to merge 1 commit into
OCA:19.0from
alvaro-domatix:19.0-add-web_grid_view-coexist
Open

[19.0][ADD] web_grid_view: add community grid view type#3641
alvaro-domatix wants to merge 1 commit into
OCA:19.0from
alvaro-domatix:19.0-add-web_grid_view-coexist

Conversation

@alvaro-domatix

@alvaro-domatix alvaro-domatix commented Aug 13, 2026

Copy link
Copy Markdown

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.

@pedrobaeza pedrobaeza added this to the 19.0 milestone Aug 13, 2026
@pedrobaeza

Copy link
Copy Markdown
Member

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

Comment thread web_grid_view/models/demo.py Outdated


class GridDemoEntry(models.Model):
_name = "grid.demo.entry"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@alvaro-domatix
alvaro-domatix force-pushed the 19.0-add-web_grid_view-coexist branch 3 times, most recently from 2f98631 to e0a1896 Compare August 14, 2026 07:08
Adds a 2D grid view type to Odoo, with row/section grouping, date columns
(day/week/month/year ranges), measures, inline cell editing, section and column
totals, a magnifier to open a cell's records, and a demo grid view on ir.cron.
@alvaro-domatix
alvaro-domatix force-pushed the 19.0-add-web_grid_view-coexist branch from e0a1896 to 4fbfef2 Compare August 14, 2026 07:36
@alvaro-domatix

Copy link
Copy Markdown
Author

Done! @pedrobaeza

@pedrobaeza

Copy link
Copy Markdown
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants