diff --git a/stock_available_mrp/__init__.py b/stock_available_mrp/__init__.py
index 0443836b4..2f72d6f91 100644
--- a/stock_available_mrp/__init__.py
+++ b/stock_available_mrp/__init__.py
@@ -1,5 +1,4 @@
-# -*- coding: utf-8 -*-
-# © 2014 Numérigraphe SARL
+# Copyright 2014 Numérigraphe SARL
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import models
diff --git a/stock_available_mrp/__manifest__.py b/stock_available_mrp/__manifest__.py
index 5564377f3..58a507f11 100644
--- a/stock_available_mrp/__manifest__.py
+++ b/stock_available_mrp/__manifest__.py
@@ -1,11 +1,11 @@
-# -*- coding: utf-8 -*-
-# © 2014 Numérigraphe SARL, Camptocamp
+# 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': '10.0.1.0.0',
- "author": u"Numérigraphe,"
- u"Odoo Community Association (OCA)",
+ 'version': '11.0.1.0.0',
+ "author": "Numérigraphe,"
+ "Odoo Community Association (OCA)",
+ 'website': 'https://github.com/OCA/stock-logistics-warehouse',
'category': 'Hidden',
'depends': [
'stock_available',
diff --git a/stock_available_mrp/demo/mrp_data.xml b/stock_available_mrp/demo/mrp_data.xml
index 0099e9349..a41a04f4c 100644
--- a/stock_available_mrp/demo/mrp_data.xml
+++ b/stock_available_mrp/demo/mrp_data.xml
@@ -21,7 +21,7 @@
10.0
47.0
- consu
+ product
E-COM10-WHITE
diff --git a/stock_available_mrp/i18n/de.po b/stock_available_mrp/i18n/de.po
index 3fc625b7f..deb92b8bd 100644
--- a/stock_available_mrp/i18n/de.po
+++ b/stock_available_mrp/i18n/de.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_available_mrp
-#
+#
# Translators:
# Rudolf Schnapka , 2016
msgid ""
@@ -11,13 +11,25 @@ msgstr ""
"POT-Creation-Date: 2016-01-14 01:38+0000\n"
"PO-Revision-Date: 2016-01-14 09:35+0000\n"
"Last-Translator: Rudolf Schnapka \n"
-"Language-Team: German (http://www.transifex.com/oca/OCA-stock-logistics-warehouse-8-0/language/de/)\n"
+"Language-Team: German (http://www.transifex.com/oca/OCA-stock-logistics-"
+"warehouse-8-0/language/de/)\n"
+"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: de\n"
"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"
+msgstr ""
+
+#. module: stock_available_mrp
+#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product_bom_id
+msgid "Bill of Materials"
+msgstr ""
+
#. module: stock_available_mrp
#: model:ir.model,name:stock_available_mrp.model_product_product
msgid "Product"
@@ -29,6 +41,16 @@ msgid "Product Template"
msgstr "Produktvorlage"
#. module: stock_available_mrp
-#: model:product.uom,name:stock_available_mrp.thousand
-msgid "Thousand"
-msgstr "Tausend"
+#: 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"
+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."
+msgstr ""
+
+#~ msgid "Thousand"
+#~ msgstr "Tausend"
diff --git a/stock_available_mrp/i18n/es.po b/stock_available_mrp/i18n/es.po
index aab2eb182..1eb112127 100644
--- a/stock_available_mrp/i18n/es.po
+++ b/stock_available_mrp/i18n/es.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_available_mrp
-#
+#
# Translators:
msgid ""
msgstr ""
@@ -10,13 +10,25 @@ msgstr ""
"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: Spanish (http://www.transifex.com/oca/OCA-stock-logistics-warehouse-8-0/language/es/)\n"
+"Language-Team: Spanish (http://www.transifex.com/oca/OCA-stock-logistics-"
+"warehouse-8-0/language/es/)\n"
+"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: es\n"
"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"
+msgstr ""
+
+#. module: stock_available_mrp
+#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product_bom_id
+msgid "Bill of Materials"
+msgstr ""
+
#. module: stock_available_mrp
#: model:ir.model,name:stock_available_mrp.model_product_product
msgid "Product"
@@ -28,6 +40,13 @@ msgid "Product Template"
msgstr "Plantilla de producto"
#. module: stock_available_mrp
-#: model:product.uom,name:stock_available_mrp.thousand
-msgid "Thousand"
+#: 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"
+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."
msgstr ""
diff --git a/stock_available_mrp/i18n/fi.po b/stock_available_mrp/i18n/fi.po
index fa81ddfe0..8c6389aee 100644
--- a/stock_available_mrp/i18n/fi.po
+++ b/stock_available_mrp/i18n/fi.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_available_mrp
-#
+#
# Translators:
msgid ""
msgstr ""
@@ -10,13 +10,25 @@ msgstr ""
"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: Finnish (http://www.transifex.com/oca/OCA-stock-logistics-warehouse-8-0/language/fi/)\n"
+"Language-Team: Finnish (http://www.transifex.com/oca/OCA-stock-logistics-"
+"warehouse-8-0/language/fi/)\n"
+"Language: fi\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: fi\n"
"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"
+msgstr ""
+
+#. module: stock_available_mrp
+#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product_bom_id
+msgid "Bill of Materials"
+msgstr ""
+
#. module: stock_available_mrp
#: model:ir.model,name:stock_available_mrp.model_product_product
msgid "Product"
@@ -28,6 +40,13 @@ msgid "Product Template"
msgstr "Tuotteen malli"
#. module: stock_available_mrp
-#: model:product.uom,name:stock_available_mrp.thousand
-msgid "Thousand"
+#: 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"
+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."
msgstr ""
diff --git a/stock_available_mrp/i18n/fr.po b/stock_available_mrp/i18n/fr.po
index 0aaafddd3..b61ff2a0a 100644
--- a/stock_available_mrp/i18n/fr.po
+++ b/stock_available_mrp/i18n/fr.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_available_mrp
-#
+#
# Translators:
msgid ""
msgstr ""
@@ -10,13 +10,25 @@ msgstr ""
"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"
+"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"
-"Language: fr\n"
"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"
+msgstr ""
+
+#. module: stock_available_mrp
+#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product_bom_id
+msgid "Bill of Materials"
+msgstr ""
+
#. module: stock_available_mrp
#: model:ir.model,name:stock_available_mrp.model_product_product
msgid "Product"
@@ -28,6 +40,13 @@ msgid "Product Template"
msgstr "Modèle de produit"
#. module: stock_available_mrp
-#: model:product.uom,name:stock_available_mrp.thousand
-msgid "Thousand"
+#: 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"
+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."
msgstr ""
diff --git a/stock_available_mrp/i18n/hr_HR.po b/stock_available_mrp/i18n/hr_HR.po
index 59853430f..15a0b4f1f 100644
--- a/stock_available_mrp/i18n/hr_HR.po
+++ b/stock_available_mrp/i18n/hr_HR.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_available_mrp
-#
+#
# Translators:
# Bole , 2016
msgid ""
@@ -11,28 +11,25 @@ msgstr ""
"POT-Creation-Date: 2016-06-12 19:59+0000\n"
"PO-Revision-Date: 2016-06-14 10:45+0000\n"
"Last-Translator: Bole \n"
-"Language-Team: Croatian (Croatia) (http://www.transifex.com/oca/OCA-stock-logistics-warehouse-9-0/language/hr_HR/)\n"
+"Language-Team: Croatian (Croatia) (http://www.transifex.com/oca/OCA-stock-"
+"logistics-warehouse-9-0/language/hr_HR/)\n"
+"Language: hr_HR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: hr_HR\n"
-"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
#. module: stock_available_mrp
-#: model:ir.ui.view,arch_db:stock_available_mrp.view_product_form_potential_qty
-msgid "Potential"
-msgstr "Potencijal"
+#: 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"
+msgstr ""
#. module: stock_available_mrp
-#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product_component_ids
-msgid "Component ids"
-msgstr "ID-ovi komponenata"
-
-#. module: stock_available_mrp
-#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product_potential_qty
-#: model:ir.model.fields,field_description:stock_available_mrp.field_product_template_potential_qty
-msgid "Potential"
-msgstr "Potencijal"
+#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product_bom_id
+msgid "Bill of Materials"
+msgstr ""
#. module: stock_available_mrp
#: model:ir.model,name:stock_available_mrp.model_product_product
@@ -45,21 +42,42 @@ msgid "Product Template"
msgstr "Predložak proizvoda"
#. module: stock_available_mrp
-#: model:ir.model.fields,help:stock_available_mrp.field_product_product_potential_qty
-msgid ""
-"Quantity of this Product that could be produced using the materials already "
-"at hand."
-msgstr "Količina ovog proizvoda nije mogla biti proizvedena korištenjem trenutno raspoloživih materijala."
+#: 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"
+msgstr ""
#. module: stock_available_mrp
-#: model:ir.model.fields,help:stock_available_mrp.field_product_template_potential_qty
-msgid ""
-"Quantity of this Product that could be produced using the materials already "
-"at hand. If the product has several variants, this will be the biggest "
-"quantity that can be made for a any single variant."
-msgstr "Količina ovog proizvoda koja može biti proizvodedna raspoloživim količinama sirovina. Ako proizvod ima nekoliko varijanti, ovo će biti najveća moguća količina koja se može proizvesti za svaku pojedinu varijantu."
+#: 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."
+msgstr ""
-#. module: stock_available_mrp
-#: model:product.uom,name:stock_available_mrp.thousand
-msgid "Thousand"
-msgstr "Tisuću"
+#~ msgid "Potential"
+#~ msgstr "Potencijal"
+
+#~ msgid "Component ids"
+#~ msgstr "ID-ovi komponenata"
+
+#~ msgid "Potential"
+#~ msgstr "Potencijal"
+
+#~ msgid ""
+#~ "Quantity of this Product that could be produced using the materials "
+#~ "already at hand."
+#~ msgstr ""
+#~ "Količina ovog proizvoda nije mogla biti proizvedena korištenjem trenutno "
+#~ "raspoloživih materijala."
+
+#~ msgid ""
+#~ "Quantity of this Product that could be produced using the materials "
+#~ "already at hand. If the product has several variants, this will be the "
+#~ "biggest quantity that can be made for a any single variant."
+#~ msgstr ""
+#~ "Količina ovog proizvoda koja može biti proizvodedna raspoloživim "
+#~ "količinama sirovina. Ako proizvod ima nekoliko varijanti, ovo će biti "
+#~ "najveća moguća količina koja se može proizvesti za svaku pojedinu "
+#~ "varijantu."
+
+#~ msgid "Thousand"
+#~ msgstr "Tisuću"
diff --git a/stock_available_mrp/i18n/it.po b/stock_available_mrp/i18n/it.po
index bace38b97..24cf94c0d 100644
--- a/stock_available_mrp/i18n/it.po
+++ b/stock_available_mrp/i18n/it.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_available_mrp
-#
+#
# Translators:
msgid ""
msgstr ""
@@ -10,27 +10,23 @@ msgstr ""
"POT-Creation-Date: 2016-09-04 10:11+0000\n"
"PO-Revision-Date: 2016-04-27 11:10+0000\n"
"Last-Translator: <>\n"
-"Language-Team: Italian (http://www.transifex.com/oca/OCA-stock-logistics-warehouse-9-0/language/it/)\n"
+"Language-Team: Italian (http://www.transifex.com/oca/OCA-stock-logistics-"
+"warehouse-9-0/language/it/)\n"
+"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: it\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: stock_available_mrp
-#: model:ir.ui.view,arch_db:stock_available_mrp.view_product_form_potential_qty
-msgid "Potential"
+#: 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"
msgstr ""
#. module: stock_available_mrp
-#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product_component_ids
-msgid "Component ids"
-msgstr ""
-
-#. module: stock_available_mrp
-#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product_potential_qty
-#: model:ir.model.fields,field_description:stock_available_mrp.field_product_template_potential_qty
-msgid "Potential"
+#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product_bom_id
+msgid "Bill of Materials"
msgstr ""
#. module: stock_available_mrp
@@ -44,21 +40,13 @@ msgid "Product Template"
msgstr ""
#. module: stock_available_mrp
-#: model:ir.model.fields,help:stock_available_mrp.field_product_product_potential_qty
-msgid ""
-"Quantity of this Product that could be produced using the materials already "
-"at hand."
+#: 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"
msgstr ""
#. module: stock_available_mrp
-#: model:ir.model.fields,help:stock_available_mrp.field_product_template_potential_qty
-msgid ""
-"Quantity of this Product that could be produced using the materials already "
-"at hand. If the product has several variants, this will be the biggest "
-"quantity that can be made for a any single variant."
-msgstr ""
-
-#. module: stock_available_mrp
-#: model:product.uom,name:stock_available_mrp.thousand
-msgid "Thousand"
+#: 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."
msgstr ""
diff --git a/stock_available_mrp/i18n/pt_BR.po b/stock_available_mrp/i18n/pt_BR.po
index de9e46c7a..d8c9dbdf6 100644
--- a/stock_available_mrp/i18n/pt_BR.po
+++ b/stock_available_mrp/i18n/pt_BR.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_available_mrp
-#
+#
# Translators:
# Claudio Araujo Santos , 2016
msgid ""
@@ -11,28 +11,24 @@ msgstr ""
"POT-Creation-Date: 2016-07-03 20:56+0000\n"
"PO-Revision-Date: 2016-07-07 19:41+0000\n"
"Last-Translator: Claudio Araujo Santos \n"
-"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-stock-logistics-warehouse-9-0/language/pt_BR/)\n"
+"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-stock-"
+"logistics-warehouse-9-0/language/pt_BR/)\n"
+"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: pt_BR\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: stock_available_mrp
-#: model:ir.ui.view,arch_db:stock_available_mrp.view_product_form_potential_qty
-msgid "Potential"
-msgstr "Potencial"
+#: 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"
+msgstr ""
#. module: stock_available_mrp
-#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product_component_ids
-msgid "Component ids"
-msgstr "IDs de componentes"
-
-#. module: stock_available_mrp
-#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product_potential_qty
-#: model:ir.model.fields,field_description:stock_available_mrp.field_product_template_potential_qty
-msgid "Potential"
-msgstr "Potencial"
+#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product_bom_id
+msgid "Bill of Materials"
+msgstr ""
#. module: stock_available_mrp
#: model:ir.model,name:stock_available_mrp.model_product_product
@@ -45,21 +41,41 @@ msgid "Product Template"
msgstr "Modelo Produto"
#. module: stock_available_mrp
-#: model:ir.model.fields,help:stock_available_mrp.field_product_product_potential_qty
-msgid ""
-"Quantity of this Product that could be produced using the materials already "
-"at hand."
-msgstr "Quantidade deste produto que poderia ser produzido usando os materiais já na mão."
+#: 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"
+msgstr ""
#. module: stock_available_mrp
-#: model:ir.model.fields,help:stock_available_mrp.field_product_template_potential_qty
-msgid ""
-"Quantity of this Product that could be produced using the materials already "
-"at hand. If the product has several variants, this will be the biggest "
-"quantity that can be made for a any single variant."
-msgstr "Quantidade deste produto que poderia ser produzido usando os materiais já na mão. Se o produto tiver várias variantes, esta será a maior quantidade que pode ser feito por qualquer uma única variante."
+#: 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."
+msgstr ""
-#. module: stock_available_mrp
-#: model:product.uom,name:stock_available_mrp.thousand
-msgid "Thousand"
-msgstr "Mil"
+#~ msgid "Potential"
+#~ msgstr "Potencial"
+
+#~ msgid "Component ids"
+#~ msgstr "IDs de componentes"
+
+#~ msgid "Potential"
+#~ msgstr "Potencial"
+
+#~ msgid ""
+#~ "Quantity of this Product that could be produced using the materials "
+#~ "already at hand."
+#~ msgstr ""
+#~ "Quantidade deste produto que poderia ser produzido usando os materiais já "
+#~ "na mão."
+
+#~ msgid ""
+#~ "Quantity of this Product that could be produced using the materials "
+#~ "already at hand. If the product has several variants, this will be the "
+#~ "biggest quantity that can be made for a any single variant."
+#~ msgstr ""
+#~ "Quantidade deste produto que poderia ser produzido usando os materiais já "
+#~ "na mão. Se o produto tiver várias variantes, esta será a maior quantidade "
+#~ "que pode ser feito por qualquer uma única variante."
+
+#~ msgid "Thousand"
+#~ msgstr "Mil"
diff --git a/stock_available_mrp/i18n/sl.po b/stock_available_mrp/i18n/sl.po
index 753889eea..096be0bde 100644
--- a/stock_available_mrp/i18n/sl.po
+++ b/stock_available_mrp/i18n/sl.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_available_mrp
-#
+#
# Translators:
# Matjaž Mozetič , 2016
msgid ""
@@ -11,12 +11,25 @@ msgstr ""
"POT-Creation-Date: 2016-01-14 01:38+0000\n"
"PO-Revision-Date: 2016-01-14 05:18+0000\n"
"Last-Translator: Matjaž Mozetič \n"
-"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-stock-logistics-warehouse-8-0/language/sl/)\n"
+"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-stock-logistics-"
+"warehouse-8-0/language/sl/)\n"
+"Language: sl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: sl\n"
-"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
+"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
+"%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"
+msgstr ""
+
+#. module: stock_available_mrp
+#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product_bom_id
+msgid "Bill of Materials"
+msgstr ""
#. module: stock_available_mrp
#: model:ir.model,name:stock_available_mrp.model_product_product
@@ -29,6 +42,16 @@ msgid "Product Template"
msgstr "Predloga proizvoda"
#. module: stock_available_mrp
-#: model:product.uom,name:stock_available_mrp.thousand
-msgid "Thousand"
-msgstr "Tisoč"
+#: 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"
+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."
+msgstr ""
+
+#~ msgid "Thousand"
+#~ msgstr "Tisoč"
diff --git a/stock_available_mrp/i18n/stock_available_mrp.pot b/stock_available_mrp/i18n/stock_available_mrp.pot
index ae3a04141..ff8ef8502 100644
--- a/stock_available_mrp/i18n/stock_available_mrp.pot
+++ b/stock_available_mrp/i18n/stock_available_mrp.pot
@@ -1,13 +1,11 @@
-# Translation of OpenERP Server.
+# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_available_mrp
#
msgid ""
msgstr ""
-"Project-Id-Version: OpenERP Server 7.0\n"
+"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-07-30 19:41+0000\n"
-"PO-Revision-Date: 2014-07-30 19:41+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -16,18 +14,35 @@ msgstr ""
"Plural-Forms: \n"
#. module: stock_available_mrp
-#: field:product.product,potential_qty:0
-msgid "Potential"
+#: 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"
+msgstr ""
+
+#. module: stock_available_mrp
+#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product_bom_id
+msgid "Bill of Materials"
msgstr ""
#. module: stock_available_mrp
-#: code:_description:0
#: model:ir.model,name:stock_available_mrp.model_product_product
-#, python-format
msgid "Product"
msgstr ""
#. module: stock_available_mrp
-#: help:product.product,potential_qty:0
-msgid "Quantity of this Product that could be produced using the materials already at hand."
+#: 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"
+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."
+msgstr ""
+
diff --git a/stock_available_mrp/i18n/zh_CN.po b/stock_available_mrp/i18n/zh_CN.po
index f9a83998f..044142b9d 100644
--- a/stock_available_mrp/i18n/zh_CN.po
+++ b/stock_available_mrp/i18n/zh_CN.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_available_mrp
-#
+#
# Translators:
# Jeffery Chenn , 2016
msgid ""
@@ -11,28 +11,24 @@ msgstr ""
"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"
+"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"
-"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#. module: stock_available_mrp
-#: model:ir.ui.view,arch_db:stock_available_mrp.view_product_form_potential_qty
-msgid "Potential"
-msgstr "潜在"
-
-#. module: stock_available_mrp
-#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product_component_ids
-msgid "Component ids"
+#: 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"
msgstr ""
#. module: stock_available_mrp
-#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product_potential_qty
-#: model:ir.model.fields,field_description:stock_available_mrp.field_product_template_potential_qty
-msgid "Potential"
-msgstr "潜在"
+#: model:ir.model.fields,field_description:stock_available_mrp.field_product_product_bom_id
+msgid "Bill of Materials"
+msgstr ""
#. module: stock_available_mrp
#: model:ir.model,name:stock_available_mrp.model_product_product
@@ -45,21 +41,22 @@ msgid "Product Template"
msgstr "产品模板"
#. module: stock_available_mrp
-#: model:ir.model.fields,help:stock_available_mrp.field_product_product_potential_qty
-msgid ""
-"Quantity of this Product that could be produced using the materials already "
-"at hand."
+#: 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"
msgstr ""
#. module: stock_available_mrp
-#: model:ir.model.fields,help:stock_available_mrp.field_product_template_potential_qty
-msgid ""
-"Quantity of this Product that could be produced using the materials already "
-"at hand. If the product has several variants, this will be the biggest "
-"quantity that can be made for a any single variant."
+#: 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."
msgstr ""
-#. module: stock_available_mrp
-#: model:product.uom,name:stock_available_mrp.thousand
-msgid "Thousand"
-msgstr "千"
+#~ msgid "Potential"
+#~ msgstr "潜在"
+
+#~ msgid "Potential"
+#~ msgstr "潜在"
+
+#~ msgid "Thousand"
+#~ msgstr "千"
diff --git a/stock_available_mrp/models/__init__.py b/stock_available_mrp/models/__init__.py
index defb121af..28a3f0d0a 100644
--- a/stock_available_mrp/models/__init__.py
+++ b/stock_available_mrp/models/__init__.py
@@ -1,5 +1,4 @@
-# -*- coding: utf-8 -*-
-# © 2014 Numérigraphe SARL
+# Copyright 2014 Numérigraphe SARL
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import product_product
diff --git a/stock_available_mrp/models/product_product.py b/stock_available_mrp/models/product_product.py
index 57a3b1d4d..8798c3ffe 100644
--- a/stock_available_mrp/models/product_product.py
+++ b/stock_available_mrp/models/product_product.py
@@ -1,5 +1,4 @@
-# -*- coding: utf-8 -*-
-# © 2014 Numérigraphe SARL
+# Copyright 2014 Numérigraphe SARL
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from collections import Counter
@@ -62,7 +61,7 @@ class ProductProduct(models.Model):
if not product_with_bom:
return res, stock_dict
icp = self.env['ir.config_parameter']
- stock_available_mrp_based_on = icp.get_param(
+ stock_available_mrp_based_on = icp.sudo().get_param(
'stock_available_mrp_based_on', 'qty_available'
)
@@ -77,7 +76,7 @@ class ProductProduct(models.Model):
# Compute stock for product components.
# {'productid': {field_name: qty}}
- if res and stock_available_mrp_based_on in res.values()[0]:
+ 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, _ = \
@@ -104,12 +103,20 @@ class ProductProduct(models.Model):
# 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
+ stock_available_mrp_based_on] / need
for component, need in component_needs.items()]
)
- potential_qty = (product.bom_id.product_qty *
- components_potential_qty)
+ bom_id = product.bom_id
+ potential_qty = (bom_id.product_qty * components_potential_qty)
+
+ # We want to respect the rounding factor of the potential_qty
+ # Rounding down as we want to be pesimistic.
+ potential_qty = bom_id.product_uom_id._compute_quantity(
+ potential_qty,
+ product.bom_id.product_tmpl_id.uom_id,
+ rounding_method='DOWN'
+ )
res[product.id]['potential_qty'] = potential_qty
res[product.id]['immediately_usable_qty'] += potential_qty
diff --git a/stock_available_mrp/models/product_template.py b/stock_available_mrp/models/product_template.py
index 5ae46c3a5..dee7e6147 100644
--- a/stock_available_mrp/models/product_template.py
+++ b/stock_available_mrp/models/product_template.py
@@ -1,5 +1,4 @@
-# -*- coding: utf-8 -*-
-# © 2014 Numérigraphe SARL
+# Copyright 2014 Numérigraphe SARL
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models, api
diff --git a/stock_available_mrp/static/description/icon.png b/stock_available_mrp/static/description/icon.png
new file mode 100644
index 000000000..3a0328b51
Binary files /dev/null and b/stock_available_mrp/static/description/icon.png differ
diff --git a/stock_available_mrp/tests/__init__.py b/stock_available_mrp/tests/__init__.py
index e6b40413f..4382bb886 100644
--- a/stock_available_mrp/tests/__init__.py
+++ b/stock_available_mrp/tests/__init__.py
@@ -1,5 +1,4 @@
-# -*- coding: utf-8 -*-
-# © 2014 Numérigraphe SARL
+# Copyright 2014 Numérigraphe SARL
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import test_potential_qty
diff --git a/stock_available_mrp/tests/test_potential_qty.py b/stock_available_mrp/tests/test_potential_qty.py
index 83cfba1ef..cdd16916f 100644
--- a/stock_available_mrp/tests/test_potential_qty.py
+++ b/stock_available_mrp/tests/test_potential_qty.py
@@ -1,5 +1,4 @@
-# -*- coding: utf-8 -*-
-# © 2014 Numérigraphe SARL
+# Copyright 2014 Numérigraphe SARL
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.tests.common import TransactionCase
@@ -17,7 +16,14 @@ class TestPotentialQty(TransactionCase):
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']
+ # 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()
self.setup_demo_data()
def setup_demo_data(self):
@@ -26,9 +32,11 @@ class TestPotentialQty(TransactionCase):
'mrp.product_product_build_kit_product_template')
# First variant
self.var1 = self.browse_ref('mrp.product_product_build_kit')
+ self.var1.type = 'product'
# Second variant
self.var2 = self.browse_ref(
'stock_available_mrp.product_kit_1a')
+ self.var2.type = 'product'
# Components that can be used to make the product
component_ids = [
# KeyBoard
@@ -41,15 +49,12 @@ class TestPotentialQty(TransactionCase):
for component_id in (
component_ids + [v.id
for v in self.tmpl.product_variant_ids]):
- inventory = self.env['stock.inventory'].create(
- {'name': 'no components: %s' % component_id,
- 'location_id': self.ref('stock.stock_location_locations'),
- 'filter': 'product',
- 'product_id': component_id})
- inventory.prepare_inventory()
- inventory.reset_real_qty()
- inventory.action_done()
+ prod = self.product_model.browse(component_id)
+ 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')
@@ -60,10 +65,6 @@ class TestPotentialQty(TransactionCase):
self.var2,
self.product_wo_bom]}
- # Get the warehouses
- self.wh_main = self.browse_ref('stock.warehouse0')
- self.wh_ch = self.browse_ref('stock.stock_warehouse_shop0')
-
def create_inventory(self, product_id, qty, location_id=None):
if location_id is None:
location_id = self.wh_main.lot_stock_id.id
@@ -73,8 +74,7 @@ class TestPotentialQty(TransactionCase):
'location_id': location_id,
'filter': 'partial'
})
- inventory.prepare_inventory()
-
+ inventory.action_start()
self.env['stock.inventory.line'].create({
'inventory_id': inventory.id,
'product_id': product_id,
@@ -124,7 +124,7 @@ class TestPotentialQty(TransactionCase):
'company_id': chicago_id,
'location_id': self.wh_ch.lot_stock_id.id,
'filter': 'partial'})
- inventory.prepare_inventory()
+ inventory.action_start()
self.env['stock.inventory.line'].create(
{'inventory_id': inventory.id,
'company_id': chicago_id,
@@ -139,7 +139,7 @@ class TestPotentialQty(TransactionCase):
'company_id': chicago_id,
'location_id': self.wh_ch.lot_stock_id.id,
'filter': 'partial'})
- inventory.prepare_inventory()
+ inventory.action_start()
self.env['stock.inventory.line'].create(
{'inventory_id': inventory.id,
'company_id': chicago_id,
@@ -194,7 +194,7 @@ class TestPotentialQty(TransactionCase):
{'name': 'Receive Mouses',
'location_id': self.wh_main.lot_stock_id.id,
'filter': 'partial'})
- inventory.prepare_inventory()
+ inventory.action_start()
self.env['stock.inventory.line'].create(
{'inventory_id': inventory.id,
'product_id': self.ref('product.product_product_12'),
@@ -212,7 +212,7 @@ class TestPotentialQty(TransactionCase):
{'name': 'components for 1st variant',
'location_id': self.wh_main.lot_stock_id.id,
'filter': 'partial'})
- inventory.prepare_inventory()
+ inventory.action_start()
self.env['stock.inventory.line'].create(
{'inventory_id': inventory.id,
'product_id': self.ref(
@@ -236,7 +236,7 @@ class TestPotentialQty(TransactionCase):
{'name': 'components for 2nd variant',
'location_id': self.wh_ch.lot_stock_id.id,
'filter': 'partial'})
- inventory.prepare_inventory()
+ inventory.action_start()
self.env['stock.inventory.line'].create(
{'inventory_id': inventory.id,
'product_id': self.ref('product.product_product_12'),
@@ -279,17 +279,24 @@ class TestPotentialQty(TransactionCase):
def test_multi_unit_recursive_bom(self):
# Test multi-level and multi-units BOM
-
+ uom_unit = self.env.ref('product.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('product.product_uom_unit').id,
})
p2 = self.product_model.create({
'name': 'Test sub product with BOM',
+ 'type': 'product',
+ 'uom_id': self.env.ref('product.product_uom_unit').id,
})
p3 = self.product_model.create({
- 'name': 'Test component'
+ 'name': 'Test component',
+ 'type': 'product',
+ 'uom_id': self.env.ref('product.product_uom_unit').id,
})
bom_p1 = self.bom_model.create({
@@ -301,6 +308,8 @@ class TestPotentialQty(TransactionCase):
'bom_id': bom_p1.id,
'product_id': p3.id,
'product_qty': 1,
+ 'product_uom_id': self.env.ref('product.product_uom_unit').id,
+
})
# Two p2 which have a bom
@@ -308,6 +317,8 @@ class TestPotentialQty(TransactionCase):
'bom_id': bom_p1.id,
'product_id': p2.id,
'product_qty': 2,
+ 'product_uom_id': self.env.ref('product.product_uom_unit').id,
+
})
bom_p2 = self.bom_model.create({
@@ -321,6 +332,8 @@ class TestPotentialQty(TransactionCase):
'bom_id': bom_p2.id,
'product_id': p3.id,
'product_qty': 2,
+ 'product_uom_id': self.env.ref('product.product_uom_unit').id,
+
})
p1.refresh()
@@ -329,7 +342,6 @@ class TestPotentialQty(TransactionCase):
self.assertEqual(0, p1.potential_qty)
self.create_inventory(p3.id, 1)
-
p1.refresh()
self.assertEqual(0, p1.potential_qty)
@@ -389,6 +401,7 @@ class TestPotentialQty(TransactionCase):
# If iMac has a Bom and can be manufactured
component = self.product_model.create({
'name': 'component',
+ 'type': 'product'
})
self.create_inventory(component.id, 5)
@@ -415,14 +428,14 @@ class TestPotentialQty(TransactionCase):
p1.refresh()
self.assertEqual(5.0, p1.potential_qty)
- def test_potential_qty__list(self):
+ def test_potential_qty_list(self):
# Try to highlight a bug when _get_potential_qty is called on
# 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'})
+ p3 = self.product_model.create({'name': 'Test P3', 'type': 'product'})
self.config.set_param('stock_available_mrp_based_on',
'immediately_usable_qty')