From 5ec074985be6bd31b3a2bccb7e500ac24197a9f0 Mon Sep 17 00:00:00 2001 From: Ernesto Tejeda Date: Thu, 8 Apr 2021 17:09:27 -0400 Subject: [PATCH] [MIG] stock_picking_procure_method: Migration to 13.0 --- stock_picking_procure_method/README.rst | 10 +++++----- stock_picking_procure_method/__manifest__.py | 8 ++++---- stock_picking_procure_method/models/stock_picking.py | 2 +- .../static/description/index.html | 6 +++--- .../tests/test_stock_picking_procure_method.py | 8 +++----- 5 files changed, 16 insertions(+), 18 deletions(-) diff --git a/stock_picking_procure_method/README.rst b/stock_picking_procure_method/README.rst index f3b771e5d..23b53a78c 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/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 `_. 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. @@ -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 `_ 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 309801c66..42cfcaa20 100644 --- a/stock_picking_procure_method/__manifest__.py +++ b/stock_picking_procure_method/__manifest__.py @@ -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, } diff --git a/stock_picking_procure_method/models/stock_picking.py b/stock_picking_procure_method/models/stock_picking.py index e2616f0d7..5dbc0b49a 100644 --- a/stock_picking_procure_method/models/stock_picking.py +++ b/stock_picking_procure_method/models/stock_picking.py @@ -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} ) diff --git a/stock_picking_procure_method/static/description/index.html b/stock_picking_procure_method/static/description/index.html index 5dfbde746..59945557f 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. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/stock-logistics-warehouse Translate me on Weblate Try me on Runbot

+

Beta License: AGPL-3 OCA/stock-logistics-warehouse Translate me on Weblate Try me on Runbot

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.

@@ -456,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.

@@ -489,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 a94ee52fd..f9d236ff7 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 @@ -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"