OdooWiki OCA HUB

Web Widget Sub View

web_widget_sub_view folder_open OCA/web open_in_new
Uncategorised License: AGPL-3

This addon allows us to define list subviews in our forms.

This sets a better handling of this views by adding filters and so on.

auto_awesome What this module does

AI-generated from the code · Odoo 16.0

Adds a new widget that lets you embed a list, kanban or other view of related records directly inside a form, with optional search filters, grouping and favourites.

This module gives Odoo a new form widget called sub_view_widget. When a developer places it on a form, users see an extra embedded view of records related to the record they are looking at, without leaving the page.

  • The embedded view can be a list or kanban (on small screens it defaults to kanban, otherwise list).
  • It can show search options: filters, grouping and favourites, each switched on or off per widget.
  • Records shown are limited by a domain, so only related records appear (for example contacts whose parent is the current company).
  • Clicking a record opens it using an action defined on the widget; a create button can open a custom action or the standard form.
  • The widget passes context to the embedded view, so new records can be pre-filled (for example the parent contact).

The module ships a demo that adds a "Sub View" page inside the contact form showing child contacts. It only depends on the standard web client and does not change any business model or add menus of its own; it is a building block for other modules and customisations.

Depends on

web

Text generated by AI (DeepSeek) from reading the Odoo 16.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 1 confirmed, 8 with no information of 9 versions.

terminal Installation and usage

OCA documentation · Odoo 16.0

This is a technical module.

You can add this kind of elements by using

<widget 
  name="sub_view_widget" 
  model="res.partner"
  domain="[('parent_id', '=', id)]"
  context="{'search_default_parent_id': id}"         
/>

It is necessary to use model. Context is recomended for setting default values and forcing specific views or default searching values.

Also, you can use:

  • view-type: To force an specific view kind. By default it uses list in desktop and kanban in mobile.
  • create-action: To force an specific action for creation (it is a xmlid)
  • open-action: The function to launch to open the record. By default, it uses get_formview_action.
  • filter: set 0 to hide the filters
  • group-by: set 0 to hide the group-by
  • favorite: set 0 to hide the favorite

No verified information in OCA: Installation, Configuration.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.