[MIG] stock_picking_procure_method: Migration to 13.0

This commit is contained in:
Ernesto Tejeda
2021-04-08 17:09:27 -04:00
committed by Luis D. Lafaurie
parent 2ae00b70c7
commit 17c51ee105
8 changed files with 42 additions and 29 deletions

View File

@@ -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/12.0/stock_picking_procure_method
:target: https://github.com/OCA/stock-logistics-warehouse/tree/13.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-12-0/stock-logistics-warehouse-12-0-stock_picking_procure_method
:target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-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/12.0
:target: https://runbot.odoo-community.org/runbot/153/13.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -103,7 +103,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-warehouse/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 <https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_picking_procure_method%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_picking_procure_method%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
@@ -138,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 <https://github.com/OCA/stock-logistics-warehouse/tree/12.0/stock_picking_procure_method>`_ project on GitHub.
This module is part of the `OCA/stock-logistics-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/13.0/stock_picking_procure_method>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@@ -3,12 +3,12 @@
{
"name": "Stock Picking Procure Method",
"summary": "Allows to force the procurement method from the picking",
"version": "12.0.1.0.0",
"version": "13.0.1.0.0",
"category": "Warehouse",
"author": "Tecnativa," "Odoo Community Association (OCA)",
"author": "Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/stock-logistics-warehouse",
"license": "AGPL-3",
"depends": ["stock",],
"data": ["views/stock_picking_views.xml",],
"depends": ["stock"],
"data": ["views/stock_picking_views.xml"],
"installable": True,
}

View File

@@ -1,6 +1,6 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_picking_procure_method
# * stock_picking_procure_method
#
msgid ""
msgstr ""
@@ -16,7 +16,12 @@ msgstr ""
#. module: stock_picking_procure_method
#: model:ir.model.fields,help:stock_picking_procure_method.field_stock_picking__procure_method
msgid "By default, the system will take from the stock in the source location and passively wait for availability. The other possibility allows you to directly create a procurement on the source location (and thus ignore its current stock) to gather products. If we want to chain moves and have this one to wait for the previous, this second option should be chosen."
msgid ""
"By default, the system will take from the stock in the source location and "
"passively wait for availability. The other possibility allows you to "
"directly create a procurement on the source location (and thus ignore its "
"current stock) to gather products. If we want to chain moves and have this "
"one to wait for the previous, this second option should be chosen."
msgstr ""
#. module: stock_picking_procure_method

View File

@@ -1,12 +1,12 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_picking_procure_method
# * stock_picking_procure_method
#
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"
@@ -15,7 +15,12 @@ msgstr ""
#. module: stock_picking_procure_method
#: model:ir.model.fields,help:stock_picking_procure_method.field_stock_picking__procure_method
msgid "By default, the system will take from the stock in the source location and passively wait for availability. The other possibility allows you to directly create a procurement on the source location (and thus ignore its current stock) to gather products. If we want to chain moves and have this one to wait for the previous, this second option should be chosen."
msgid ""
"By default, the system will take from the stock in the source location and "
"passively wait for availability. The other possibility allows you to "
"directly create a procurement on the source location (and thus ignore its "
"current stock) to gather products. If we want to chain moves and have this "
"one to wait for the previous, this second option should be chosen."
msgstr ""
#. module: stock_picking_procure_method
@@ -27,4 +32,3 @@ msgstr ""
#: model:ir.model,name:stock_picking_procure_method.model_stock_picking
msgid "Transfer"
msgstr ""

View File

@@ -1,6 +1,6 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_picking_procure_method
# * stock_picking_procure_method
#
msgid ""
msgstr ""
@@ -18,10 +18,16 @@ msgstr ""
#. module: stock_picking_procure_method
#: model:ir.model.fields,help:stock_picking_procure_method.field_stock_picking__procure_method
msgid "By default, the system will take from the stock in the source location and passively wait for availability. The other possibility allows you to directly create a procurement on the source location (and thus ignore its current stock) to gather products. If we want to chain moves and have this one to wait for the previous, this second option should be chosen."
msgid ""
"By default, the system will take from the stock in the source location and "
"passively wait for availability. The other possibility allows you to "
"directly create a procurement on the source location (and thus ignore its "
"current stock) to gather products. If we want to chain moves and have this "
"one to wait for the previous, this second option should be chosen."
msgstr ""
"默认情况下,系统将从源位置中的库存中取出,并被动地等待可用性。另一种可能性使您可以直接在源位置创建采购(从而忽略其当前库存)以收集产品。如果我们要链接移动"
"并让其等待上一个,则应选择第二个选项。"
"默认情况下,系统将从源位置中的库存中取出,并被动地等待可用性。另一种可能性使"
"您可以直接在源位置创建采购(从而忽略其当前库存)以收集产品。如果我们要链接移"
"动并让其等待上一个,则应选择第二个选项。"
#. module: stock_picking_procure_method
#: model:ir.model.fields,field_description:stock_picking_procure_method.field_stock_picking__procure_method

View File

@@ -40,5 +40,5 @@ class StockPicking(models.Model):
def _inverse_procure_method(self):
self.filtered("procure_method").mapped("move_lines").update(
{"procure_method": self.procure_method,}
{"procure_method": self.procure_method}
)

View File

@@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/12.0/stock_picking_procure_method"><img alt="OCA/stock-logistics-warehouse" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_picking_procure_method"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/153/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/13.0/stock_picking_procure_method"><img alt="OCA/stock-logistics-warehouse" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-0-stock_picking_procure_method"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/153/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module adds the possibility to set the supply method to <em>Apply Procurement
Rules</em> in the pickings, which is normally set to <em>Take From Stock</em> by default.</p>
<p>This way, you can configure MTO flows triggered from the picking itself.</p>
@@ -456,7 +456,7 @@ created.</li>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_picking_procure_method%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_picking_procure_method%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
@@ -489,7 +489,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/12.0/stock_picking_procure_method">OCA/stock-logistics-warehouse</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/13.0/stock_picking_procure_method">OCA/stock-logistics-warehouse</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>

View File

@@ -17,7 +17,7 @@ class TestStockPickingMTO(common.SavepointCase):
}
)
cls.wh_obj = cls.env["stock.warehouse"]
cls.wh1 = cls.wh_obj.create({"name": "Test WH1", "code": "TSWH1",})
cls.wh1 = cls.wh_obj.create({"name": "Test WH1", "code": "TSWH1"})
cls.wh2 = cls.wh_obj.create(
{
"name": "Test WH2",
@@ -36,7 +36,7 @@ class TestStockPickingMTO(common.SavepointCase):
"location_id": cls.wh2.lot_stock_id.id,
"warehouse_id": cls.wh2.id,
"group_propagation_option": "propagate",
"propagate": True,
"propagate_cancel": True,
"propagate_warehouse_id": cls.wh1.id,
}
)
@@ -69,9 +69,7 @@ class TestStockPickingMTO(common.SavepointCase):
move_line.procure_method = "make_to_order"
self.assertEqual(self.picking.procure_method, "make_to_order")
# Add a new line with MTS rule
move_line.copy(
{"procure_method": "make_to_stock",}
)
move_line.copy({"procure_method": "make_to_stock"})
self.assertFalse(self.picking.procure_method)
# We set the procure method in the picking
self.picking.procure_method = "make_to_order"