← Back to Pull requests

[19.0][ADD] web_form_listpanel #3810

Open
unknown opened this pull request with 573 lines diff across 7 files
View on GitHub
unknown unknown commented on Nov 15, 2026 11:38 UTC
Author

This module adds a <listpanel> element for form views. It shows a compact,
read-only list on the left of the form, and clicking a row opens that record
in the form. It is meant for form-oriented work, where the record you are
editing has correlated records and you want to keep them in view while you
work through them one by one.

Modes

The panel header has a Related | Search toggle:

  • Related: the records matching a domain evaluated on the current record,

  • e.g. the other orders of the same customer. The domain can also be computed
    on the server, following the tag_ids_domain pattern in core: point domain
    at a computed Binary (list) or Char (domain string) field.
  • Search: the records of the list or kanban view the form was opened from,

  • with the same search domain, sort order and page.

    <form>
        <sheet>...</sheet>
        <listpanel domain="[('partner_id', '=', partner_id)]"
                   order="date_order desc"
                   string="Orders of this customer"
                   invisible="not partner_id"
                   decoration-muted="state == 'cancel'">
            <field name="name"/>
            <field name="state" widget="badge"/>
            <field name="tag_ids" widget="many2many_tags" optional="hide"/>
            <field name="amount_total" sum="Total"/>
        </listpanel>
    </form>
    

    The panel is always shown on the left, wherever <listpanel> sits in the
    arch; declaring it after the <sheet> keeps inheriting views that use
    //field[@name=...] on the form's own fields.

    Columns are the <field> children, or the display name if there are none.
    The panel is drawn by core's ListRenderer on a RelationalModel, so the
    <listpanel> takes the row decoration- of a <list> and its <field>
    children take what a list column takes: widget, options,
    decoration-
    , optional, column_invisible (evaluated on the form's
    record), sum/avg, width, string. Clicking a column header sorts the
    panel. Fields named only in the panel's expressions, and the currency of a
    monetary column, are loaded as in a list. Buttons, grouping and row handles
    are not supported. The panel uses the standard Pager, highlights the current record, and saves
    a dirty record before moving, like the form pager does. Users can collapse it,
    and the choice is remembered per view. It is hidden in dialogs and below the
    LG breakpoint.

    Auto panel (opt-in)

    A setting in Settings › General Settings › List Panel gives every form
    opened from a list or kanban, if it declares no <listpanel>, a button next
    to the pager. The button opens the panel in Search mode with the list's
    visible columns (at most three), drawn with the list's widgets and row
    decorations. It is off by default.

    Technical notes

  • Client side only, apart from the setting (a res.config.settings boolean

  • passed to the browser through session_info). No new routes and no sudo
    on records. Depends on web and base_setup.
  • Placement follows mail's chatter: a form_compilers entry plus a

  • FormCompiler.compile patch, so it works with or without mail.
  • Search mode needs the origin view's sort and page, which a list does not

  • hand to the form. ListController and KanbanController.openRecord are
    patched to pass them on, and the form keeps them across breadcrumb round
    trips.
  • The <listpanel> columns are hidden from FormArchParser while it parses

  • the form, so their modifiers never apply to the form's own record.
  • Tests: 90 Hoot tests, run through an HttpCase (tests/test_js.py), plus

  • Python tests for the setting.

    Screenshots

    The README links to these images on OCA/web 19.0, so they show there only
    after the merge. Here they are from the PR branch.

    Related mode (a form declaring <listpanel>):

    !Related mode

    Search mode, opened from the Companies list sorted by name, descending:

    !Search mode

    The Auto panel setting:

    !Auto panel setting

    The Countries form, which declares no <listpanel>, with the panel opened
    from the list button:

    !Auto panel

    Diff: 573 lines (+429 / -144) across 7 files Reviewer: robyf70 Review duration: 22196m
    All Vouch review confidence checks passed
    Residual risk 0.27 = Change Risk (0.50) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 573 lines diff across 7 files
    0.50
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    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.380
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #3810"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% 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: 49.8% (MEDIUM) · Higher = larger blast radius
    49.8%
    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: 46.7% · Lower = rushed or shallow review
    46.7%
    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: 26.5% · Safe to merge
    26.5%
    Repository