Skip to content
Health
60/100
fair
  • Security25/25
    No findings
  • Activity25/25
    Last human commit 4 months ago
  • Required by5/25
    0 modules depend on it
  • Maturity5/25
    In 1 Odoo series since 19.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
0
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.09 MB
Module directory on disk
Code analysis 0 migration notes 4 models 5 views 0 HTTP endpoints

Description

Product Class

This module introduces Product Classes for standardizing product setup and attribute management. It allows you to:

  1. Define Product Classes — Group related products into classes (e.g., "Furniture", "Electronics")
  2. Constrain Attributes per Class — Specify which attributes are allowed for each class
  3. Mark Required Attributes — Designate certain attributes as mandatory for products in that class
  4. Enforce Validation — Prevent products from using attributes outside their class or missing required attributes

Key Features

  • Bridge Model (product.class.attribute.line) — Manages the relationship between classes and attributes, storing both allowed attributes and a required flag
  • Strict Validation — Products assigned to a class must:
    • Use only attributes defined in that class
    • Provide values for all required attributes
  • UI Enforcement — Attribute selection in product forms is restricted by the class domain filter
  • Management Views — Full CRUD interface for product classes (Inventory > Configuration > Product Classes, Sales > Configuration > Product Classes)

Technical Architecture

  • product.class — Main product classification model
  • product.class.attribute.line — Bridge model linking classes to attributes with a required flag
  • product.attribute (inherited) — Extended with reverse one-to-many to track which classes use it
  • product.template (inherited) — Added class validation and computed required-attribute tracking

Dependencies

Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
None

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

Views touched 5

XML IDNameModelTypeStatus
product_attribute_view_form product.attribute form Inherits product.product_attribute_view_form
product_class_form product.class form New
product_class_list product.class list New
product_class_search product.class search New
product_template_form_view product.template form Inherits product.product_template_only_form_view

HTTP endpoints 0

No HTTP endpoints found for this module.

Models touched 4

New fields (2)
  • class_attribute_line_ids One2many → product.class.attribute.line
    comodel_name='product.class.attribute.line' help='Product classes that include this attribute.' inverse_name='attribute_id' string='Class Attribute Lines'
  • classes_count Integer
    compute='_compute_classes_count' string='Product Classes Count'
Public methods (1)
  • action_open_product_classes(self)

New fields (3)
  • active Boolean
    default=True
  • attribute_line_ids One2many → product.class.attribute.line
    comodel_name='product.class.attribute.line' help='Allowed attributes for products of thisclass and whether they are required.' inverse_name='class_id' string='Attributes'
  • name Char
    translate=True
Public methods (0)

No public methods.

New fields (3)
  • attribute_id Many2one → product.attribute
    comodel_name='product.attribute' index=True ondelete='restrict' required=True
  • class_id Many2one → product.class
    comodel_name='product.class' index=True ondelete='cascade' required=True string='Product Class'
  • required Boolean
    default=False help='If enabled, products of this class must define this attribute.'
Public methods (0)

No public methods.

New fields (3)
  • class_attribute_ids Many2many → product.attribute
    comodel_name='product.attribute' compute='_compute_class_attribute_ids' help='Attributes allowed by the selected product class' string='Class Attributes'
  • class_id Many2one → product.class
    comodel_name='product.class' help='Product class that constrains which attributes can be used' string='Product Class'
  • class_required_attribute_ids Many2many → product.attribute
    comodel_name='product.attribute' compute='_compute_class_attribute_ids' help='Required attributes for the selected product class.' string='Class Required Attributes'
Public methods (0)

No public methods.