Repository
OCA/product-attribute · module folder · Try on Runboat
Module version
1.0.0
Category
Uncategorized
Folder size
0.12 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
Akretion, Odoo Community Association (OCA), GRAP
Maintainers
Akretion, Odoo Community Association (OCA), GRAP
Committers
Weblate, OCA-git-bot, oca-ci, natuan9
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
None
Description
This module adds a "stock state" field on the product in order to inform
the user of its general stock state at a glance.

The state value can be :

- In Stock
- In Limited Stock (if qty available is under a threshold)
- Resupplying (if qty forcasted is \> 0)
- Out of Stock (otherwise)

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
res_company_view_form_threshold res.company.threshold res.company form Inherits base.view_company_form
res_config_settings_view_form_threshold res.config.settings.threshold res.config.settings form Inherits stock.res_config_settings_view_form
view_product_category_form product.category form Inherits product.product_category_form_view
view_product_product_tree product.product tree Inherits stock.view_stock_product_tree
view_product_template_form product.template form Inherits stock.view_template_property_form
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (5)

New fields (2)
  • manual_stock_state_threshold Float
    digits='Stock Threshold'
  • stock_state_threshold Float
    compute='_compute_stock_state_threshold' digits='Stock Threshold' help="The custom value under which the stock state of the products of this category will pass from 'In Stock' to 'In Limited Stock' State. If not set, Odoo will use the threshold defined at the company level." recursive=True store=True
Public methods (0)

No public methods.

New fields (1)
  • stock_state Selection
    compute='_compute_stock_state' selection=[('in_stock', 'In Stock'), ('in_limited_stock', 'In Limited Stock'), ('resupplying', 'Resupplying'), ('out_of_stock', 'Out Of Stock')]
Public methods (0)

No public methods.

New fields (2)
  • manual_stock_state_threshold Float
    digits='Stock Threshold'
  • stock_state_threshold Float
    compute='_compute_stock_state_threshold' digits='Stock Threshold' help="Define custom value under which the stock state will pass from 'In Stock' to 'In Limited Stock' State. If not set, Odoo will use the value defined in the product category. If no value is defined in product category, it will use the value defined for the company" store=True
Public methods (0)

No public methods.

New fields (1)
  • stock_state_threshold Float
    default=10 digits='Stock Threshold'
Public methods (0)

No public methods.

New fields (1)
  • stock_state_threshold Float
    help="Define custom value under which the stock state will pass from 'In Stock' to 'In Limited Stock' State." readonly=False related='company_id.stock_state_threshold' string='Stock State Threshold'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Status
Open migration PR — not merged yet for this version
CI status
green — ready to merge
Open since
108 days ago
Last activity
99 days ago
Repository
OCA/product-attribute
Pull request
[MIG] product_stock_state : Migration to 19.0 (#2283)