Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
db7e72e
[ADD] add product_stock_state
sebastienbeau Jan 7, 2017
e54b4af
[PEP] pep8 cleanup
sebastienbeau Jan 7, 2017
50a65a1
[FIX] remove warning message, add missing readme, remove useless fiel…
sebastienbeau Jul 20, 2017
5aebe95
[IMP] simplify product_stock_state by adding it only on product_product
sebastienbeau Aug 1, 2017
f7fa91e
[MIG] Make modules uninstallable
rvalyi Oct 2, 2017
efc20ee
[MIG] Rename manifest files
rvalyi Oct 2, 2017
5b6d161
[IMP] mass update with sed for odoo import and odoo UserError
sebastienbeau Oct 2, 2017
b7f196b
[PORT+IMP][10.0] product_stock_state
legalsylvain Oct 3, 2017
523efe5
[ADD] add module for exporting the stock state of the product. This a…
sebastienbeau Aug 14, 2018
f8ca3d6
[IMP] add computed field as proposed by Laurent Mignon @ Acsone
sebastienbeau Sep 12, 2018
ad717e7
[FIX] fix pep8, pylint and flaek8
sebastienbeau Mar 21, 2019
a13b1a4
[IMP] Add pre-commit hook and reformat code thanks to black
lmignon May 6, 2019
e1e6339
[12.0] Set installable False to all modules
rousseldenis May 10, 2019
b85ac38
[IMP] product_stock_state: Allows to override the way to get the qty …
lmignon Aug 9, 2019
36d6a5f
[12.0][ADD] product_stock_state: reformat for OCA, misc. improvements…
kevinkhao Mar 6, 2020
a9ab4d9
[ADD] icon.png
OCA-git-bot Mar 27, 2020
efdfd56
Update translation files
oca-transbot Apr 27, 2020
3e968e0
[REF] product_stock_state: Black python code
simahawk Jul 2, 2020
cff0e83
[MIG] product_stock_state: Migration to 13.0
simahawk Jul 2, 2020
4653dd9
product_stock_state: improve api and tests
simahawk Jul 2, 2020
5ba24b2
Fix odoo warning about deprecated get_precision
Jul 21, 2020
5884426
[IMP] product_stock_state: black, isort, prettier
watthanun Nov 11, 2020
d9fbbf7
[MIG] product_stock_state: Migration to 14.0
watthanun Nov 11, 2020
5673930
Added translation using Weblate (Dutch)
bosd Apr 23, 2021
c1ad0d5
[MIG] product_stock_state: Migration to 15.0
HviorForgeFlow Dec 1, 2022
907bd13
[MIG] - product_stock_state
sbejaoui May 17, 2023
2838755
Added translation using Weblate (Italian)
mymage Oct 30, 2023
166447b
Added translation using Weblate (Spanish)
Ivorra78 Nov 3, 2023
ce58e58
[FIX] product_stock_state product_template_view
Kev-Roche Apr 27, 2022
ba748ff
[IMP] product_stock_state: pre-commit auto fixes
natuan9 Nov 30, 2024
0f528ad
[MIG] product_stock_state: Migration to 18.0
natuan9 Nov 30, 2024
260c5d8
[UPD] Update product_stock_state.pot
Feb 4, 2025
fef54e4
[BOT] post-merge updates
OCA-git-bot Feb 4, 2025
0719046
Update translation files
weblate Feb 4, 2025
5ef05d5
Translated using Weblate (Italian)
mymage Feb 5, 2025
09f3337
Translated using Weblate (Spanish)
Ed-Spain Apr 19, 2026
0c99e67
[MIG] product_stock_state : Migration to 19.0.
uncannycs May 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
150 changes: 150 additions & 0 deletions product_stock_state/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

===================
Product Stock State
===================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:da3df1bb7f990265eeeb1c54b1e95006b4acdcf1385ac40de70dcb9574f4fafc
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github
:target: https://github.com/OCA/product-attribute/tree/19.0/product_stock_state
:alt: OCA/product-attribute
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/product-attribute-19-0/product-attribute-19-0-product_stock_state
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=19.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

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)

**Table of contents**

.. contents::
:local:

Configuration
=============

You can configure thresholds :

- Globally, for a company, in the Sale Settings. It will be used for all
the products of the company.
- On product category form. It will be used for all the products of this
category, or of the child categories. (User should be part of the new
group 'Stock State Threshold by Category'.)
- On product template form, for a specific product. (User should be part
of the new group 'Stock State Threshold by Product'.)

Usage
=====

Open product tree view and observe the stock state

|image|

.. |image| image:: https://raw.githubusercontent.com/product_stock_state/static/description/product_product_tree.png

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/product-attribute/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/product-attribute/issues/new?body=module:%20product_stock_state%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Akretion
* GRAP

Contributors
------------

- Sebastien Beau <sebastien.beau@akretion.com>

- Sylvain LE GAL <https://www.twitter.com/legalsylvain>

- Kevin Khao <kevin.khao@akretion.com>

- Simone Orsi <simahawk@gmail.com>

- Watthanun Khorchai <watthanun_t@hotmail.com>

- `Trobz <https://trobz.com>`__:

- Tuan Nguyen <tuanna@trobz.com>

Other credits
-------------

The development of this module has been financially supported by:

- Akretion R&D
- Adaptoo
- GRAP, Groupement Régional Alimentaire de Proximité
<http://www.grap.coop>

The migration of this module from 16.0 to 18.0 was financially supported
by Camptocamp.

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-sebastienbeau| image:: https://github.com/sebastienbeau.png?size=40px
:target: https://github.com/sebastienbeau
:alt: sebastienbeau
.. |maintainer-legalsylvain| image:: https://github.com/legalsylvain.png?size=40px
:target: https://github.com/legalsylvain
:alt: legalsylvain
.. |maintainer-kevinkhao| image:: https://github.com/kevinkhao.png?size=40px
:target: https://github.com/kevinkhao
:alt: kevinkhao

Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-sebastienbeau| |maintainer-legalsylvain| |maintainer-kevinkhao|

This module is part of the `OCA/product-attribute <https://github.com/OCA/product-attribute/tree/19.0/product_stock_state>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions product_stock_state/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
35 changes: 35 additions & 0 deletions product_stock_state/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright 2017 Akretion (http://www.akretion.com).
# Copyright 2017-Today GRAP (http://www.grap.coop).
# @author Sébastien BEAU <sebastien.beau@akretion.com>
# @author Sylvain LE GAL <https://twitter.com/legalsylvain>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).


{
"name": "Product Stock State",
"summary": "Compute the state of a product's stock"
"the stock level and sale_ok field",
"version": "19.0.1.0.0",
"website": "https://github.com/OCA/product-attribute",
"author": " Akretion, GRAP, Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": ["sale_stock"],
"data": [
"security/res_groups.xml",
"views/product_template_view.xml",
"views/product_product_view.xml",
"views/product_category_view.xml",
"views/res_config_settings_view.xml",
"views/res_company_view.xml",
"data/data.xml",
],
"demo": [
"demo/res_groups.xml",
"demo/product_product.xml",
"demo/product_category.xml",
],
"qweb": [],
"maintainers": ["sebastienbeau", "legalsylvain", "kevinkhao"],
}
8 changes: 8 additions & 0 deletions product_stock_state/data/data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo noupdate="1">
<record forcecreate="True" id="decimal_stock_threshold" model="decimal.precision">
<field name="name">Stock Threshold</field>
<field name="digits">2</field>
</record>
</odoo>
6 changes: 6 additions & 0 deletions product_stock_state/demo/product_category.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="product.product_category_goods" model="product.category">
<field name="manual_stock_state_threshold">20</field>
</record>
</odoo>
16 changes: 16 additions & 0 deletions product_stock_state/demo/product_product.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="product_setting_by_company" model="product.product">
<field name="name">Product with threshold set on the company</field>
<field name="categ_id" ref="product.product_category_goods" />
<field name="company_id" ref="base.main_company" />
</record>
<record id="product_setting_by_product" model="product.product">
<field name="name">Product with threshold set on the product</field>
<field name="categ_id" ref="product.product_category_goods" />
<field name="manual_stock_state_threshold">30</field>
</record>
<record id="base.main_company" model="res.company">
<field name="stock_state_threshold">66</field>
</record>
</odoo>
12 changes: 12 additions & 0 deletions product_stock_state/demo/res_groups.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="group_stock_state_by_product" model="res.groups">
<field name="users" eval="[(4, ref('base.user_admin'))]" />
</record>
<record id="group_stock_state_by_category" model="res.groups">
<field name="users" eval="[(4, ref('base.user_admin'))]" />
</record>
<record id="product.group_product_variant" model="res.groups">
<field name="users" eval="[(4, ref('base.user_admin'))]" />
</record>
</odoo>
Loading
Loading