Skip to content

Commit 5f885c5

Browse files
sergio-teruelflorian-dacosta
authored andcommitted
[MIG] stock_available: Migration to v12.0
1 parent 8dca8ed commit 5f885c5

13 files changed

+599
-67
lines changed

stock_available/README.rst

+61-24
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,30 @@
1-
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
2-
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
3-
:alt: License: AGPL-3
4-
51
==========================
62
Stock available to promise
73
==========================
84

5+
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
6+
!! This file is generated by oca-gen-addon-readme !!
7+
!! changes will be overwritten. !!
8+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
9+
10+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
11+
:target: https://odoo-community.org/page/development-status
12+
:alt: Beta
13+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
14+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
15+
:alt: License: AGPL-3
16+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github
17+
:target: https://github.com/OCA/stock-logistics-warehouse/tree/12.0/stock_available
18+
:alt: OCA/stock-logistics-warehouse
19+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
20+
:target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_available
21+
:alt: Translate me on Weblate
22+
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
23+
:target: https://runbot.odoo-community.org/runbot/153/12.0
24+
:alt: Try me on Runbot
25+
26+
|badge1| |badge2| |badge3| |badge4| |badge5|
27+
928
This module proposes several options to compute the quantity available to
1029
promise for each product.
1130
This quantity is based on the projected stock and, depending on the
@@ -15,6 +34,11 @@ In case of immediate production capacity, it is possible to configure on which
1534
field the potential is computed, by default Quantity On Hand is used.
1635
This can be configured in `Inventory` > `Configuration` > `Settings`.
1736

37+
**Table of contents**
38+
39+
.. contents::
40+
:local:
41+
1842
Configuration
1943
=============
2044

@@ -33,44 +57,57 @@ This module adds a field named `Available for sale` on the Product form.
3357
Various additional fields may be added, depending on which information you
3458
chose to base the computation on.
3559

36-
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
37-
:alt: Try me on Runbot
38-
:target: https://runbot.odoo-community.org/runbot/153/11.0
39-
4060
Bug Tracker
4161
===========
4262

43-
Bugs are tracked on `GitHub Issues
44-
<https://github.com/OCA/stock-logistics-warehouse/issues>`_. In case of trouble, please
45-
check there if your issue has already been reported. If you spotted it first,
46-
help us smashing it by providing a detailed and welcomed feedback.
63+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-warehouse/issues>`_.
64+
In case of trouble, please check there if your issue has already been reported.
65+
If you spotted it first, help us smashing it by providing a detailed and welcomed
66+
`feedback <https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_available%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
67+
68+
Do not contact contributors directly about support or help with technical issues.
4769

4870
Credits
4971
=======
5072

51-
Images
52-
------
73+
Authors
74+
~~~~~~~
5375

54-
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
76+
* Numérigraphe
77+
* Sodexis
5578

5679
Contributors
57-
------------
80+
~~~~~~~~~~~~
81+
82+
* `Numérigraphe <https://www.numerigraphe.com>`_:
83+
84+
* Lionel Sausin <ls@numerigraphe.com>
85+
86+
* `Sodexis <https://www.Sodexis.com>`_:
5887

59-
* Lionel Sausin (Numérigraphe) <ls@numerigraphe.com>
60-
* Sodexis <sodexis@sodexis.com>
61-
* Factor Libre - Kiko Peiro <francisco.peiro@factorlibre.com>
88+
* Sodexis <sodexis@sodexis.com>
6289

63-
Maintainer
64-
----------
90+
* `Factor Libre <https://www.factorlibre.com>`_:
91+
92+
* Kiko Peiro <francisco.peiro@factorlibre.com>
93+
94+
* `Tecnativa <https://www.tecnativa.com>`_:
95+
96+
* Sergio Teruel <sergio.teruel@tecnativa.com>
97+
98+
Maintainers
99+
~~~~~~~~~~~
100+
101+
This module is maintained by the OCA.
65102

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

70-
This module is maintained by the OCA.
71-
72107
OCA, or the Odoo Community Association, is a nonprofit organization whose
73108
mission is to support the collaborative development of Odoo features and
74109
promote its widespread use.
75110

76-
To contribute to this module, please visit https://odoo-community.org.
111+
This module is part of the `OCA/stock-logistics-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/12.0/stock_available>`_ project on GitHub.
112+
113+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

stock_available/__init__.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Copyright 2014 Numérigraphe
2-
# Copyright 2016 Sodexis
31
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
42

53
from . import models

stock_available/__manifest__.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44

55
{
66
'name': 'Stock available to promise',
7-
'version': '11.0.1.1.0',
8-
"author": "Numérigraphe, Sodexis, Odoo Community Association (OCA)",
7+
'version': '12.0.1.0.0',
8+
'author': 'Numérigraphe, Sodexis, Odoo Community Association (OCA)',
9+
'website': 'https://github.com/OCA/stock-logistics-warehouse',
10+
'development_status': 'Production/Stable',
911
'category': 'Warehouse',
1012
'depends': ['stock'],
1113
'license': 'AGPL-3',

stock_available/models/product_product.py

+1-10
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,7 @@
44

55
from odoo import api, fields, models
66
from odoo.addons import decimal_precision as dp
7-
import operator as py_operator
8-
9-
OPERATORS = {
10-
'<': py_operator.lt,
11-
'>': py_operator.gt,
12-
'<=': py_operator.le,
13-
'>=': py_operator.ge,
14-
'=': py_operator.eq,
15-
'!=': py_operator.ne
16-
}
7+
from odoo.addons.stock.models.product import OPERATORS
178

189

1910
class ProductProduct(models.Model):

stock_available/models/product_template.py

+1-10
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,7 @@
44

55
from odoo import models, fields, api
66
from odoo.addons import decimal_precision as dp
7-
import operator as py_operator
8-
9-
OPERATORS = {
10-
'<': py_operator.lt,
11-
'>': py_operator.gt,
12-
'<=': py_operator.le,
13-
'>=': py_operator.ge,
14-
'=': py_operator.eq,
15-
'!=': py_operator.ne
16-
}
7+
from odoo.addons.stock.models.product import OPERATORS
178

189

1910
class ProductTemplate(models.Model):

stock_available/readme/CONFIGURE.rst

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
By default, this module computes the stock available to promise as the virtual
2+
stock.
3+
To take advantage of the additional features, you must define on which information you
4+
want to base the computation, by checking one or more boxes in the settings:
5+
`Inventory` > `Configuration` > `Settings` > `Stock available to promise`.
6+
In case of "Include the production potential", it is also possible to configure
7+
which field of product to use to compute the production potential.
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
* `Numérigraphe <https://www.numerigraphe.com>`_:
2+
3+
* Lionel Sausin <ls@numerigraphe.com>
4+
5+
* `Sodexis <https://www.Sodexis.com>`_:
6+
7+
* Sodexis <sodexis@sodexis.com>
8+
9+
* `Factor Libre <https://www.factorlibre.com>`_:
10+
11+
* Kiko Peiro <francisco.peiro@factorlibre.com>
12+
13+
* `Tecnativa <https://www.tecnativa.com>`_:
14+
15+
* Sergio Teruel <sergio.teruel@tecnativa.com>
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
This module proposes several options to compute the quantity available to
2+
promise for each product.
3+
This quantity is based on the projected stock and, depending on the
4+
configuration, it can account for various data such as sales quotations or
5+
immediate production capacity.
6+
In case of immediate production capacity, it is possible to configure on which
7+
field the potential is computed, by default Quantity On Hand is used.
8+
This can be configured in `Inventory` > `Configuration` > `Settings`.

stock_available/readme/USAGE.rst

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This module adds a field named `Available for sale` on the Product form.
2+
Various additional fields may be added, depending on which information you
3+
chose to base the computation on.

0 commit comments

Comments
 (0)