Repository
OCA/product-attribute · module folder · Try on Runboat
Module version
1.0.0
Category
Product
Folder size
0.05 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/product-attribute
Last tracking update
2026-08-17 11:19:33
Authors
Odoo Community Association (OCA), ForgeFlow
Maintainers
Odoo Community Association (OCA), ForgeFlow
Committers
OCA-git-bot, oca-ci, prayag
Odoo dependencies
odoo/odoo:
- web
- bus
- uom
Python dependencies
None
System dependencies
None
Required by
None
Description
This module adds 'restricted_product_type' to product_category model.
With this optional selection field, 'restricted_product_type' should have
the same values as in the product.template, 'type' field.

A constraint is also established in the product so that when the 'type'
defined in the product does not match with the 'restricted_product_type'
defined in the product category it raises a Validation Error.

Also, in the product category one would not be able to change the field
'restricted_product_type' if the category has been assigned at least to
one product that already has this category, but has a different 'type'
value.

Code Analysis

Views touched (2)
XML IDNameModelTypeStatus
product_category_form_view product.category.form - product_restricted_type product.category form Inherits product.product_category_form_view
product_template_form_view product.template.product.form - product_restricted_type product.template form Inherits product.product_template_form_view
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (3)

New fields (1)
  • restricted_product_type Selection
    selection=<expr> string='Restricted Product Type '
Public methods (0)

No public methods.

New fields (1)
  • allowed_categ_ids Many2many → product.category
    compute='_compute_allowed_categ_ids' string='Allowed Categories' args: 'product.category'
Public methods (0)

No public methods.

New fields (1)
  • allowed_categ_ids Many2many → product.category
    compute='_compute_allowed_categ_ids' string='Allowed Categories' args: 'product.category'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…