Consider the production potential is available to promise
+
+
+
+
This module takes the potential quantities available for Products into account in
+the quantity available to promise, where the “Potential quantity” is the
+quantity that can be manufactured with the components immediately at hand.
+By configuration, the “Potential quantity” can be computed based on other product field.
+For example, “Potential quantity” can be the quantity that can be manufactured
+with the components available to promise.
The manufacturing delays are not taken into account : this module assumes that
+if you have components in stock goods, you can manufacture finished goods
+quickly enough.
+
As a consequence, and to avoid overestimating, only the first level of Bill
+of Materials is considered.
+
However Sets (a.k.a “phantom” BoMs) are taken into account: if a component must
+be replaced with a set, it’s the stock of the set’s product which will decide
+the potential.
+
If a product has several variants, only the variant with the biggest potential
+will be taken into account when reporting the production potential. For
+example, even if you actually have enough components to make 10 iPads 16Go AND
+42 iPads 32Go, we’ll consider that you can promise only 42 iPads.
Previous versions of this module used to let programmers demand to get the
+potential quantity in an arbitrary Unit of Measure using the context. This
+feature was present in the standard computations too until v8.0, but it has
+been dropped from the standard from v8.0 on.
+
For the sake of consistency the potential quantity is now always reported in
+the product’s main Unit of Measure too.
Take manufacturing delays into account: we should not promise goods to
+customers if they want them delivered earlier that we can make them
+
Compute the quantity of finished product that can be made directly on each
+Bill of Material: this would be useful for production managers, and may make
+the computations faster by avoiding to compute the same BoM several times
+when several variants share the same BoM.
+
Add an option (probably as a sub-module) to consider all raw materials as
+available if they can be bought from the suppliers in time for the
+manufacturing.
Bugs are tracked on GitHub Issues.
+In case of trouble, please check there if your issue has already been reported.
+If you spotted it first, help us smashing it by providing a detailed and welcomed
+feedback.
+
Do not contact contributors directly about support or help with technical issues.
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.
+
+
From 6177bfa2171aaa99e3eada0b97dda0e42685577a Mon Sep 17 00:00:00 2001
From: oca-travis
Date: Sat, 31 Aug 2019 08:09:17 +0000
Subject: [PATCH 19/33] [UPD] Update stock_available_mrp.pot
---
.../i18n/stock_available_mrp.pot | 37 ++++++++++++-------
1 file changed, 24 insertions(+), 13 deletions(-)
diff --git a/stock_available_mrp/i18n/stock_available_mrp.pot b/stock_available_mrp/i18n/stock_available_mrp.pot
index ff8ef8502..3ea2293db 100644
--- a/stock_available_mrp/i18n/stock_available_mrp.pot
+++ b/stock_available_mrp/i18n/stock_available_mrp.pot
@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 11.0\n"
+"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
@@ -14,14 +14,14 @@ msgstr ""
"Plural-Forms: \n"
#. module: stock_available_mrp
-#: model:product.product,name:stock_available_mrp.product_product_9_white
-#: model:product.template,name:stock_available_mrp.product_product_9_white_product_template
-msgid "Apple Wireless Keyboard"
+#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product__bom_id
+msgid "BOM"
msgstr ""
#. module: stock_available_mrp
-#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product_bom_id
-msgid "Bill of Materials"
+#: model:product.product,name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.template,name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+msgid "Bolt"
msgstr ""
#. module: stock_available_mrp
@@ -29,20 +29,31 @@ msgstr ""
msgid "Product"
msgstr ""
-#. module: stock_available_mrp
-#: model:ir.model,name:stock_available_mrp.model_product_template
-msgid "Product Template"
-msgstr ""
-
#. module: stock_available_mrp
#: model:product.product,name:stock_available_mrp.product_kit_1a
#: model:product.template,name:stock_available_mrp.product_kit_1a_product_template
-msgid "Self Build Kit"
+msgid "Table Kit"
msgstr ""
#. module: stock_available_mrp
#: model:product.product,description:stock_available_mrp.product_kit_1a
#: model:product.template,description:stock_available_mrp.product_kit_1a_product_template
-msgid "Self Build kit."
+msgid "Table kit"
+msgstr ""
+
+#. module: stock_available_mrp
+#: model:product.product,uom_name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.product,uom_name:stock_available_mrp.product_kit_1a
+#: model:product.template,uom_name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+#: model:product.template,uom_name:stock_available_mrp.product_kit_1a_product_template
+msgid "Unit(s)"
+msgstr ""
+
+#. module: stock_available_mrp
+#: model:product.product,weight_uom_name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.product,weight_uom_name:stock_available_mrp.product_kit_1a
+#: model:product.template,weight_uom_name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+#: model:product.template,weight_uom_name:stock_available_mrp.product_kit_1a_product_template
+msgid "kg"
msgstr ""
From ad03c9c35c624de365ccdc600dee8efaa4356eae Mon Sep 17 00:00:00 2001
From: OCA Transbot
Date: Sat, 31 Aug 2019 09:56:38 +0000
Subject: [PATCH 20/33] Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
Translation: stock-logistics-warehouse-12.0/stock-logistics-warehouse-12.0-stock_available_mrp
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_available_mrp/
---
stock_available_mrp/i18n/de.po | 38 +++++++++++++++++++++++-----------
1 file changed, 26 insertions(+), 12 deletions(-)
diff --git a/stock_available_mrp/i18n/de.po b/stock_available_mrp/i18n/de.po
index deb92b8bd..a38fea285 100644
--- a/stock_available_mrp/i18n/de.po
+++ b/stock_available_mrp/i18n/de.po
@@ -20,14 +20,14 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: stock_available_mrp
-#: model:product.product,name:stock_available_mrp.product_product_9_white
-#: model:product.template,name:stock_available_mrp.product_product_9_white_product_template
-msgid "Apple Wireless Keyboard"
+#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product__bom_id
+msgid "BOM"
msgstr ""
#. module: stock_available_mrp
-#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product_bom_id
-msgid "Bill of Materials"
+#: model:product.product,name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.template,name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+msgid "Bolt"
msgstr ""
#. module: stock_available_mrp
@@ -35,22 +35,36 @@ msgstr ""
msgid "Product"
msgstr "Produkt"
-#. module: stock_available_mrp
-#: model:ir.model,name:stock_available_mrp.model_product_template
-msgid "Product Template"
-msgstr "Produktvorlage"
-
#. module: stock_available_mrp
#: model:product.product,name:stock_available_mrp.product_kit_1a
#: model:product.template,name:stock_available_mrp.product_kit_1a_product_template
-msgid "Self Build Kit"
+msgid "Table Kit"
msgstr ""
#. module: stock_available_mrp
#: model:product.product,description:stock_available_mrp.product_kit_1a
#: model:product.template,description:stock_available_mrp.product_kit_1a_product_template
-msgid "Self Build kit."
+msgid "Table kit"
msgstr ""
+#. module: stock_available_mrp
+#: model:product.product,uom_name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.product,uom_name:stock_available_mrp.product_kit_1a
+#: model:product.template,uom_name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+#: model:product.template,uom_name:stock_available_mrp.product_kit_1a_product_template
+msgid "Unit(s)"
+msgstr ""
+
+#. module: stock_available_mrp
+#: model:product.product,weight_uom_name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.product,weight_uom_name:stock_available_mrp.product_kit_1a
+#: model:product.template,weight_uom_name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+#: model:product.template,weight_uom_name:stock_available_mrp.product_kit_1a_product_template
+msgid "kg"
+msgstr ""
+
+#~ msgid "Product Template"
+#~ msgstr "Produktvorlage"
+
#~ msgid "Thousand"
#~ msgstr "Tausend"
From 69fc8d776b2bbcd59b704a06f17e15da070769a3 Mon Sep 17 00:00:00 2001
From: OCA Transbot
Date: Tue, 3 Sep 2019 11:30:04 +0000
Subject: [PATCH 21/33] Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
Translation: stock-logistics-warehouse-12.0/stock-logistics-warehouse-12.0-stock_available_mrp
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_available_mrp/
---
stock_available_mrp/i18n/es.po | 38 +++++++++++++++++++++----------
stock_available_mrp/i18n/fi.po | 38 +++++++++++++++++++++----------
stock_available_mrp/i18n/fr.po | 38 +++++++++++++++++++++----------
stock_available_mrp/i18n/hr_HR.po | 38 +++++++++++++++++++++----------
stock_available_mrp/i18n/it.po | 35 ++++++++++++++++++----------
stock_available_mrp/i18n/pt_BR.po | 38 +++++++++++++++++++++----------
stock_available_mrp/i18n/sl.po | 38 +++++++++++++++++++++----------
stock_available_mrp/i18n/zh_CN.po | 38 +++++++++++++++++++++----------
8 files changed, 205 insertions(+), 96 deletions(-)
diff --git a/stock_available_mrp/i18n/es.po b/stock_available_mrp/i18n/es.po
index 1eb112127..07d39842f 100644
--- a/stock_available_mrp/i18n/es.po
+++ b/stock_available_mrp/i18n/es.po
@@ -19,14 +19,14 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: stock_available_mrp
-#: model:product.product,name:stock_available_mrp.product_product_9_white
-#: model:product.template,name:stock_available_mrp.product_product_9_white_product_template
-msgid "Apple Wireless Keyboard"
+#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product__bom_id
+msgid "BOM"
msgstr ""
#. module: stock_available_mrp
-#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product_bom_id
-msgid "Bill of Materials"
+#: model:product.product,name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.template,name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+msgid "Bolt"
msgstr ""
#. module: stock_available_mrp
@@ -34,19 +34,33 @@ msgstr ""
msgid "Product"
msgstr "Producto"
-#. module: stock_available_mrp
-#: model:ir.model,name:stock_available_mrp.model_product_template
-msgid "Product Template"
-msgstr "Plantilla de producto"
-
#. module: stock_available_mrp
#: model:product.product,name:stock_available_mrp.product_kit_1a
#: model:product.template,name:stock_available_mrp.product_kit_1a_product_template
-msgid "Self Build Kit"
+msgid "Table Kit"
msgstr ""
#. module: stock_available_mrp
#: model:product.product,description:stock_available_mrp.product_kit_1a
#: model:product.template,description:stock_available_mrp.product_kit_1a_product_template
-msgid "Self Build kit."
+msgid "Table kit"
msgstr ""
+
+#. module: stock_available_mrp
+#: model:product.product,uom_name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.product,uom_name:stock_available_mrp.product_kit_1a
+#: model:product.template,uom_name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+#: model:product.template,uom_name:stock_available_mrp.product_kit_1a_product_template
+msgid "Unit(s)"
+msgstr ""
+
+#. module: stock_available_mrp
+#: model:product.product,weight_uom_name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.product,weight_uom_name:stock_available_mrp.product_kit_1a
+#: model:product.template,weight_uom_name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+#: model:product.template,weight_uom_name:stock_available_mrp.product_kit_1a_product_template
+msgid "kg"
+msgstr ""
+
+#~ msgid "Product Template"
+#~ msgstr "Plantilla de producto"
diff --git a/stock_available_mrp/i18n/fi.po b/stock_available_mrp/i18n/fi.po
index 8c6389aee..7c821407d 100644
--- a/stock_available_mrp/i18n/fi.po
+++ b/stock_available_mrp/i18n/fi.po
@@ -19,14 +19,14 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: stock_available_mrp
-#: model:product.product,name:stock_available_mrp.product_product_9_white
-#: model:product.template,name:stock_available_mrp.product_product_9_white_product_template
-msgid "Apple Wireless Keyboard"
+#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product__bom_id
+msgid "BOM"
msgstr ""
#. module: stock_available_mrp
-#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product_bom_id
-msgid "Bill of Materials"
+#: model:product.product,name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.template,name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+msgid "Bolt"
msgstr ""
#. module: stock_available_mrp
@@ -34,19 +34,33 @@ msgstr ""
msgid "Product"
msgstr "Tuote"
-#. module: stock_available_mrp
-#: model:ir.model,name:stock_available_mrp.model_product_template
-msgid "Product Template"
-msgstr "Tuotteen malli"
-
#. module: stock_available_mrp
#: model:product.product,name:stock_available_mrp.product_kit_1a
#: model:product.template,name:stock_available_mrp.product_kit_1a_product_template
-msgid "Self Build Kit"
+msgid "Table Kit"
msgstr ""
#. module: stock_available_mrp
#: model:product.product,description:stock_available_mrp.product_kit_1a
#: model:product.template,description:stock_available_mrp.product_kit_1a_product_template
-msgid "Self Build kit."
+msgid "Table kit"
msgstr ""
+
+#. module: stock_available_mrp
+#: model:product.product,uom_name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.product,uom_name:stock_available_mrp.product_kit_1a
+#: model:product.template,uom_name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+#: model:product.template,uom_name:stock_available_mrp.product_kit_1a_product_template
+msgid "Unit(s)"
+msgstr ""
+
+#. module: stock_available_mrp
+#: model:product.product,weight_uom_name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.product,weight_uom_name:stock_available_mrp.product_kit_1a
+#: model:product.template,weight_uom_name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+#: model:product.template,weight_uom_name:stock_available_mrp.product_kit_1a_product_template
+msgid "kg"
+msgstr ""
+
+#~ msgid "Product Template"
+#~ msgstr "Tuotteen malli"
diff --git a/stock_available_mrp/i18n/fr.po b/stock_available_mrp/i18n/fr.po
index b61ff2a0a..fdfffdc24 100644
--- a/stock_available_mrp/i18n/fr.po
+++ b/stock_available_mrp/i18n/fr.po
@@ -19,14 +19,14 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: stock_available_mrp
-#: model:product.product,name:stock_available_mrp.product_product_9_white
-#: model:product.template,name:stock_available_mrp.product_product_9_white_product_template
-msgid "Apple Wireless Keyboard"
+#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product__bom_id
+msgid "BOM"
msgstr ""
#. module: stock_available_mrp
-#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product_bom_id
-msgid "Bill of Materials"
+#: model:product.product,name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.template,name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+msgid "Bolt"
msgstr ""
#. module: stock_available_mrp
@@ -34,19 +34,33 @@ msgstr ""
msgid "Product"
msgstr "Article"
-#. module: stock_available_mrp
-#: model:ir.model,name:stock_available_mrp.model_product_template
-msgid "Product Template"
-msgstr "Modèle de produit"
-
#. module: stock_available_mrp
#: model:product.product,name:stock_available_mrp.product_kit_1a
#: model:product.template,name:stock_available_mrp.product_kit_1a_product_template
-msgid "Self Build Kit"
+msgid "Table Kit"
msgstr ""
#. module: stock_available_mrp
#: model:product.product,description:stock_available_mrp.product_kit_1a
#: model:product.template,description:stock_available_mrp.product_kit_1a_product_template
-msgid "Self Build kit."
+msgid "Table kit"
msgstr ""
+
+#. module: stock_available_mrp
+#: model:product.product,uom_name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.product,uom_name:stock_available_mrp.product_kit_1a
+#: model:product.template,uom_name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+#: model:product.template,uom_name:stock_available_mrp.product_kit_1a_product_template
+msgid "Unit(s)"
+msgstr ""
+
+#. module: stock_available_mrp
+#: model:product.product,weight_uom_name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.product,weight_uom_name:stock_available_mrp.product_kit_1a
+#: model:product.template,weight_uom_name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+#: model:product.template,weight_uom_name:stock_available_mrp.product_kit_1a_product_template
+msgid "kg"
+msgstr ""
+
+#~ msgid "Product Template"
+#~ msgstr "Modèle de produit"
diff --git a/stock_available_mrp/i18n/hr_HR.po b/stock_available_mrp/i18n/hr_HR.po
index 15a0b4f1f..c81966fc3 100644
--- a/stock_available_mrp/i18n/hr_HR.po
+++ b/stock_available_mrp/i18n/hr_HR.po
@@ -21,14 +21,14 @@ msgstr ""
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
#. module: stock_available_mrp
-#: model:product.product,name:stock_available_mrp.product_product_9_white
-#: model:product.template,name:stock_available_mrp.product_product_9_white_product_template
-msgid "Apple Wireless Keyboard"
+#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product__bom_id
+msgid "BOM"
msgstr ""
#. module: stock_available_mrp
-#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product_bom_id
-msgid "Bill of Materials"
+#: model:product.product,name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.template,name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+msgid "Bolt"
msgstr ""
#. module: stock_available_mrp
@@ -36,23 +36,37 @@ msgstr ""
msgid "Product"
msgstr "Proizvod"
-#. module: stock_available_mrp
-#: model:ir.model,name:stock_available_mrp.model_product_template
-msgid "Product Template"
-msgstr "Predložak proizvoda"
-
#. module: stock_available_mrp
#: model:product.product,name:stock_available_mrp.product_kit_1a
#: model:product.template,name:stock_available_mrp.product_kit_1a_product_template
-msgid "Self Build Kit"
+msgid "Table Kit"
msgstr ""
#. module: stock_available_mrp
#: model:product.product,description:stock_available_mrp.product_kit_1a
#: model:product.template,description:stock_available_mrp.product_kit_1a_product_template
-msgid "Self Build kit."
+msgid "Table kit"
msgstr ""
+#. module: stock_available_mrp
+#: model:product.product,uom_name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.product,uom_name:stock_available_mrp.product_kit_1a
+#: model:product.template,uom_name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+#: model:product.template,uom_name:stock_available_mrp.product_kit_1a_product_template
+msgid "Unit(s)"
+msgstr ""
+
+#. module: stock_available_mrp
+#: model:product.product,weight_uom_name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.product,weight_uom_name:stock_available_mrp.product_kit_1a
+#: model:product.template,weight_uom_name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+#: model:product.template,weight_uom_name:stock_available_mrp.product_kit_1a_product_template
+msgid "kg"
+msgstr ""
+
+#~ msgid "Product Template"
+#~ msgstr "Predložak proizvoda"
+
#~ msgid "Potential"
#~ msgstr "Potencijal"
diff --git a/stock_available_mrp/i18n/it.po b/stock_available_mrp/i18n/it.po
index 24cf94c0d..ecf95c695 100644
--- a/stock_available_mrp/i18n/it.po
+++ b/stock_available_mrp/i18n/it.po
@@ -19,14 +19,14 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: stock_available_mrp
-#: model:product.product,name:stock_available_mrp.product_product_9_white
-#: model:product.template,name:stock_available_mrp.product_product_9_white_product_template
-msgid "Apple Wireless Keyboard"
+#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product__bom_id
+msgid "BOM"
msgstr ""
#. module: stock_available_mrp
-#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product_bom_id
-msgid "Bill of Materials"
+#: model:product.product,name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.template,name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+msgid "Bolt"
msgstr ""
#. module: stock_available_mrp
@@ -34,19 +34,30 @@ msgstr ""
msgid "Product"
msgstr "Prodotto"
-#. module: stock_available_mrp
-#: model:ir.model,name:stock_available_mrp.model_product_template
-msgid "Product Template"
-msgstr ""
-
#. module: stock_available_mrp
#: model:product.product,name:stock_available_mrp.product_kit_1a
#: model:product.template,name:stock_available_mrp.product_kit_1a_product_template
-msgid "Self Build Kit"
+msgid "Table Kit"
msgstr ""
#. module: stock_available_mrp
#: model:product.product,description:stock_available_mrp.product_kit_1a
#: model:product.template,description:stock_available_mrp.product_kit_1a_product_template
-msgid "Self Build kit."
+msgid "Table kit"
+msgstr ""
+
+#. module: stock_available_mrp
+#: model:product.product,uom_name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.product,uom_name:stock_available_mrp.product_kit_1a
+#: model:product.template,uom_name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+#: model:product.template,uom_name:stock_available_mrp.product_kit_1a_product_template
+msgid "Unit(s)"
+msgstr ""
+
+#. module: stock_available_mrp
+#: model:product.product,weight_uom_name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.product,weight_uom_name:stock_available_mrp.product_kit_1a
+#: model:product.template,weight_uom_name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+#: model:product.template,weight_uom_name:stock_available_mrp.product_kit_1a_product_template
+msgid "kg"
msgstr ""
diff --git a/stock_available_mrp/i18n/pt_BR.po b/stock_available_mrp/i18n/pt_BR.po
index d8c9dbdf6..c7257894b 100644
--- a/stock_available_mrp/i18n/pt_BR.po
+++ b/stock_available_mrp/i18n/pt_BR.po
@@ -20,14 +20,14 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: stock_available_mrp
-#: model:product.product,name:stock_available_mrp.product_product_9_white
-#: model:product.template,name:stock_available_mrp.product_product_9_white_product_template
-msgid "Apple Wireless Keyboard"
+#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product__bom_id
+msgid "BOM"
msgstr ""
#. module: stock_available_mrp
-#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product_bom_id
-msgid "Bill of Materials"
+#: model:product.product,name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.template,name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+msgid "Bolt"
msgstr ""
#. module: stock_available_mrp
@@ -35,23 +35,37 @@ msgstr ""
msgid "Product"
msgstr "Produto"
-#. module: stock_available_mrp
-#: model:ir.model,name:stock_available_mrp.model_product_template
-msgid "Product Template"
-msgstr "Modelo Produto"
-
#. module: stock_available_mrp
#: model:product.product,name:stock_available_mrp.product_kit_1a
#: model:product.template,name:stock_available_mrp.product_kit_1a_product_template
-msgid "Self Build Kit"
+msgid "Table Kit"
msgstr ""
#. module: stock_available_mrp
#: model:product.product,description:stock_available_mrp.product_kit_1a
#: model:product.template,description:stock_available_mrp.product_kit_1a_product_template
-msgid "Self Build kit."
+msgid "Table kit"
msgstr ""
+#. module: stock_available_mrp
+#: model:product.product,uom_name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.product,uom_name:stock_available_mrp.product_kit_1a
+#: model:product.template,uom_name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+#: model:product.template,uom_name:stock_available_mrp.product_kit_1a_product_template
+msgid "Unit(s)"
+msgstr ""
+
+#. module: stock_available_mrp
+#: model:product.product,weight_uom_name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.product,weight_uom_name:stock_available_mrp.product_kit_1a
+#: model:product.template,weight_uom_name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+#: model:product.template,weight_uom_name:stock_available_mrp.product_kit_1a_product_template
+msgid "kg"
+msgstr ""
+
+#~ msgid "Product Template"
+#~ msgstr "Modelo Produto"
+
#~ msgid "Potential"
#~ msgstr "Potencial"
diff --git a/stock_available_mrp/i18n/sl.po b/stock_available_mrp/i18n/sl.po
index 096be0bde..9f62571ce 100644
--- a/stock_available_mrp/i18n/sl.po
+++ b/stock_available_mrp/i18n/sl.po
@@ -21,14 +21,14 @@ msgstr ""
"%100==4 ? 2 : 3);\n"
#. module: stock_available_mrp
-#: model:product.product,name:stock_available_mrp.product_product_9_white
-#: model:product.template,name:stock_available_mrp.product_product_9_white_product_template
-msgid "Apple Wireless Keyboard"
+#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product__bom_id
+msgid "BOM"
msgstr ""
#. module: stock_available_mrp
-#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product_bom_id
-msgid "Bill of Materials"
+#: model:product.product,name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.template,name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+msgid "Bolt"
msgstr ""
#. module: stock_available_mrp
@@ -36,22 +36,36 @@ msgstr ""
msgid "Product"
msgstr "Proizvod"
-#. module: stock_available_mrp
-#: model:ir.model,name:stock_available_mrp.model_product_template
-msgid "Product Template"
-msgstr "Predloga proizvoda"
-
#. module: stock_available_mrp
#: model:product.product,name:stock_available_mrp.product_kit_1a
#: model:product.template,name:stock_available_mrp.product_kit_1a_product_template
-msgid "Self Build Kit"
+msgid "Table Kit"
msgstr ""
#. module: stock_available_mrp
#: model:product.product,description:stock_available_mrp.product_kit_1a
#: model:product.template,description:stock_available_mrp.product_kit_1a_product_template
-msgid "Self Build kit."
+msgid "Table kit"
msgstr ""
+#. module: stock_available_mrp
+#: model:product.product,uom_name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.product,uom_name:stock_available_mrp.product_kit_1a
+#: model:product.template,uom_name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+#: model:product.template,uom_name:stock_available_mrp.product_kit_1a_product_template
+msgid "Unit(s)"
+msgstr ""
+
+#. module: stock_available_mrp
+#: model:product.product,weight_uom_name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.product,weight_uom_name:stock_available_mrp.product_kit_1a
+#: model:product.template,weight_uom_name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+#: model:product.template,weight_uom_name:stock_available_mrp.product_kit_1a_product_template
+msgid "kg"
+msgstr ""
+
+#~ msgid "Product Template"
+#~ msgstr "Predloga proizvoda"
+
#~ msgid "Thousand"
#~ msgstr "Tisoč"
diff --git a/stock_available_mrp/i18n/zh_CN.po b/stock_available_mrp/i18n/zh_CN.po
index 044142b9d..7d9fc6345 100644
--- a/stock_available_mrp/i18n/zh_CN.po
+++ b/stock_available_mrp/i18n/zh_CN.po
@@ -20,14 +20,14 @@ msgstr ""
"Plural-Forms: nplurals=1; plural=0;\n"
#. module: stock_available_mrp
-#: model:product.product,name:stock_available_mrp.product_product_9_white
-#: model:product.template,name:stock_available_mrp.product_product_9_white_product_template
-msgid "Apple Wireless Keyboard"
+#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product__bom_id
+msgid "BOM"
msgstr ""
#. module: stock_available_mrp
-#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product_bom_id
-msgid "Bill of Materials"
+#: model:product.product,name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.template,name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+msgid "Bolt"
msgstr ""
#. module: stock_available_mrp
@@ -35,23 +35,37 @@ msgstr ""
msgid "Product"
msgstr "产品"
-#. module: stock_available_mrp
-#: model:ir.model,name:stock_available_mrp.model_product_template
-msgid "Product Template"
-msgstr "产品模板"
-
#. module: stock_available_mrp
#: model:product.product,name:stock_available_mrp.product_kit_1a
#: model:product.template,name:stock_available_mrp.product_kit_1a_product_template
-msgid "Self Build Kit"
+msgid "Table Kit"
msgstr ""
#. module: stock_available_mrp
#: model:product.product,description:stock_available_mrp.product_kit_1a
#: model:product.template,description:stock_available_mrp.product_kit_1a_product_template
-msgid "Self Build kit."
+msgid "Table kit"
msgstr ""
+#. module: stock_available_mrp
+#: model:product.product,uom_name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.product,uom_name:stock_available_mrp.product_kit_1a
+#: model:product.template,uom_name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+#: model:product.template,uom_name:stock_available_mrp.product_kit_1a_product_template
+msgid "Unit(s)"
+msgstr ""
+
+#. module: stock_available_mrp
+#: model:product.product,weight_uom_name:stock_available_mrp.product_computer_desk_bolt_white
+#: model:product.product,weight_uom_name:stock_available_mrp.product_kit_1a
+#: model:product.template,weight_uom_name:stock_available_mrp.product_computer_desk_bolt_white_product_template
+#: model:product.template,weight_uom_name:stock_available_mrp.product_kit_1a_product_template
+msgid "kg"
+msgstr ""
+
+#~ msgid "Product Template"
+#~ msgstr "产品模板"
+
#~ msgid "Potential"
#~ msgstr "潜在"
From cef6a5563984d6b00a7ac79689ce39256b482fb0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=8E=E4=BC=9F=E6=9D=B0?= <674416404@qq.com>
Date: Thu, 26 Sep 2019 15:02:47 +0000
Subject: [PATCH 22/33] Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (7 of 7 strings)
Translation: stock-logistics-warehouse-12.0/stock-logistics-warehouse-12.0-stock_available_mrp
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_available_mrp/zh_CN/
---
stock_available_mrp/i18n/zh_CN.po | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/stock_available_mrp/i18n/zh_CN.po b/stock_available_mrp/i18n/zh_CN.po
index 7d9fc6345..07f53d170 100644
--- a/stock_available_mrp/i18n/zh_CN.po
+++ b/stock_available_mrp/i18n/zh_CN.po
@@ -9,26 +9,27 @@ msgstr ""
"Project-Id-Version: stock-logistics-warehouse (9.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-08-28 10:00+0000\n"
-"PO-Revision-Date: 2016-09-04 06:06+0000\n"
-"Last-Translator: Jeffery Chenn \n"
-"Language-Team: Chinese (China) (http://www.transifex.com/oca/OCA-stock-"
-"logistics-warehouse-9-0/language/zh_CN/)\n"
+"PO-Revision-Date: 2019-09-26 15:05+0000\n"
+"Last-Translator: 黎伟杰 <674416404@qq.com>\n"
+"Language-Team: Chinese (China) (http://www.transifex.com/oca/"
+"OCA-stock-logistics-warehouse-9-0/language/zh_CN/)\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Weblate 3.8\n"
#. module: stock_available_mrp
#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product__bom_id
msgid "BOM"
-msgstr ""
+msgstr "BOM"
#. module: stock_available_mrp
#: model:product.product,name:stock_available_mrp.product_computer_desk_bolt_white
#: model:product.template,name:stock_available_mrp.product_computer_desk_bolt_white_product_template
msgid "Bolt"
-msgstr ""
+msgstr "螺栓"
#. module: stock_available_mrp
#: model:ir.model,name:stock_available_mrp.model_product_product
@@ -39,13 +40,13 @@ msgstr "产品"
#: model:product.product,name:stock_available_mrp.product_kit_1a
#: model:product.template,name:stock_available_mrp.product_kit_1a_product_template
msgid "Table Kit"
-msgstr ""
+msgstr "桌台套件"
#. module: stock_available_mrp
#: model:product.product,description:stock_available_mrp.product_kit_1a
#: model:product.template,description:stock_available_mrp.product_kit_1a_product_template
msgid "Table kit"
-msgstr ""
+msgstr "桌台套件"
#. module: stock_available_mrp
#: model:product.product,uom_name:stock_available_mrp.product_computer_desk_bolt_white
@@ -53,7 +54,7 @@ msgstr ""
#: model:product.template,uom_name:stock_available_mrp.product_computer_desk_bolt_white_product_template
#: model:product.template,uom_name:stock_available_mrp.product_kit_1a_product_template
msgid "Unit(s)"
-msgstr ""
+msgstr "件"
#. module: stock_available_mrp
#: model:product.product,weight_uom_name:stock_available_mrp.product_computer_desk_bolt_white
@@ -61,7 +62,7 @@ msgstr ""
#: model:product.template,weight_uom_name:stock_available_mrp.product_computer_desk_bolt_white_product_template
#: model:product.template,weight_uom_name:stock_available_mrp.product_kit_1a_product_template
msgid "kg"
-msgstr ""
+msgstr "公斤"
#~ msgid "Product Template"
#~ msgstr "产品模板"
From 79507208b8577c5aaa1b49b0068a2363f742460a Mon Sep 17 00:00:00 2001
From: Yann Papouin
Date: Thu, 12 Nov 2020 12:42:54 +0000
Subject: [PATCH 23/33] Translated using Weblate (French)
Currently translated at 100.0% (7 of 7 strings)
Translation: stock-logistics-warehouse-12.0/stock-logistics-warehouse-12.0-stock_available_mrp
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_available_mrp/fr/
---
stock_available_mrp/i18n/fr.po | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/stock_available_mrp/i18n/fr.po b/stock_available_mrp/i18n/fr.po
index fdfffdc24..faf91b5ca 100644
--- a/stock_available_mrp/i18n/fr.po
+++ b/stock_available_mrp/i18n/fr.po
@@ -8,26 +8,27 @@ msgstr ""
"Project-Id-Version: stock-logistics-warehouse (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-01-14 01:38+0000\n"
-"PO-Revision-Date: 2016-01-13 16:35+0000\n"
-"Last-Translator: <>\n"
-"Language-Team: French (http://www.transifex.com/oca/OCA-stock-logistics-"
-"warehouse-8-0/language/fr/)\n"
+"PO-Revision-Date: 2020-11-12 12:44+0000\n"
+"Last-Translator: Yann Papouin \n"
+"Language-Team: French (http://www.transifex.com/oca/"
+"OCA-stock-logistics-warehouse-8-0/language/fr/)\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+"Plural-Forms: nplurals=2; plural=n > 1;\n"
+"X-Generator: Weblate 3.10\n"
#. module: stock_available_mrp
#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product__bom_id
msgid "BOM"
-msgstr ""
+msgstr "Nomenclature"
#. module: stock_available_mrp
#: model:product.product,name:stock_available_mrp.product_computer_desk_bolt_white
#: model:product.template,name:stock_available_mrp.product_computer_desk_bolt_white_product_template
msgid "Bolt"
-msgstr ""
+msgstr "Boulon"
#. module: stock_available_mrp
#: model:ir.model,name:stock_available_mrp.model_product_product
@@ -38,13 +39,13 @@ msgstr "Article"
#: model:product.product,name:stock_available_mrp.product_kit_1a
#: model:product.template,name:stock_available_mrp.product_kit_1a_product_template
msgid "Table Kit"
-msgstr ""
+msgstr "Table en kit"
#. module: stock_available_mrp
#: model:product.product,description:stock_available_mrp.product_kit_1a
#: model:product.template,description:stock_available_mrp.product_kit_1a_product_template
msgid "Table kit"
-msgstr ""
+msgstr "Table en kit"
#. module: stock_available_mrp
#: model:product.product,uom_name:stock_available_mrp.product_computer_desk_bolt_white
@@ -52,7 +53,7 @@ msgstr ""
#: model:product.template,uom_name:stock_available_mrp.product_computer_desk_bolt_white_product_template
#: model:product.template,uom_name:stock_available_mrp.product_kit_1a_product_template
msgid "Unit(s)"
-msgstr ""
+msgstr "Unité(s)"
#. module: stock_available_mrp
#: model:product.product,weight_uom_name:stock_available_mrp.product_computer_desk_bolt_white
@@ -60,7 +61,7 @@ msgstr ""
#: model:product.template,weight_uom_name:stock_available_mrp.product_computer_desk_bolt_white_product_template
#: model:product.template,weight_uom_name:stock_available_mrp.product_kit_1a_product_template
msgid "kg"
-msgstr ""
+msgstr "kg"
#~ msgid "Product Template"
#~ msgstr "Modèle de produit"
From 41df9fbd691991cbacc33ab4afd4afde61aaa2e9 Mon Sep 17 00:00:00 2001
From: david
Date: Thu, 25 Feb 2021 17:49:01 +0100
Subject: [PATCH 24/33] [FIX] stock_available_mrp: upstream compatibility
After this change https://github.com/odoo/odoo/commit/3d34d58388ab362bf8e69cc2e75adbdfda3331b2
it isn't possible to have an storable kit product anymore. The main
issue is that we have to drop some uses cases that this module
considered for this kind of situations.
---
.../tests/test_potential_qty.py | 76 +------------------
1 file changed, 3 insertions(+), 73 deletions(-)
diff --git a/stock_available_mrp/tests/test_potential_qty.py b/stock_available_mrp/tests/test_potential_qty.py
index 363ed7a44..3eaefe30b 100644
--- a/stock_available_mrp/tests/test_potential_qty.py
+++ b/stock_available_mrp/tests/test_potential_qty.py
@@ -24,19 +24,16 @@ class TestPotentialQty(TransactionCase):
# We need to compute parent_left and parent_right of the locations as
# they are used to compute qty_available of the product.
self.location._parent_store_compute()
- self.setup_demo_data()
-
- def setup_demo_data(self):
# An interesting product (multi-line BoM, variants)
self.tmpl = self.browse_ref(
'mrp.product_product_table_kit_product_template')
# First variant
self.var1 = self.browse_ref('mrp.product_product_table_kit')
- self.var1.type = 'product'
+ self.var1.type = 'consu'
# Second variant
self.var2 = self.browse_ref(
'stock_available_mrp.product_kit_1a')
- self.var2.type = 'product'
+ self.var2.type = 'consu'
# Make bolt a stockable product to be able to change its stock
# we need to unreserve the existing move before being able to do it.
bolt = self.env.ref('mrp.product_product_computer_desk_bolt')
@@ -297,7 +294,7 @@ class TestPotentialQty(TransactionCase):
p2 = self.product_model.create({
'name': 'Test sub product with BOM',
- 'type': 'product',
+ 'type': 'consu',
'uom_id': self.env.ref('uom.product_uom_unit').id,
})
@@ -369,73 +366,6 @@ class TestPotentialQty(TransactionCase):
p1.refresh()
self.assertEqual(2.0, p1.potential_qty)
- def test_component_stock_choice(self):
- # Test to change component stock for compute BOM stock
-
- # Get a demo product with outgoing move (qty: 3)
- prod = self.browse_ref('product.product_product_16')
-
- # Set on hand qty
- self.create_inventory(prod.id, 3)
-
- # Create a product with BOM
- p1 = self.product_model.create({
- 'name': 'Test product with BOM',
- })
- bom_p1 = self.bom_model.create({
- 'product_tmpl_id': p1.product_tmpl_id.id,
- 'product_id': p1.id,
- 'product_qty': 1,
- })
-
- # Need 1 prod for that
- self.bom_line_model.create({
- 'bom_id': bom_p1.id,
- 'product_id': prod.id,
- 'product_qty': 1,
- })
-
- # Default component is qty_available
- p1.refresh()
- self.assertEqual(3.0, p1.potential_qty)
-
- # Change to immediately usable
- self.config.set_param('stock_available_mrp_based_on',
- 'immediately_usable_qty')
-
- p1.refresh()
- self.assertEqual(0.0, p1.potential_qty)
-
- # If iMac has a Bom and can be manufactured
- component = self.product_model.create({
- 'name': 'component',
- 'type': 'product'
- })
- self.create_inventory(component.id, 5)
-
- imac_bom = self.bom_model.create({
- 'product_tmpl_id': prod.product_tmpl_id.id,
- 'product_id': prod.id,
- 'product_qty': 1,
- 'type': 'phantom',
- })
-
- # Need 1 component for prod
- self.bom_line_model.create({
- 'bom_id': imac_bom.id,
- 'product_id': component.id,
- 'product_qty': 1,
- })
-
- p1.refresh()
- self.assertEqual(5.0, p1.potential_qty)
-
- # Changing to virtual (same as immediately in current config)
- self.config.set_param('stock_available_mrp_based_on',
- 'virtual_available')
- p1.refresh()
- self.assertEqual(5.0, p1.potential_qty)
-
def test_potential_qty_list(self):
# Try to highlight a bug when _get_potential_qty is called on
# a recordset with multiple products
From 82286c4e071a94da7438afc47d3bf441a9ef4c9f Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Fri, 26 Feb 2021 00:19:39 +0000
Subject: [PATCH 25/33] stock_available_mrp 12.0.1.0.1
---
stock_available_mrp/__manifest__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/stock_available_mrp/__manifest__.py b/stock_available_mrp/__manifest__.py
index 2e3fe43f2..8261c5d2e 100644
--- a/stock_available_mrp/__manifest__.py
+++ b/stock_available_mrp/__manifest__.py
@@ -2,7 +2,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
'name': 'Consider the production potential is available to promise',
- 'version': '12.0.1.0.0',
+ 'version': '12.0.1.0.1',
"author": "Numérigraphe,"
"Odoo Community Association (OCA)",
'website': 'https://github.com/OCA/stock-logistics-warehouse',
From fe57b1f1eebc18b33a4b42fd84eded2ded48b175 Mon Sep 17 00:00:00 2001
From: david
Date: Fri, 16 Apr 2021 12:10:05 +0200
Subject: [PATCH 26/33] [FIX] stock_available_mrp: don't force type
In Odoo change odoo/odoo@3d34d58 the products with Kit BoMs couldn't
longer be other than `consu`. This was reverted in odoo/odoo@6c4623a
and some products are raising errors when forcing the type
---
stock_available_mrp/tests/test_potential_qty.py | 2 --
1 file changed, 2 deletions(-)
diff --git a/stock_available_mrp/tests/test_potential_qty.py b/stock_available_mrp/tests/test_potential_qty.py
index 3eaefe30b..a2ede76c3 100644
--- a/stock_available_mrp/tests/test_potential_qty.py
+++ b/stock_available_mrp/tests/test_potential_qty.py
@@ -29,11 +29,9 @@ class TestPotentialQty(TransactionCase):
'mrp.product_product_table_kit_product_template')
# First variant
self.var1 = self.browse_ref('mrp.product_product_table_kit')
- self.var1.type = 'consu'
# Second variant
self.var2 = self.browse_ref(
'stock_available_mrp.product_kit_1a')
- self.var2.type = 'consu'
# Make bolt a stockable product to be able to change its stock
# we need to unreserve the existing move before being able to do it.
bolt = self.env.ref('mrp.product_product_computer_desk_bolt')
From d2fbb13d872fbcc7f605a08c34adb75f03b2aba8 Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Fri, 16 Apr 2021 11:58:06 +0000
Subject: [PATCH 27/33] stock_available_mrp 12.0.1.0.2
---
stock_available_mrp/__manifest__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/stock_available_mrp/__manifest__.py b/stock_available_mrp/__manifest__.py
index 8261c5d2e..27725f4ad 100644
--- a/stock_available_mrp/__manifest__.py
+++ b/stock_available_mrp/__manifest__.py
@@ -2,7 +2,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
'name': 'Consider the production potential is available to promise',
- 'version': '12.0.1.0.1',
+ 'version': '12.0.1.0.2',
"author": "Numérigraphe,"
"Odoo Community Association (OCA)",
'website': 'https://github.com/OCA/stock-logistics-warehouse',
From 67767fb5b685f25fafa9ac8a6f25bd02d88e3b61 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?=
Date: Thu, 13 May 2021 16:17:07 +0200
Subject: [PATCH 28/33] [IMP] stock_available_mrp: black, isort, prettier
---
stock_available_mrp/__manifest__.py | 24 +-
stock_available_mrp/demo/mrp_data.xml | 81 +--
stock_available_mrp/models/product_product.py | 79 ++-
.../tests/test_potential_qty.py | 491 ++++++++++--------
4 files changed, 363 insertions(+), 312 deletions(-)
diff --git a/stock_available_mrp/__manifest__.py b/stock_available_mrp/__manifest__.py
index 27725f4ad..eafbba1d1 100644
--- a/stock_available_mrp/__manifest__.py
+++ b/stock_available_mrp/__manifest__.py
@@ -1,19 +1,13 @@
# Copyright 2014 Numérigraphe SARL, Camptocamp
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
- 'name': 'Consider the production potential is available to promise',
- 'version': '12.0.1.0.2',
- "author": "Numérigraphe,"
- "Odoo Community Association (OCA)",
- 'website': 'https://github.com/OCA/stock-logistics-warehouse',
- 'category': 'Hidden',
- 'depends': [
- 'stock_available',
- 'mrp'
- ],
- 'demo': [
- 'demo/mrp_data.xml',
- ],
- 'license': 'AGPL-3',
- 'installable': True,
+ "name": "Consider the production potential is available to promise",
+ "version": "12.0.1.0.2",
+ "author": "Numérigraphe," "Odoo Community Association (OCA)",
+ "website": "https://github.com/OCA/stock-logistics-warehouse",
+ "category": "Hidden",
+ "depends": ["stock_available", "mrp"],
+ "demo": ["demo/mrp_data.xml",],
+ "license": "AGPL-3",
+ "installable": True,
}
diff --git a/stock_available_mrp/demo/mrp_data.xml b/stock_available_mrp/demo/mrp_data.xml
index 1dc82fee9..ae3e3c4fc 100644
--- a/stock_available_mrp/demo/mrp_data.xml
+++ b/stock_available_mrp/demo/mrp_data.xml
@@ -1,38 +1,47 @@
-
+
-
- PCSC234-WHITE
-
-
-
-
-
-
-
-
-
-
-
-
-
- Bolt
-
- 1.0
- 5.0
- product
-
-
- BOLT-WHITE
-
-
-
-
- 4
-
- 5
-
-
-
+
+ PCSC234-WHITE
+
+
+
+
+
+
+
+
+
+
+ Bolt
+
+ 1.0
+ 5.0
+ product
+
+
+ BOLT-WHITE
+
+
+
+ 4
+
+ 5
+
+
+
diff --git a/stock_available_mrp/models/product_product.py b/stock_available_mrp/models/product_product.py
index aa7111ca9..668112101 100644
--- a/stock_available_mrp/models/product_product.py
+++ b/stock_available_mrp/models/product_product.py
@@ -2,21 +2,18 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from collections import Counter
+
from odoo import api, fields, models
from odoo.fields import first
class ProductProduct(models.Model):
- _inherit = 'product.product'
+ _inherit = "product.product"
- bom_id = fields.Many2one(
- 'mrp.bom',
- compute='_compute_bom_id',
- string='BOM'
- )
+ bom_id = fields.Many2one("mrp.bom", compute="_compute_bom_id", string="BOM")
- @api.depends('virtual_available', 'bom_id', 'bom_id.product_qty')
+ @api.depends("virtual_available", "bom_id", "bom_id.product_qty")
def _compute_available_quantities(self):
super(ProductProduct, self)._compute_available_quantities()
@@ -27,49 +24,46 @@ class ProductProduct(models.Model):
:return:
"""
return [
- '|',
- ('product_id', 'in', self.ids),
- '&',
- ('product_id', '=', False),
- ('product_tmpl_id', 'in', self.mapped('product_tmpl_id.id'))
+ "|",
+ ("product_id", "in", self.ids),
+ "&",
+ ("product_id", "=", False),
+ ("product_tmpl_id", "in", self.mapped("product_tmpl_id.id")),
]
@api.multi
- @api.depends('product_tmpl_id')
+ @api.depends("product_tmpl_id")
def _compute_bom_id(self):
- bom_obj = self.env['mrp.bom']
- boms = bom_obj.search(
- self._get_bom_id_domain(),
- order='sequence, product_id',
- )
+ bom_obj = self.env["mrp.bom"]
+ boms = bom_obj.search(self._get_bom_id_domain(), order="sequence, product_id",)
for product in self:
product_boms = boms.filtered(
- lambda b: b.product_id == product or
- (not b.product_id and
- b.product_tmpl_id == product.product_tmpl_id)
+ lambda b: b.product_id == product
+ or (not b.product_id and b.product_tmpl_id == product.product_tmpl_id)
)
if product_boms:
product.bom_id = first(product_boms)
@api.multi
def _compute_available_quantities_dict(self):
- res, stock_dict = super(ProductProduct,
- self)._compute_available_quantities_dict()
+ res, stock_dict = super(
+ ProductProduct, self
+ )._compute_available_quantities_dict()
# compute qty for product with bom
- product_with_bom = self.filtered('bom_id')
+ product_with_bom = self.filtered("bom_id")
if not product_with_bom:
return res, stock_dict
- icp = self.env['ir.config_parameter']
+ icp = self.env["ir.config_parameter"]
stock_available_mrp_based_on = icp.sudo().get_param(
- 'stock_available_mrp_based_on', 'qty_available'
+ "stock_available_mrp_based_on", "qty_available"
)
# explode all boms at once
exploded_boms = product_with_bom._explode_boms()
# extract the list of product used as bom component
- component_products = self.env['product.product'].browse()
+ component_products = self.env["product.product"].browse()
for exploded_components in exploded_boms.values():
for bom_component in exploded_components:
component_products |= first(bom_component).product_id
@@ -79,22 +73,19 @@ class ProductProduct(models.Model):
if res and stock_available_mrp_based_on in list(res.values())[0]:
# If the qty is computed by the same method use it to avoid
# stressing the cache
- component_qties, _ = \
- component_products._compute_available_quantities_dict()
+ component_qties, _ = component_products._compute_available_quantities_dict()
else:
# The qty is a field computed by an other method than the
# current one. Take the value on the record.
component_qties = {
- p.id: {
- stock_available_mrp_based_on: p[
- stock_available_mrp_based_on]} for p in
- component_products}
+ p.id: {stock_available_mrp_based_on: p[stock_available_mrp_based_on]}
+ for p in component_products
+ }
for product in product_with_bom:
# Need by product (same product can be in many BOM lines/levels)
exploded_components = exploded_boms[product.id]
- component_needs = product._get_components_needs(
- exploded_components)
+ component_needs = product._get_components_needs(exploded_components)
if not component_needs:
# The BoM has no line we can use
potential_qty = 0.0
@@ -102,13 +93,15 @@ class ProductProduct(models.Model):
else:
# Find the lowest quantity we can make with the stock at hand
components_potential_qty = min(
- [component_qties[component.id][
- stock_available_mrp_based_on] / need
- for component, need in component_needs.items()]
+ [
+ component_qties[component.id][stock_available_mrp_based_on]
+ / need
+ for component, need in component_needs.items()
+ ]
)
bom_id = product.bom_id
- potential_qty = (bom_id.product_qty * components_potential_qty)
+ potential_qty = bom_id.product_qty * components_potential_qty
potential_qty = potential_qty > 0.0 and potential_qty or 0.0
# We want to respect the rounding factor of the potential_qty
@@ -116,11 +109,11 @@ class ProductProduct(models.Model):
potential_qty = bom_id.product_uom_id._compute_quantity(
potential_qty,
product.bom_id.product_tmpl_id.uom_id,
- rounding_method='DOWN'
+ rounding_method="DOWN",
)
- res[product.id]['potential_qty'] = potential_qty
- res[product.id]['immediately_usable_qty'] += potential_qty
+ res[product.id]["potential_qty"] = potential_qty
+ res[product.id]["immediately_usable_qty"] += potential_qty
return res, stock_dict
@@ -145,6 +138,6 @@ class ProductProduct(models.Model):
needs = Counter()
for bom_component in exploded_components:
component = bom_component[0].product_id
- needs += Counter({component: bom_component[1]['qty']})
+ needs += Counter({component: bom_component[1]["qty"]})
return needs
diff --git a/stock_available_mrp/tests/test_potential_qty.py b/stock_available_mrp/tests/test_potential_qty.py
index a2ede76c3..48f19e98b 100644
--- a/stock_available_mrp/tests/test_potential_qty.py
+++ b/stock_available_mrp/tests/test_potential_qty.py
@@ -1,8 +1,8 @@
# Copyright 2014 Numérigraphe SARL
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-from odoo.tests.common import TransactionCase
from odoo.osv.expression import TRUE_LEAF
+from odoo.tests.common import TransactionCase
class TestPotentialQty(TransactionCase):
@@ -15,91 +15,90 @@ class TestPotentialQty(TransactionCase):
self.bom_model = self.env["mrp.bom"]
self.bom_line_model = self.env["mrp.bom.line"]
self.stock_quant_model = self.env["stock.quant"]
- self.config = self.env['ir.config_parameter']
- self.location = self.env['stock.location']
+ self.config = self.env["ir.config_parameter"]
+ self.location = self.env["stock.location"]
# Get the warehouses
- self.wh_main = self.browse_ref('stock.warehouse0')
- self.wh_ch = self.browse_ref('stock.stock_warehouse_shop0')
+ self.wh_main = self.browse_ref("stock.warehouse0")
+ self.wh_ch = self.browse_ref("stock.stock_warehouse_shop0")
# We need to compute parent_left and parent_right of the locations as
# they are used to compute qty_available of the product.
self.location._parent_store_compute()
# An interesting product (multi-line BoM, variants)
- self.tmpl = self.browse_ref(
- 'mrp.product_product_table_kit_product_template')
+ self.tmpl = self.browse_ref("mrp.product_product_table_kit_product_template")
# First variant
- self.var1 = self.browse_ref('mrp.product_product_table_kit')
+ self.var1 = self.browse_ref("mrp.product_product_table_kit")
# Second variant
- self.var2 = self.browse_ref(
- 'stock_available_mrp.product_kit_1a')
+ self.var2 = self.browse_ref("stock_available_mrp.product_kit_1a")
# Make bolt a stockable product to be able to change its stock
# we need to unreserve the existing move before being able to do it.
- bolt = self.env.ref('mrp.product_product_computer_desk_bolt')
- bolt_moves = self.env['stock.move'].search(
- [('product_id', '=', bolt.id),
- ('state', 'not in', ('done', 'cancel'))])
+ bolt = self.env.ref("mrp.product_product_computer_desk_bolt")
+ bolt_moves = self.env["stock.move"].search(
+ [("product_id", "=", bolt.id), ("state", "not in", ("done", "cancel"))]
+ )
bolt_moves._do_unreserve()
- bolt.type = 'product'
+ bolt.type = "product"
# Components that can be used to make the product
component_ids = [
# Bolt
bolt.id,
# Wood Panel
- self.ref('mrp.product_product_wood_panel'),
+ self.ref("mrp.product_product_wood_panel"),
]
# Zero-out the inventory of all variants and components
- for component_id in (
- component_ids + [v.id
- for v in self.tmpl.product_variant_ids]):
+ for component_id in component_ids + [
+ v.id for v in self.tmpl.product_variant_ids
+ ]:
prod = self.product_model.browse(component_id)
- self.env['stock.quant'].search([
- ('product_id', '=', prod.id)
- ]).unlink()
+ self.env["stock.quant"].search([("product_id", "=", prod.id)]).unlink()
self.product_model.invalidate_cache()
# A product without a BoM
- self.product_wo_bom = self.browse_ref('product.product_product_11')
+ self.product_wo_bom = self.browse_ref("product.product_product_11")
# Record the initial quantity available for sale
- self.initial_usable_qties = {i.id: i.immediately_usable_qty
- for i in [self.tmpl,
- self.var1,
- self.var2,
- self.product_wo_bom]}
+ self.initial_usable_qties = {
+ i.id: i.immediately_usable_qty
+ for i in [self.tmpl, self.var1, self.var2, self.product_wo_bom]
+ }
def create_inventory(self, product_id, qty, location_id=None):
if location_id is None:
location_id = self.wh_main.lot_stock_id.id
- inventory = self.env['stock.inventory'].create({
- 'name': 'Test inventory',
- 'location_id': location_id,
- 'filter': 'partial'
- })
+ inventory = self.env["stock.inventory"].create(
+ {"name": "Test inventory", "location_id": location_id, "filter": "partial"}
+ )
inventory.action_start()
- self.env['stock.inventory.line'].create({
- 'inventory_id': inventory.id,
- 'product_id': product_id,
- 'location_id': location_id,
- 'product_qty': qty
- })
+ self.env["stock.inventory.line"].create(
+ {
+ "inventory_id": inventory.id,
+ "product_id": product_id,
+ "location_id": location_id,
+ "product_qty": qty,
+ }
+ )
inventory._action_done()
- def create_simple_bom(self, product, sub_product,
- product_qty=1, sub_product_qty=1,
- routing_id=False):
- bom = self.bom_model.create({
- 'product_tmpl_id': product.product_tmpl_id.id,
- 'product_id': product.id,
- 'product_qty': product_qty,
- 'routing_id': routing_id,
- })
- self.bom_line_model.create({
- 'bom_id': bom.id,
- 'product_id': sub_product.id,
- 'product_qty': sub_product_qty,
- })
+ def create_simple_bom(
+ self, product, sub_product, product_qty=1, sub_product_qty=1, routing_id=False
+ ):
+ bom = self.bom_model.create(
+ {
+ "product_tmpl_id": product.product_tmpl_id.id,
+ "product_id": product.id,
+ "product_qty": product_qty,
+ "routing_id": routing_id,
+ }
+ )
+ self.bom_line_model.create(
+ {
+ "bom_id": bom.id,
+ "product_id": sub_product.id,
+ "product_qty": sub_product_qty,
+ }
+ )
return bom
@@ -109,235 +108,294 @@ class TestPotentialQty(TransactionCase):
self.assertEqual(record.potential_qty, qty, msg)
# Check the variation of quantity available for sale
self.assertEqual(
- (record.immediately_usable_qty -
- self.initial_usable_qties[record.id]), qty, msg)
+ (record.immediately_usable_qty - self.initial_usable_qties[record.id]),
+ qty,
+ msg,
+ )
def test_potential_qty_no_bom(self):
# Check the potential when there's no BoM
self.assertPotentialQty(
- self.product_wo_bom, 0.0,
- "The potential without a BoM should be 0")
+ self.product_wo_bom, 0.0, "The potential without a BoM should be 0"
+ )
def test_potential_qty_no_bom_for_company(self):
- chicago_id = self.ref('stock.res_company_1')
+ chicago_id = self.ref("stock.res_company_1")
# Receive 1000x Wood Panel owned by Chicago
- inventory = self.env['stock.inventory'].create(
- {'name': 'Receive CPUa8',
- 'company_id': chicago_id,
- 'location_id': self.wh_ch.lot_stock_id.id,
- 'filter': 'partial'})
+ inventory = self.env["stock.inventory"].create(
+ {
+ "name": "Receive CPUa8",
+ "company_id": chicago_id,
+ "location_id": self.wh_ch.lot_stock_id.id,
+ "filter": "partial",
+ }
+ )
inventory.action_start()
- self.env['stock.inventory.line'].create(
- {'inventory_id': inventory.id,
- 'company_id': chicago_id,
- 'product_id': self.ref('mrp.product_product_wood_panel'),
- 'location_id': self.wh_ch.lot_stock_id.id,
- 'product_qty': 1000.0})
+ self.env["stock.inventory.line"].create(
+ {
+ "inventory_id": inventory.id,
+ "company_id": chicago_id,
+ "product_id": self.ref("mrp.product_product_wood_panel"),
+ "location_id": self.wh_ch.lot_stock_id.id,
+ "product_qty": 1000.0,
+ }
+ )
inventory._action_done()
# Put Bolt owned by Chicago for 1000x the 1st variant in main WH
- inventory = self.env['stock.inventory'].create(
- {'name': 'components for 1st variant',
- 'company_id': chicago_id,
- 'location_id': self.wh_ch.lot_stock_id.id,
- 'filter': 'partial'})
+ inventory = self.env["stock.inventory"].create(
+ {
+ "name": "components for 1st variant",
+ "company_id": chicago_id,
+ "location_id": self.wh_ch.lot_stock_id.id,
+ "filter": "partial",
+ }
+ )
inventory.action_start()
- self.env['stock.inventory.line'].create(
- {'inventory_id': inventory.id,
- 'company_id': chicago_id,
- 'product_id': self.ref('mrp.product_product_computer_desk_bolt'),
- 'location_id': self.wh_ch.lot_stock_id.id,
- 'product_qty': 1000.0})
+ self.env["stock.inventory.line"].create(
+ {
+ "inventory_id": inventory.id,
+ "company_id": chicago_id,
+ "product_id": self.ref("mrp.product_product_computer_desk_bolt"),
+ "location_id": self.wh_ch.lot_stock_id.id,
+ "product_qty": 1000.0,
+ }
+ )
inventory._action_done()
self.assertPotentialQty(
- self.tmpl, 250.0,
- "Wrong template potential after receiving components")
+ self.tmpl, 250.0, "Wrong template potential after receiving components"
+ )
- test_user = self.env['res.users'].create(
- {'name': 'test_demo',
- 'login': 'test_demo',
- 'company_id': self.ref('base.main_company'),
- 'company_ids': [(4, self.ref('base.main_company'))],
- 'groups_id': [(4, self.ref('stock.group_stock_user')),
- (4, self.ref('mrp.group_mrp_user'))]})
+ test_user = self.env["res.users"].create(
+ {
+ "name": "test_demo",
+ "login": "test_demo",
+ "company_id": self.ref("base.main_company"),
+ "company_ids": [(4, self.ref("base.main_company"))],
+ "groups_id": [
+ (4, self.ref("stock.group_stock_user")),
+ (4, self.ref("mrp.group_mrp_user")),
+ ],
+ }
+ )
- bom = self.env['mrp.bom'].search(
- [('product_tmpl_id', '=', self.tmpl.id)])
+ bom = self.env["mrp.bom"].search([("product_tmpl_id", "=", self.tmpl.id)])
test_user_tmpl = self.tmpl.sudo(test_user)
self.assertPotentialQty(
- test_user_tmpl, 250.0,
- "Simple user can access to the potential_qty")
+ test_user_tmpl, 250.0, "Simple user can access to the potential_qty"
+ )
# Set the bom on the main company (visible to members of main company)
# and all products without company (visible to all)
# and the demo user on Chicago (child of main company)
- self.env['product.product'].search([
- TRUE_LEAF]).write({'company_id': False})
- test_user.write({'company_id': chicago_id,
- 'company_ids': [(4, chicago_id)]})
- bom.company_id = self.ref('base.main_company')
+ self.env["product.product"].search([TRUE_LEAF]).write({"company_id": False})
+ test_user.write({"company_id": chicago_id, "company_ids": [(4, chicago_id)]})
+ bom.company_id = self.ref("base.main_company")
self.assertPotentialQty(
- test_user_tmpl, 0,
+ test_user_tmpl,
+ 0,
"The bom should not be visible to non members of the bom's "
- "company or company child of the bom's company")
+ "company or company child of the bom's company",
+ )
bom.company_id = chicago_id
- self.assertPotentialQty(
- test_user_tmpl, 250.0, '')
+ self.assertPotentialQty(test_user_tmpl, 250.0, "")
def test_potential_qty(self):
for i in [self.tmpl, self.var1, self.var2]:
- self.assertPotentialQty(
- i, 0.0,
- "The potential quantity should start at 0")
+ self.assertPotentialQty(i, 0.0, "The potential quantity should start at 0")
# Receive 1000x Wood Panel
- inventory = self.env['stock.inventory'].create(
- {'name': 'Receive Mouses',
- 'location_id': self.wh_main.lot_stock_id.id,
- 'filter': 'partial'})
+ inventory = self.env["stock.inventory"].create(
+ {
+ "name": "Receive Mouses",
+ "location_id": self.wh_main.lot_stock_id.id,
+ "filter": "partial",
+ }
+ )
inventory.action_start()
- self.env['stock.inventory.line'].create(
- {'inventory_id': inventory.id,
- 'product_id': self.ref('mrp.product_product_wood_panel'),
- 'location_id': self.wh_main.lot_stock_id.id,
- 'product_qty': 1000.0})
+ self.env["stock.inventory.line"].create(
+ {
+ "inventory_id": inventory.id,
+ "product_id": self.ref("mrp.product_product_wood_panel"),
+ "location_id": self.wh_main.lot_stock_id.id,
+ "product_qty": 1000.0,
+ }
+ )
inventory._action_done()
for i in [self.tmpl, self.var1, self.var2]:
self.assertPotentialQty(
- i, 0.0,
+ i,
+ 0.0,
"Receiving a single component should not change the "
- "potential of %s" % i)
+ "potential of %s" % i,
+ )
# Receive enough bolt to make 1000x the 1st variant in main WH
- inventory = self.env['stock.inventory'].create(
- {'name': 'components for 1st variant',
- 'location_id': self.wh_main.lot_stock_id.id,
- 'filter': 'partial'})
+ inventory = self.env["stock.inventory"].create(
+ {
+ "name": "components for 1st variant",
+ "location_id": self.wh_main.lot_stock_id.id,
+ "filter": "partial",
+ }
+ )
inventory.action_start()
- self.env['stock.inventory.line'].create(
- {'inventory_id': inventory.id,
- 'product_id': self.ref(
- 'mrp.product_product_computer_desk_bolt'),
- 'location_id': self.wh_main.lot_stock_id.id,
- 'product_qty': 1000.0})
+ self.env["stock.inventory.line"].create(
+ {
+ "inventory_id": inventory.id,
+ "product_id": self.ref("mrp.product_product_computer_desk_bolt"),
+ "location_id": self.wh_main.lot_stock_id.id,
+ "product_qty": 1000.0,
+ }
+ )
inventory._action_done()
self.assertPotentialQty(
- self.tmpl, 250.0,
- "Wrong template potential after receiving components")
+ self.tmpl, 250.0, "Wrong template potential after receiving components"
+ )
self.assertPotentialQty(
- self.var1, 250.0,
- "Wrong variant 1 potential after receiving components")
+ self.var1, 250.0, "Wrong variant 1 potential after receiving components"
+ )
self.assertPotentialQty(
- self.var2, 0.0,
+ self.var2,
+ 0.0,
"Receiving variant 1's component should not change "
- "variant 2's potential")
+ "variant 2's potential",
+ )
# Receive enough components to make 213 the 2nd variant at Chicago
- inventory = self.env['stock.inventory'].create(
- {'name': 'components for 2nd variant',
- 'location_id': self.wh_ch.lot_stock_id.id,
- 'filter': 'partial'})
+ inventory = self.env["stock.inventory"].create(
+ {
+ "name": "components for 2nd variant",
+ "location_id": self.wh_ch.lot_stock_id.id,
+ "filter": "partial",
+ }
+ )
inventory.action_start()
- self.env['stock.inventory.line'].create(
- {'inventory_id': inventory.id,
- 'product_id': self.ref('mrp.product_product_wood_panel'),
- 'location_id': self.wh_ch.lot_stock_id.id,
- 'product_qty': 1000.0})
- self.env['stock.inventory.line'].create(
- {'inventory_id': inventory.id,
- 'product_id': self.ref(
- 'stock_available_mrp.product_computer_desk_bolt_white'),
- 'location_id': self.wh_ch.lot_stock_id.id,
- 'product_qty': 852.0})
+ self.env["stock.inventory.line"].create(
+ {
+ "inventory_id": inventory.id,
+ "product_id": self.ref("mrp.product_product_wood_panel"),
+ "location_id": self.wh_ch.lot_stock_id.id,
+ "product_qty": 1000.0,
+ }
+ )
+ self.env["stock.inventory.line"].create(
+ {
+ "inventory_id": inventory.id,
+ "product_id": self.ref(
+ "stock_available_mrp.product_computer_desk_bolt_white"
+ ),
+ "location_id": self.wh_ch.lot_stock_id.id,
+ "product_qty": 852.0,
+ }
+ )
inventory._action_done()
self.assertPotentialQty(
- self.tmpl.with_context(test=True), 250.0,
- "Wrong template potential after receiving components")
+ self.tmpl.with_context(test=True),
+ 250.0,
+ "Wrong template potential after receiving components",
+ )
self.assertPotentialQty(
- self.var1, 250.0,
+ self.var1,
+ 250.0,
"Receiving variant 2's component should not change "
- "variant 1's potential")
+ "variant 1's potential",
+ )
self.assertPotentialQty(
- self.var2, 213.0,
- "Wrong variant 2 potential after receiving components")
+ self.var2, 213.0, "Wrong variant 2 potential after receiving components"
+ )
# Check by warehouse
self.assertPotentialQty(
- self.tmpl.with_context(warehouse=self.wh_main.id), 250.0,
- "Wrong potential quantity in main WH")
+ self.tmpl.with_context(warehouse=self.wh_main.id),
+ 250.0,
+ "Wrong potential quantity in main WH",
+ )
self.assertPotentialQty(
- self.tmpl.with_context(warehouse=self.wh_ch.id), 213.0,
- "Wrong potential quantity in Chicago WH")
+ self.tmpl.with_context(warehouse=self.wh_ch.id),
+ 213.0,
+ "Wrong potential quantity in Chicago WH",
+ )
# Check by location
self.assertPotentialQty(
- self.tmpl.with_context(
- location=self.wh_main.lot_stock_id.id), 250.0,
- "Wrong potential quantity in main WH location")
+ self.tmpl.with_context(location=self.wh_main.lot_stock_id.id),
+ 250.0,
+ "Wrong potential quantity in main WH location",
+ )
self.assertPotentialQty(
- self.tmpl.with_context(
- location=self.wh_ch.lot_stock_id.id),
+ self.tmpl.with_context(location=self.wh_ch.lot_stock_id.id),
213.0,
- "Wrong potential quantity in Chicago WH location")
+ "Wrong potential quantity in Chicago WH location",
+ )
def test_multi_unit_recursive_bom(self):
# Test multi-level and multi-units BOM
- uom_unit = self.env.ref('uom.product_uom_unit')
+ uom_unit = self.env.ref("uom.product_uom_unit")
uom_unit.rounding = 1.0
- p1 = self.product_model.create({
- 'name': 'Test product with BOM',
- 'type': 'product',
- 'uom_id': self.env.ref('uom.product_uom_unit').id,
- })
+ p1 = self.product_model.create(
+ {
+ "name": "Test product with BOM",
+ "type": "product",
+ "uom_id": self.env.ref("uom.product_uom_unit").id,
+ }
+ )
- p2 = self.product_model.create({
- 'name': 'Test sub product with BOM',
- 'type': 'consu',
- 'uom_id': self.env.ref('uom.product_uom_unit').id,
- })
+ p2 = self.product_model.create(
+ {
+ "name": "Test sub product with BOM",
+ "type": "consu",
+ "uom_id": self.env.ref("uom.product_uom_unit").id,
+ }
+ )
- p3 = self.product_model.create({
- 'name': 'Test component',
- 'type': 'product',
- 'uom_id': self.env.ref('uom.product_uom_unit').id,
- })
+ p3 = self.product_model.create(
+ {
+ "name": "Test component",
+ "type": "product",
+ "uom_id": self.env.ref("uom.product_uom_unit").id,
+ }
+ )
- bom_p1 = self.bom_model.create({
- 'product_tmpl_id': p1.product_tmpl_id.id,
- 'product_id': p1.id,
- })
+ bom_p1 = self.bom_model.create(
+ {"product_tmpl_id": p1.product_tmpl_id.id, "product_id": p1.id,}
+ )
- self.bom_line_model.create({
- 'bom_id': bom_p1.id,
- 'product_id': p3.id,
- 'product_qty': 1,
- 'product_uom_id': self.env.ref('uom.product_uom_unit').id,
-
- })
+ self.bom_line_model.create(
+ {
+ "bom_id": bom_p1.id,
+ "product_id": p3.id,
+ "product_qty": 1,
+ "product_uom_id": self.env.ref("uom.product_uom_unit").id,
+ }
+ )
# Two p2 which have a bom
- self.bom_line_model.create({
- 'bom_id': bom_p1.id,
- 'product_id': p2.id,
- 'product_qty': 2,
- 'product_uom_id': self.env.ref('uom.product_uom_unit').id,
+ self.bom_line_model.create(
+ {
+ "bom_id": bom_p1.id,
+ "product_id": p2.id,
+ "product_qty": 2,
+ "product_uom_id": self.env.ref("uom.product_uom_unit").id,
+ }
+ )
- })
-
- bom_p2 = self.bom_model.create({
- 'product_tmpl_id': p2.product_tmpl_id.id,
- 'product_id': p2.id,
- 'type': 'phantom',
- })
+ bom_p2 = self.bom_model.create(
+ {
+ "product_tmpl_id": p2.product_tmpl_id.id,
+ "product_id": p2.id,
+ "type": "phantom",
+ }
+ )
# p2 need 2 unit of component
- self.bom_line_model.create({
- 'bom_id': bom_p2.id,
- 'product_id': p3.id,
- 'product_qty': 2,
- 'product_uom_id': self.env.ref('uom.product_uom_unit').id,
-
- })
+ self.bom_line_model.create(
+ {
+ "bom_id": bom_p2.id,
+ "product_id": p3.id,
+ "product_qty": 2,
+ "product_uom_id": self.env.ref("uom.product_uom_unit").id,
+ }
+ )
p1.refresh()
@@ -369,12 +427,11 @@ class TestPotentialQty(TransactionCase):
# a recordset with multiple products
# Recursive compute is not working
- p1 = self.product_model.create({'name': 'Test P1'})
- p2 = self.product_model.create({'name': 'Test P2'})
- p3 = self.product_model.create({'name': 'Test P3', 'type': 'product'})
+ p1 = self.product_model.create({"name": "Test P1"})
+ p2 = self.product_model.create({"name": "Test P2"})
+ p3 = self.product_model.create({"name": "Test P3", "type": "product"})
- self.config.set_param('stock_available_mrp_based_on',
- 'immediately_usable_qty')
+ self.config.set_param("stock_available_mrp_based_on", "immediately_usable_qty")
# P1 need one P2
self.create_simple_bom(p1, p2)
@@ -385,11 +442,9 @@ class TestPotentialQty(TransactionCase):
self.product_model.invalidate_cache()
- products = self.product_model.search(
- [('id', 'in', [p1.id, p2.id, p3.id])]
- )
+ products = self.product_model.search([("id", "in", [p1.id, p2.id, p3.id])])
self.assertEqual(
{p1.id: 3.0, p2.id: 3.0, p3.id: 0.0},
- {p.id: p.potential_qty for p in products}
+ {p.id: p.potential_qty for p in products},
)
From baa9673b45eb0a56e467a0a849f3af488128bfd9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?=
Date: Thu, 13 May 2021 17:28:33 +0200
Subject: [PATCH 29/33] [MIG] stock_available_mrp: Migration to 13.0
---
stock_available_mrp/__manifest__.py | 4 +-
stock_available_mrp/demo/mrp_data.xml | 8 +-
stock_available_mrp/models/product_product.py | 24 +--
stock_available_mrp/readme/CONTRIBUTORS.rst | 4 +
.../tests/test_potential_qty.py | 190 ++++++------------
5 files changed, 87 insertions(+), 143 deletions(-)
diff --git a/stock_available_mrp/__manifest__.py b/stock_available_mrp/__manifest__.py
index eafbba1d1..114ddfa8e 100644
--- a/stock_available_mrp/__manifest__.py
+++ b/stock_available_mrp/__manifest__.py
@@ -2,12 +2,12 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Consider the production potential is available to promise",
- "version": "12.0.1.0.2",
+ "version": "13.0.1.0.0",
"author": "Numérigraphe," "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/stock-logistics-warehouse",
"category": "Hidden",
"depends": ["stock_available", "mrp"],
- "demo": ["demo/mrp_data.xml",],
+ "demo": ["demo/mrp_data.xml"],
"license": "AGPL-3",
"installable": True,
}
diff --git a/stock_available_mrp/demo/mrp_data.xml b/stock_available_mrp/demo/mrp_data.xml
index ae3e3c4fc..4e7b818ed 100644
--- a/stock_available_mrp/demo/mrp_data.xml
+++ b/stock_available_mrp/demo/mrp_data.xml
@@ -7,19 +7,19 @@
ref="mrp.product_product_table_kit_product_template"
/>
@@ -40,7 +40,7 @@
5
diff --git a/stock_available_mrp/models/product_product.py b/stock_available_mrp/models/product_product.py
index 668112101..fcd8af5c6 100644
--- a/stock_available_mrp/models/product_product.py
+++ b/stock_available_mrp/models/product_product.py
@@ -8,16 +8,16 @@ from odoo.fields import first
class ProductProduct(models.Model):
-
_inherit = "product.product"
- bom_id = fields.Many2one("mrp.bom", compute="_compute_bom_id", string="BOM")
+ bom_id = fields.Many2one(
+ comodel_name="mrp.bom", compute="_compute_bom_id", string="BOM"
+ )
@api.depends("virtual_available", "bom_id", "bom_id.product_qty")
def _compute_available_quantities(self):
- super(ProductProduct, self)._compute_available_quantities()
+ super()._compute_available_quantities()
- @api.multi
def _get_bom_id_domain(self):
"""
Real multi domain
@@ -31,12 +31,12 @@ class ProductProduct(models.Model):
("product_tmpl_id", "in", self.mapped("product_tmpl_id.id")),
]
- @api.multi
@api.depends("product_tmpl_id")
def _compute_bom_id(self):
bom_obj = self.env["mrp.bom"]
- boms = bom_obj.search(self._get_bom_id_domain(), order="sequence, product_id",)
+ boms = bom_obj.search(self._get_bom_id_domain(), order="sequence, product_id")
for product in self:
+ product.bom_id = product.bom_id
product_boms = boms.filtered(
lambda b: b.product_id == product
or (not b.product_id and b.product_tmpl_id == product.product_tmpl_id)
@@ -44,11 +44,8 @@ class ProductProduct(models.Model):
if product_boms:
product.bom_id = first(product_boms)
- @api.multi
def _compute_available_quantities_dict(self):
- res, stock_dict = super(
- ProductProduct, self
- )._compute_available_quantities_dict()
+ res, stock_dict = super()._compute_available_quantities_dict()
# compute qty for product with bom
product_with_bom = self.filtered("bom_id")
@@ -88,8 +85,7 @@ class ProductProduct(models.Model):
component_needs = product._get_components_needs(exploded_components)
if not component_needs:
# The BoM has no line we can use
- potential_qty = 0.0
-
+ potential_qty = immediately_usable_qty = 0.0
else:
# Find the lowest quantity we can make with the stock at hand
components_potential_qty = min(
@@ -113,11 +109,11 @@ class ProductProduct(models.Model):
)
res[product.id]["potential_qty"] = potential_qty
- res[product.id]["immediately_usable_qty"] += potential_qty
+ immediately_usable_qty = potential_qty if bom_id.type != "phantom" else 0
+ res[product.id]["immediately_usable_qty"] += immediately_usable_qty
return res, stock_dict
- @api.multi
def _explode_boms(self):
"""
return a dict by product_id of exploded bom lines
diff --git a/stock_available_mrp/readme/CONTRIBUTORS.rst b/stock_available_mrp/readme/CONTRIBUTORS.rst
index 4f314834d..1089a647b 100644
--- a/stock_available_mrp/readme/CONTRIBUTORS.rst
+++ b/stock_available_mrp/readme/CONTRIBUTORS.rst
@@ -4,3 +4,7 @@
* Laurent Mignon
* Cédric Pigeon
* Florian da Costa
+
+* `Tecnativa `_:
+
+ * Víctor Martínez
diff --git a/stock_available_mrp/tests/test_potential_qty.py b/stock_available_mrp/tests/test_potential_qty.py
index 48f19e98b..022e0f58c 100644
--- a/stock_available_mrp/tests/test_potential_qty.py
+++ b/stock_available_mrp/tests/test_potential_qty.py
@@ -1,4 +1,5 @@
# Copyright 2014 Numérigraphe SARL
+# Copyright 2021 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.osv.expression import TRUE_LEAF
@@ -9,7 +10,7 @@ class TestPotentialQty(TransactionCase):
"""Test the potential quantity on a product with a multi-line BoM"""
def setUp(self):
- super(TestPotentialQty, self).setUp()
+ super().setUp()
self.product_model = self.env["product.product"]
self.bom_model = self.env["mrp.bom"]
@@ -17,13 +18,10 @@ class TestPotentialQty(TransactionCase):
self.stock_quant_model = self.env["stock.quant"]
self.config = self.env["ir.config_parameter"]
self.location = self.env["stock.location"]
+ self.main_company = self.browse_ref("base.main_company")
# Get the warehouses
self.wh_main = self.browse_ref("stock.warehouse0")
self.wh_ch = self.browse_ref("stock.stock_warehouse_shop0")
-
- # We need to compute parent_left and parent_right of the locations as
- # they are used to compute qty_available of the product.
- self.location._parent_store_compute()
# An interesting product (multi-line BoM, variants)
self.tmpl = self.browse_ref("mrp.product_product_table_kit_product_template")
# First variant
@@ -33,27 +31,20 @@ class TestPotentialQty(TransactionCase):
# Make bolt a stockable product to be able to change its stock
# we need to unreserve the existing move before being able to do it.
bolt = self.env.ref("mrp.product_product_computer_desk_bolt")
- bolt_moves = self.env["stock.move"].search(
- [("product_id", "=", bolt.id), ("state", "not in", ("done", "cancel"))]
- )
- bolt_moves._do_unreserve()
+ bolt.stock_move_ids._do_unreserve()
bolt.type = "product"
# Components that can be used to make the product
- component_ids = [
+ components = [
# Bolt
- bolt.id,
+ bolt,
# Wood Panel
- self.ref("mrp.product_product_wood_panel"),
+ self.browse_ref("mrp.product_product_wood_panel"),
]
# Zero-out the inventory of all variants and components
- for component_id in component_ids + [
- v.id for v in self.tmpl.product_variant_ids
- ]:
- prod = self.product_model.browse(component_id)
- self.env["stock.quant"].search([("product_id", "=", prod.id)]).unlink()
+ for component in components + [v for v in self.tmpl.product_variant_ids]:
+ component.stock_quant_ids.unlink()
- self.product_model.invalidate_cache()
# A product without a BoM
self.product_wo_bom = self.browse_ref("product.product_product_11")
@@ -63,22 +54,37 @@ class TestPotentialQty(TransactionCase):
for i in [self.tmpl, self.var1, self.var2, self.product_wo_bom]
}
- def create_inventory(self, product_id, qty, location_id=None):
- if location_id is None:
- location_id = self.wh_main.lot_stock_id.id
-
+ def _create_inventory(self, location_id, company_id):
inventory = self.env["stock.inventory"].create(
- {"name": "Test inventory", "location_id": location_id, "filter": "partial"}
+ {
+ "name": "Test inventory",
+ "company_id": company_id,
+ "location_ids": [(4, location_id)],
+ "start_empty": True,
+ }
)
inventory.action_start()
+ return inventory
+
+ def _create_inventory_line(self, inventory_id, product_id, location_id, qty):
self.env["stock.inventory.line"].create(
{
- "inventory_id": inventory.id,
+ "inventory_id": inventory_id,
"product_id": product_id,
"location_id": location_id,
"product_qty": qty,
}
)
+
+ def create_inventory(self, product_id, qty, location_id=None, company_id=None):
+ if location_id is None:
+ location_id = self.wh_main.lot_stock_id.id
+
+ if company_id is None:
+ company_id = self.main_company.id
+
+ inventory = self._create_inventory(location_id, company_id)
+ self._create_inventory_line(inventory.id, product_id, location_id, qty)
inventory._action_done()
def create_simple_bom(
@@ -121,48 +127,20 @@ class TestPotentialQty(TransactionCase):
def test_potential_qty_no_bom_for_company(self):
chicago_id = self.ref("stock.res_company_1")
-
# Receive 1000x Wood Panel owned by Chicago
- inventory = self.env["stock.inventory"].create(
- {
- "name": "Receive CPUa8",
- "company_id": chicago_id,
- "location_id": self.wh_ch.lot_stock_id.id,
- "filter": "partial",
- }
+ self.create_inventory(
+ product_id=self.env.ref("mrp.product_product_wood_panel").id,
+ qty=1000.0,
+ location_id=self.wh_ch.lot_stock_id.id,
+ company_id=chicago_id,
)
- inventory.action_start()
- self.env["stock.inventory.line"].create(
- {
- "inventory_id": inventory.id,
- "company_id": chicago_id,
- "product_id": self.ref("mrp.product_product_wood_panel"),
- "location_id": self.wh_ch.lot_stock_id.id,
- "product_qty": 1000.0,
- }
- )
- inventory._action_done()
-
# Put Bolt owned by Chicago for 1000x the 1st variant in main WH
- inventory = self.env["stock.inventory"].create(
- {
- "name": "components for 1st variant",
- "company_id": chicago_id,
- "location_id": self.wh_ch.lot_stock_id.id,
- "filter": "partial",
- }
+ self.create_inventory(
+ product_id=self.env.ref("mrp.product_product_computer_desk_bolt").id,
+ qty=1000.0,
+ location_id=self.wh_ch.lot_stock_id.id,
+ company_id=chicago_id,
)
- inventory.action_start()
- self.env["stock.inventory.line"].create(
- {
- "inventory_id": inventory.id,
- "company_id": chicago_id,
- "product_id": self.ref("mrp.product_product_computer_desk_bolt"),
- "location_id": self.wh_ch.lot_stock_id.id,
- "product_qty": 1000.0,
- }
- )
- inventory._action_done()
self.assertPotentialQty(
self.tmpl, 250.0, "Wrong template potential after receiving components"
)
@@ -171,8 +149,8 @@ class TestPotentialQty(TransactionCase):
{
"name": "test_demo",
"login": "test_demo",
- "company_id": self.ref("base.main_company"),
- "company_ids": [(4, self.ref("base.main_company"))],
+ "company_id": self.main_company.id,
+ "company_ids": [(4, self.main_company.id), (4, chicago_id)],
"groups_id": [
(4, self.ref("stock.group_stock_user")),
(4, self.ref("mrp.group_mrp_user")),
@@ -182,7 +160,7 @@ class TestPotentialQty(TransactionCase):
bom = self.env["mrp.bom"].search([("product_tmpl_id", "=", self.tmpl.id)])
- test_user_tmpl = self.tmpl.sudo(test_user)
+ test_user_tmpl = self.tmpl.with_user(test_user)
self.assertPotentialQty(
test_user_tmpl, 250.0, "Simple user can access to the potential_qty"
)
@@ -191,8 +169,8 @@ class TestPotentialQty(TransactionCase):
# and all products without company (visible to all)
# and the demo user on Chicago (child of main company)
self.env["product.product"].search([TRUE_LEAF]).write({"company_id": False})
- test_user.write({"company_id": chicago_id, "company_ids": [(4, chicago_id)]})
- bom.company_id = self.ref("base.main_company")
+ test_user.write({"company_ids": [(6, 0, self.main_company.ids)]})
+ bom.company_id = self.main_company
self.assertPotentialQty(
test_user_tmpl,
0,
@@ -200,6 +178,7 @@ class TestPotentialQty(TransactionCase):
"company or company child of the bom's company",
)
bom.company_id = chicago_id
+ test_user.write({"company_ids": [(4, chicago_id)]})
self.assertPotentialQty(test_user_tmpl, 250.0, "")
def test_potential_qty(self):
@@ -207,23 +186,11 @@ class TestPotentialQty(TransactionCase):
self.assertPotentialQty(i, 0.0, "The potential quantity should start at 0")
# Receive 1000x Wood Panel
- inventory = self.env["stock.inventory"].create(
- {
- "name": "Receive Mouses",
- "location_id": self.wh_main.lot_stock_id.id,
- "filter": "partial",
- }
+ self.create_inventory(
+ product_id=self.env.ref("mrp.product_product_wood_panel").id,
+ qty=1000.0,
+ location_id=self.wh_main.lot_stock_id.id,
)
- inventory.action_start()
- self.env["stock.inventory.line"].create(
- {
- "inventory_id": inventory.id,
- "product_id": self.ref("mrp.product_product_wood_panel"),
- "location_id": self.wh_main.lot_stock_id.id,
- "product_qty": 1000.0,
- }
- )
- inventory._action_done()
for i in [self.tmpl, self.var1, self.var2]:
self.assertPotentialQty(
i,
@@ -233,23 +200,11 @@ class TestPotentialQty(TransactionCase):
)
# Receive enough bolt to make 1000x the 1st variant in main WH
- inventory = self.env["stock.inventory"].create(
- {
- "name": "components for 1st variant",
- "location_id": self.wh_main.lot_stock_id.id,
- "filter": "partial",
- }
+ self.create_inventory(
+ product_id=self.env.ref("mrp.product_product_computer_desk_bolt").id,
+ qty=1000.0,
+ location_id=self.wh_main.lot_stock_id.id,
)
- inventory.action_start()
- self.env["stock.inventory.line"].create(
- {
- "inventory_id": inventory.id,
- "product_id": self.ref("mrp.product_product_computer_desk_bolt"),
- "location_id": self.wh_main.lot_stock_id.id,
- "product_qty": 1000.0,
- }
- )
- inventory._action_done()
self.assertPotentialQty(
self.tmpl, 250.0, "Wrong template potential after receiving components"
)
@@ -264,31 +219,20 @@ class TestPotentialQty(TransactionCase):
)
# Receive enough components to make 213 the 2nd variant at Chicago
- inventory = self.env["stock.inventory"].create(
- {
- "name": "components for 2nd variant",
- "location_id": self.wh_ch.lot_stock_id.id,
- "filter": "partial",
- }
+ inventory = self._create_inventory(
+ self.wh_ch.lot_stock_id.id, self.ref("stock.res_company_1")
)
- inventory.action_start()
- self.env["stock.inventory.line"].create(
- {
- "inventory_id": inventory.id,
- "product_id": self.ref("mrp.product_product_wood_panel"),
- "location_id": self.wh_ch.lot_stock_id.id,
- "product_qty": 1000.0,
- }
+ self._create_inventory_line(
+ inventory.id,
+ self.ref("mrp.product_product_wood_panel"),
+ self.wh_ch.lot_stock_id.id,
+ 1000.0,
)
- self.env["stock.inventory.line"].create(
- {
- "inventory_id": inventory.id,
- "product_id": self.ref(
- "stock_available_mrp.product_computer_desk_bolt_white"
- ),
- "location_id": self.wh_ch.lot_stock_id.id,
- "product_qty": 852.0,
- }
+ self._create_inventory_line(
+ inventory.id,
+ self.ref("stock_available_mrp.product_computer_desk_bolt_white"),
+ self.wh_ch.lot_stock_id.id,
+ 852.0,
)
inventory._action_done()
self.assertPotentialQty(
@@ -357,7 +301,7 @@ class TestPotentialQty(TransactionCase):
)
bom_p1 = self.bom_model.create(
- {"product_tmpl_id": p1.product_tmpl_id.id, "product_id": p1.id,}
+ {"product_tmpl_id": p1.product_tmpl_id.id, "product_id": p1.id}
)
self.bom_line_model.create(
From 9d170698df25026ed4cf3ae8860487c45fdfc9db Mon Sep 17 00:00:00 2001
From: oca-travis
Date: Fri, 21 May 2021 07:06:58 +0000
Subject: [PATCH 30/33] [UPD] Update stock_available_mrp.pot
---
.../i18n/stock_available_mrp.pot | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/stock_available_mrp/i18n/stock_available_mrp.pot b/stock_available_mrp/i18n/stock_available_mrp.pot
index 3ea2293db..b7c0f998f 100644
--- a/stock_available_mrp/i18n/stock_available_mrp.pot
+++ b/stock_available_mrp/i18n/stock_available_mrp.pot
@@ -1,12 +1,12 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
-# * stock_available_mrp
+# * stock_available_mrp
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 12.0\n"
+"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
-"Last-Translator: <>\n"
+"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -46,14 +46,5 @@ msgstr ""
#: model:product.product,uom_name:stock_available_mrp.product_kit_1a
#: model:product.template,uom_name:stock_available_mrp.product_computer_desk_bolt_white_product_template
#: model:product.template,uom_name:stock_available_mrp.product_kit_1a_product_template
-msgid "Unit(s)"
+msgid "Units"
msgstr ""
-
-#. module: stock_available_mrp
-#: model:product.product,weight_uom_name:stock_available_mrp.product_computer_desk_bolt_white
-#: model:product.product,weight_uom_name:stock_available_mrp.product_kit_1a
-#: model:product.template,weight_uom_name:stock_available_mrp.product_computer_desk_bolt_white_product_template
-#: model:product.template,weight_uom_name:stock_available_mrp.product_kit_1a_product_template
-msgid "kg"
-msgstr ""
-
From a5ba4232f0d0b892a377963546d0ae1fcb99387e Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Fri, 21 May 2021 07:43:36 +0000
Subject: [PATCH 31/33] [UPD] README.rst
---
stock_available_mrp/README.rst | 14 +++++++++-----
stock_available_mrp/static/description/index.html | 10 +++++++---
2 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/stock_available_mrp/README.rst b/stock_available_mrp/README.rst
index 0f9265f28..f6b7538ea 100644
--- a/stock_available_mrp/README.rst
+++ b/stock_available_mrp/README.rst
@@ -14,13 +14,13 @@ Consider the production potential is available to promise
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github
- :target: https://github.com/OCA/stock-logistics-warehouse/tree/12.0/stock_available_mrp
+ :target: https://github.com/OCA/stock-logistics-warehouse/tree/13.0/stock_available_mrp
:alt: OCA/stock-logistics-warehouse
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_available_mrp
+ :target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-0-stock_available_mrp
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/153/12.0
+ :target: https://runbot.odoo-community.org/runbot/153/13.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -88,7 +88,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues `_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -110,6 +110,10 @@ Contributors
* Cédric Pigeon
* Florian da Costa
+* `Tecnativa `_:
+
+ * Víctor Martínez
+
Maintainers
~~~~~~~~~~~
@@ -123,6 +127,6 @@ 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.
-This module is part of the `OCA/stock-logistics-warehouse `_ project on GitHub.
+This module is part of the `OCA/stock-logistics-warehouse `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/stock_available_mrp/static/description/index.html b/stock_available_mrp/static/description/index.html
index 7e01b1be9..df95846e2 100644
--- a/stock_available_mrp/static/description/index.html
+++ b/stock_available_mrp/static/description/index.html
@@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This module takes the potential quantities available for Products into account in
the quantity available to promise, where the “Potential quantity” is the
quantity that can be manufactured with the components immediately at hand.
@@ -439,7 +439,7 @@ manufacturing.
Bugs are tracked on GitHub Issues.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-feedback.
@@ -468,7 +472,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
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.