Repository
OCA/product-attribute · module folder · Try on Runboat
Module version
2.1.0
Category
Uncategorized
Folder size
0.18 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/product-attribute
Last tracking update
2026-08-07 08:42:54
Authors
ACSONE SA/NV, Odoo Community Association (OCA), ForgeFlow
Maintainers
ACSONE SA/NV, Odoo Community Association (OCA), ForgeFlow
Committers
JordiMForgeFlow, Weblate, OCA-git-bot, oca-ci, Hoang Diep
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
product_abc_classification_sale_stock
Description
This modules provides the bases to build ABC analysis (or ABC
classification) addons. These classification are used by inventory
management teams to help identify the most important products in their
portfolio and ensure they prioritize managing them above those less
valuable.

Managers will create a profile with several levels (percentages) and
then the profiled products will automatically get a corresponding level
using the ABC classification.

The addon *product_abc_classification_sale_stock* defines a computation
profile based on the number of sale order line delivered by product.

Code Analysis

Views touched (8)
XML IDNameModelTypeStatus
abc_classification_product_level_form_view abc.classification.product.level.form (in product_abc_classification) abc.classification.product.level form New
abc_classification_product_level_search_view abc.classification.product.level.search (in product_abc_classification) abc.classification.product.level search New
abc_classification_product_level_tree_view abc.classification.product.level.tree (in product_abc_classification) abc.classification.product.level list New
abc_classification_profile_form_view abc.classification.profile.form (in product_abc_classification) abc.classification.profile form New
abc_classification_profile_tree_view abc.classification.profile.tree (in product_abc_classification) abc.classification.profile list New
product_product_form_view product.product.form (ABC Classification) product.product form Inherits product.product_normal_form_view
product_template_form_view product.template.form (ABC Classification) product.template form Inherits product.product_template_form_view
view_product_category_form product.category.form - product_abc_classification product.category form Inherits product.product_category_form_view
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (6)

New fields (4)
  • name Char
    help='Classification A, B or C' required=True
  • percentage Float
    default=0.0 required=True string='% Indicator'
  • percentage_products Float
    default=0.0 required=True string='% Products'
  • profile_id Many2one → abc.classification.profile
    ondelete='cascade' args: 'abc.classification.profile'
Public methods (0)

No public methods.

New fields (10)
  • allowed_profile_ids Many2many → abc.classification.profile
    comodel_name='abc.classification.profile' related='product_id.abc_classification_profile_ids'
  • company_id Many2one → res.company
    compute='_compute_company_id' index=True readonly=True store=True args: 'res.company'
  • computed_level_id Many2one → abc.classification.level
    readonly=True string='Computed classification level' args: 'abc.classification.level'
  • flag Boolean
    compute='_compute_flag' default=False index=True store=True string='If True, this means that the manual classification is different from the computed one'
  • level_id Many2one → abc.classification.level
    compute='_compute_level_id' domain="[('profile_id', '=', profile_id)]" store=True string='Classification level' args: 'abc.classification.level'
  • manual_level_id Many2one → abc.classification.level
    domain="[('profile_id', '=', profile_id)]" string='Manual classification level' tracking=True args: 'abc.classification.level'
  • product_id Many2one → product.product
    check_company=True index=True ondelete='cascade' required=True string='Product' args: 'product.product'
  • product_tmpl_id Many2one → product.template
    index=True readonly=True string='Product template' args: 'product.template'
  • profile_id Many2one → abc.classification.profile
    check_company=True required=True string='Profile' args: 'abc.classification.profile'
  • profile_type Selection
    readonly=True related='profile_id.profile_type' store=True
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, vals)
    We apply the manual level to the product level if computed level is modified and only for profiles with auto_apply_computed_value = =True

New fields (8)
  • auto_apply_computed_value Boolean
    default=False help='Check this if you want to apply the computed level on each product that has this profile.'
  • company_id Many2one → res.company
    comodel_name='res.company' string='Company'
  • level_ids One2many → abc.classification.level
    comodel_name='abc.classification.level' inverse_name='profile_id'
  • name Char
    required=True
  • period Integer
    default=365 required=True string='Period on which to compute the classification (Days)'
  • product_count Integer
    compute='_compute_product_count' readonly=True
  • product_variant_ids Many2many → product.product
    column1='profile_id' column2='product_id' comodel_name='product.product' index=True relation='abc_classification_profile_product_rel'
  • profile_type Selection
    index=True required=True selection=[('manual', 'Manual')] string='Type of ABC classification'
Public methods (3)
  • action_view_products(self)
  • copy_data(self, default=None)
  • write(self, vals)

New fields (1)
  • abc_classification_profile_ids Many2many → abc.classification.profile
    column1='categ_id' column2='profile_id' comodel_name='abc.classification.profile' index=True relation='abc_classification_profile_product_categ_rel'
Public methods (1)
  • update_product_abc_classification_profile(self)

New fields (3)
  • abc_classification_product_level_ids One2many → abc.classification.product.level
    index=True inverse_name='product_id' args: 'abc.classification.product.level'
  • abc_classification_profile_ids Many2many → abc.classification.profile
    check_company=True column1='product_id' column2='profile_id' comodel_name='abc.classification.profile' index=True relation='abc_classification_profile_product_rel'
  • abc_classification_profile_updatable_from_category Boolean
    default=True
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, vals)

New fields (2)
  • abc_classification_product_level_ids One2many → abc.classification.product.level
    compute='_compute_abc_classification_product_level_ids' inverse='_inverse_abc_classification_product_level_ids' inverse_name='product_tmpl_id' store=True args: 'abc.classification.product.level'
  • abc_classification_profile_ids Many2many → abc.classification.profile
    check_company=True compute='_compute_abc_classification_profile_ids' inverse='_inverse_abc_classification_profile_ids' store=True args: 'abc.classification.profile'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Status
Open migration PR — not merged yet for this version
CI status
green — ready to merge
Open since
16 days ago
Last activity
7 days ago
Repository
OCA/product-attribute
Pull request
[19.0][MIG] product_abc_classification: Migration to 19.0 (#2366)
Status
Open migration PR — not merged yet for this version
CI status
green — ready to merge
Open since
220 days ago
Last activity
115 days ago
Repository
OCA/product-attribute
Pull request
[19.0][MIG] product_abc_classification: Migration to 19.0 (#2188)