From 4a3d07913f7ab8c9657efa73bf7d17244496b4eb Mon Sep 17 00:00:00 2001
From: Kitti U
Date: Wed, 3 Apr 2019 09:41:17 +0700
Subject: [PATCH] [12.0][MIG] stock_picking_procure_method
---
stock_picking_procure_method/README.rst | 29 ++++++++++---------
stock_picking_procure_method/__manifest__.py | 2 +-
.../i18n/stock_picking_procure_method.pot | 3 +-
.../readme/CONFIGURE.rst | 17 +++++------
.../readme/CONTRIBUTORS.rst | 2 ++
.../static/description/index.html | 25 ++++++++--------
.../test_stock_picking_procure_method.py | 4 +--
7 files changed, 42 insertions(+), 40 deletions(-)
diff --git a/stock_picking_procure_method/README.rst b/stock_picking_procure_method/README.rst
index 32eb2588e..f3b771e5d 100644
--- a/stock_picking_procure_method/README.rst
+++ b/stock_picking_procure_method/README.rst
@@ -14,13 +14,13 @@ Stock Picking Procure Method
: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/11.0/stock_picking_procure_method
+ :target: https://github.com/OCA/stock-logistics-warehouse/tree/12.0/stock_picking_procure_method
: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-11-0/stock-logistics-warehouse-11-0-stock_picking_procure_method
+ :target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_picking_procure_method
: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/11.0
+ :target: https://runbot.odoo-community.org/runbot/153/12.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -52,21 +52,20 @@ Common steps to `mrp` and `purchase` procurements:
#. Go to *Inventory > Configuration > Settings > Warehouse* and set *Multi-Step
Routes* on.
#. Go to *Inventory > Configuration > Warehouse Management > Warehouses*
-#. Create **WH1** with either *Manufacture in this Warehouse* or *Purchase to
- resupply this warehouse* or both set.
-#. Create **WH2** setting off *Manufacture in this Warehouse* and *Purchase to
- resupply this warehouse*. Set **WH1** as the *Resupply Warehouse*.
+#. Create **WH1** with either *Manufacture to Resupply* or *Buy to
+ Resupply* this warehouse or both set.
+#. Create **WH2** setting off *Manufacture to Resupply* and *Buy to
+ Resupply*. Set **WH1** as the *Resupply Warehouse*.
#. Go to *Inventory > Configuration > Warehouse Management > Routes* and click
on the *Make To Order* one.
#. Add a new *Procurement Rule* with these settings and save:
- Name: *WH1 -> WH2-MTO*
- - Action: *Move From Another Location*
- - Procurement Location: *WH2/Stock*
- - Served Warehouse: *WH2*
- - Source Location: *WH1/Stock*
- - Move Supply Method: *Create Procurement*
+ - Action: *Pull From*
- Operation Type: *WH1: Internal Transfers*
+ - Source Location: *WH1/Stock*
+ - Destination Location: *WH2/Stock*
+ - Move Supply Method: *Take From Stock*
- Propagation of Procurement Group: *Propagate*
- Propagate cancel and split: `True`
- Warehouse to Propagate: *WH1*
@@ -104,7 +103,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.
@@ -124,6 +123,8 @@ Contributors
* David Vidal
* Pedro M. Baeza
+* Kitti Upariphutthiphong
+
Maintainers
~~~~~~~~~~~
@@ -137,6 +138,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_picking_procure_method/__manifest__.py b/stock_picking_procure_method/__manifest__.py
index e1b2fa434..2ab308c09 100644
--- a/stock_picking_procure_method/__manifest__.py
+++ b/stock_picking_procure_method/__manifest__.py
@@ -3,7 +3,7 @@
{
'name': 'Stock Picking Procure Method',
'summary': 'Allows to force the procurement method from the picking',
- 'version': '11.0.1.0.0',
+ 'version': '12.0.1.0.0',
'category': 'Warehouse',
'author': 'Tecnativa,'
'Odoo Community Association (OCA)',
diff --git a/stock_picking_procure_method/i18n/stock_picking_procure_method.pot b/stock_picking_procure_method/i18n/stock_picking_procure_method.pot
index 84e6c1e5c..94d8a6183 100644
--- a/stock_picking_procure_method/i18n/stock_picking_procure_method.pot
+++ b/stock_picking_procure_method/i18n/stock_picking_procure_method.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"
@@ -27,4 +27,3 @@ msgstr ""
#: model:ir.model,name:stock_picking_procure_method.model_stock_picking
msgid "Transfer"
msgstr ""
-
diff --git a/stock_picking_procure_method/readme/CONFIGURE.rst b/stock_picking_procure_method/readme/CONFIGURE.rst
index 49155ea64..27568ec8b 100644
--- a/stock_picking_procure_method/readme/CONFIGURE.rst
+++ b/stock_picking_procure_method/readme/CONFIGURE.rst
@@ -6,21 +6,20 @@ Common steps to `mrp` and `purchase` procurements:
#. Go to *Inventory > Configuration > Settings > Warehouse* and set *Multi-Step
Routes* on.
#. Go to *Inventory > Configuration > Warehouse Management > Warehouses*
-#. Create **WH1** with either *Manufacture in this Warehouse* or *Purchase to
- resupply this warehouse* or both set.
-#. Create **WH2** setting off *Manufacture in this Warehouse* and *Purchase to
- resupply this warehouse*. Set **WH1** as the *Resupply Warehouse*.
+#. Create **WH1** with either *Manufacture to Resupply* or *Buy to
+ Resupply* this warehouse or both set.
+#. Create **WH2** setting off *Manufacture to Resupply* and *Buy to
+ Resupply*. Set **WH1** as the *Resupply Warehouse*.
#. Go to *Inventory > Configuration > Warehouse Management > Routes* and click
on the *Make To Order* one.
#. Add a new *Procurement Rule* with these settings and save:
- Name: *WH1 -> WH2-MTO*
- - Action: *Move From Another Location*
- - Procurement Location: *WH2/Stock*
- - Served Warehouse: *WH2*
- - Source Location: *WH1/Stock*
- - Move Supply Method: *Create Procurement*
+ - Action: *Pull From*
- Operation Type: *WH1: Internal Transfers*
+ - Source Location: *WH1/Stock*
+ - Destination Location: *WH2/Stock*
+ - Move Supply Method: *Take From Stock*
- Propagation of Procurement Group: *Propagate*
- Propagate cancel and split: `True`
- Warehouse to Propagate: *WH1*
diff --git a/stock_picking_procure_method/readme/CONTRIBUTORS.rst b/stock_picking_procure_method/readme/CONTRIBUTORS.rst
index ec941801b..ed60ecd54 100644
--- a/stock_picking_procure_method/readme/CONTRIBUTORS.rst
+++ b/stock_picking_procure_method/readme/CONTRIBUTORS.rst
@@ -2,3 +2,5 @@
* David Vidal
* Pedro M. Baeza
+
+* Kitti Upariphutthiphong
diff --git a/stock_picking_procure_method/static/description/index.html b/stock_picking_procure_method/static/description/index.html
index e779f208f..01953292a 100644
--- a/stock_picking_procure_method/static/description/index.html
+++ b/stock_picking_procure_method/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 adds the possibility to set the supply method to Apply Procurement
Rules in the pickings, which is normally set to Take From Stock by default.
This way, you can configure MTO flows triggered from the picking itself.
@@ -400,20 +400,19 @@ through WH1.
Go to Inventory > Configuration > Settings > Warehouse and set Multi-Step
Routes on.
Go to Inventory > Configuration > Warehouse Management > Warehouses
-Create WH1 with either Manufacture in this Warehouse or Purchase to
-resupply this warehouse or both set.
-Create WH2 setting off Manufacture in this Warehouse and Purchase to
-resupply this warehouse. Set WH1 as the Resupply Warehouse.
+Create WH1 with either Manufacture to Resupply or Buy to
+Resupply this warehouse or both set.
+Create WH2 setting off Manufacture to Resupply and Buy to
+Resupply. Set WH1 as the Resupply Warehouse.
Go to Inventory > Configuration > Warehouse Management > Routes and click
on the Make To Order one.
Add a new Procurement Rule with these settings and save:
- Name: WH1 -> WH2-MTO
-- Action: Move From Another Location
-- Procurement Location: WH2/Stock
-- Served Warehouse: WH2
-- Source Location: WH1/Stock
-- Move Supply Method: Create Procurement
+- Action: Pull From
- Operation Type: WH1: Internal Transfers
+- Source Location: WH1/Stock
+- Destination Location: WH2/Stock
+- Move Supply Method: Take From Stock
- Propagation of Procurement Group: Propagate
- Propagate cancel and split: True
- Warehouse to Propagate: WH1
@@ -457,7 +456,7 @@ created.
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.
@@ -479,6 +478,8 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
+
Kitti Upariphutthiphong <kittiu@ecosoft.co.th>
+
@@ -488,7 +489,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.
-
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_picking_procure_method/tests/test_stock_picking_procure_method.py b/stock_picking_procure_method/tests/test_stock_picking_procure_method.py
index 8126e0f6f..c23fb16e2 100644
--- a/stock_picking_procure_method/tests/test_stock_picking_procure_method.py
+++ b/stock_picking_procure_method/tests/test_stock_picking_procure_method.py
@@ -25,10 +25,10 @@ class TestStockPickingMTO(common.SavepointCase):
'code': 'TSWH2',
'resupply_wh_ids': [(6, 0, cls.wh1.ids)],
})
- cls.procurement_rule = cls.env['procurement.rule'].create({
+ cls.procurement_rule = cls.env['stock.rule'].create({
'name': 'TST-WH1 -> TST-WH2 MTO',
'route_id': cls.mto_route.id,
- 'action': 'move',
+ 'action': 'pull',
'location_src_id': cls.wh1.lot_stock_id.id,
'procure_method': 'make_to_stock',
'picking_type_id': cls.wh1.int_type_id.id,