OdooWiki OCA HUB

Product Top Category

product_top_category folder_open OCA/product-attribute open_in_new
Sale License: AGPL-3

For all categories, compute their top categories. This can be useful for more readable sale reports.

Note : Categories must have been configured so that the top category is informative. This module is not useful if the top category is always "All".

auto_awesome What this module does

AI-generated from the code · Odoo 12.0

Adds a stored "Product Top Category" field on product categories and products, automatically showing the highest-level category in the hierarchy. Useful for grouping and reporting sales by top-level category.

This module adds an automatic field called "Product Top Category" to product categories and to products. For any category, Odoo walks up the category tree and stores the highest-level parent category it finds; if a category has no parent, it is its own top category.

On the product category form, the new field appears right after the "Parent Category" field, so users can see the top category of the category they are editing. On products, the same information is pulled automatically from the product's category, so each product also carries its top category.

Because the value is stored and recalculated when the parent category changes, it stays up to date without manual work. The module does not add menus, buttons, reports or scheduled jobs by itself; it simply makes the top-level category available for grouping, filtering and reporting, for example in sale reports.

It only makes sense if your category hierarchy has several levels: if every category sits directly under "All", the top category will always be "All" and the field brings no extra information. It touches the product.category and product.template models.

Depends on

product
Models and fields (2)
  • product.category · extends an existing modeltop_categ_id (Product Top Category)
  • product.template · extends an existing modeltop_categ_id

Text generated by AI (DeepSeek) from reading the Odoo 12.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.

Sources · Odoo 12.0

Confirmed on 2026-11-03 in branch 12.0 of OCA/product-attribute.

terminal Installation and usage

No verified information

Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.

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.