From 960798fbf9fa9d2106e652dc015a906d79c87031 Mon Sep 17 00:00:00 2001
From: Bhavesh Heliconia
Date: Thu, 26 Dec 2024 10:28:54 +0530
Subject: [PATCH] [MIG] stock_picking_purchase_order_link: Migration to 18.0
---
stock_picking_purchase_order_link/README.rst | 19 ++++++----
.../__manifest__.py | 2 +-
.../readme/CONTRIBUTORS.md | 2 +
.../static/description/index.html | 21 ++++++----
.../test_stock_picking_purchase_order_link.py | 38 ++++++++++---------
.../views/stock_picking_view.xml | 4 +-
6 files changed, 51 insertions(+), 35 deletions(-)
diff --git a/stock_picking_purchase_order_link/README.rst b/stock_picking_purchase_order_link/README.rst
index 748c8e231d7c..634498ed4cd4 100644
--- a/stock_picking_purchase_order_link/README.rst
+++ b/stock_picking_purchase_order_link/README.rst
@@ -17,13 +17,13 @@ Stock Picking Purchase Order Link
: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--workflow-lightgray.png?logo=github
- :target: https://github.com/OCA/stock-logistics-workflow/tree/17.0/stock_picking_purchase_order_link
+ :target: https://github.com/OCA/stock-logistics-workflow/tree/18.0/stock_picking_purchase_order_link
:alt: OCA/stock-logistics-workflow
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/stock-logistics-workflow-17-0/stock-logistics-workflow-17-0-stock_picking_purchase_order_link
+ :target: https://translation.odoo-community.org/projects/stock-logistics-workflow-18-0/stock-logistics-workflow-18-0-stock_picking_purchase_order_link
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
- :target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-workflow&target_branch=17.0
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-workflow&target_branch=18.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -53,7 +53,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 to smash it by providing a detailed and welcomed
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -68,9 +68,12 @@ Authors
Contributors
------------
-- Adria Gil Sorribes
-- Jaume Planas
-- Joan Mateu Jordi
+- Adria Gil Sorribes
+- Jaume Planas
+- Joan Mateu Jordi
+- `Heliconia Solutions Pvt. Ltd. `__
+
+ - Bhavesh Heliconia
Maintainers
-----------
@@ -85,6 +88,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-workflow `_ project on GitHub.
+This module is part of the `OCA/stock-logistics-workflow `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/stock_picking_purchase_order_link/__manifest__.py b/stock_picking_purchase_order_link/__manifest__.py
index d6407e0ea375..5520f611d542 100644
--- a/stock_picking_purchase_order_link/__manifest__.py
+++ b/stock_picking_purchase_order_link/__manifest__.py
@@ -4,7 +4,7 @@
{
"name": "Stock Picking Purchase Order Link",
"summary": "Link between picking and purchase order",
- "version": "17.0.1.0.0",
+ "version": "18.0.1.0.0",
"license": "AGPL-3",
"author": "ForgeFlow S.L., Odoo Community Association (OCA)",
"website": "https://github.com/OCA/stock-logistics-workflow",
diff --git a/stock_picking_purchase_order_link/readme/CONTRIBUTORS.md b/stock_picking_purchase_order_link/readme/CONTRIBUTORS.md
index f4a7bcacf243..6eb867489d50 100644
--- a/stock_picking_purchase_order_link/readme/CONTRIBUTORS.md
+++ b/stock_picking_purchase_order_link/readme/CONTRIBUTORS.md
@@ -1,3 +1,5 @@
- Adria Gil Sorribes \<\>
- Jaume Planas \<\>
- Joan Mateu Jordi \<\>
+- [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io)
+ - Bhavesh Heliconia
diff --git a/stock_picking_purchase_order_link/static/description/index.html b/stock_picking_purchase_order_link/static/description/index.html
index 05a6832a994f..eeea505bec89 100644
--- a/stock_picking_purchase_order_link/static/description/index.html
+++ b/stock_picking_purchase_order_link/static/description/index.html
@@ -8,10 +8,11 @@
/*
:Author: David Goodger (goodger@python.org)
-:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
+:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
+Despite the name, some widely supported CSS2 features are used.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
@@ -274,7 +275,7 @@
margin-left: 2em ;
margin-right: 2em }
-pre.code .ln { color: grey; } /* line numbers */
+pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
@@ -300,7 +301,7 @@
span.pre {
white-space: pre }
-span.problematic {
+span.problematic, pre.problematic {
color: red }
span.section-subtitle {
@@ -368,7 +369,7 @@ Stock Picking Purchase Order Link
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:8e2d4c88ab7f2dca315135a58b55eb173715eb4cfd661f62a294547314c2f30f
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This module extends standard WMS to add a smart button in pickings to go
to purchase order that creates the picking.
Table of contents
@@ -400,7 +401,7 @@
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 to smash it by providing a detailed and welcomed
-feedback .
+feedback .
Do not contact contributors directly about support or help with technical issues.
This module is maintained by the OCA.
-
+
+
+
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-workflow project on GitHub.
+
This module is part of the OCA/stock-logistics-workflow project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute .
diff --git a/stock_picking_purchase_order_link/tests/test_stock_picking_purchase_order_link.py b/stock_picking_purchase_order_link/tests/test_stock_picking_purchase_order_link.py
index a5ba3be958e9..89cf55bca246 100644
--- a/stock_picking_purchase_order_link/tests/test_stock_picking_purchase_order_link.py
+++ b/stock_picking_purchase_order_link/tests/test_stock_picking_purchase_order_link.py
@@ -7,39 +7,41 @@
class TestStockPickingPurchaseOrderLink(TransactionCase):
- def setUp(self):
- super().setUp()
- self.stock_location_obj = self.env["stock.location"]
- self.stock_picking_type_obj = self.env["stock.picking.type"]
- self.stock_picking_obj = self.env["stock.picking"]
- self.product_product_obj = self.env["product.product"]
- self.warehouse = self.env["stock.warehouse"].create(
+ @classmethod
+ def setUpClass(cls):
+ super().setUpClass()
+ cls.stock_location_obj = cls.env["stock.location"]
+ cls.stock_picking_type_obj = cls.env["stock.picking.type"]
+ cls.stock_picking_obj = cls.env["stock.picking"]
+ cls.product_product_obj = cls.env["product.product"]
+ cls.warehouse = cls.env["stock.warehouse"].create(
{"name": "warehouse - test", "code": "WH-TEST"}
)
- self.product = self.product_product_obj.create(
+ cls.product = cls.product_product_obj.create(
{
"name": "product_template_obj - Test",
- "type": "product",
+ "type": "consu",
+ "is_storable": True,
"standard_price": 100.00,
}
)
- self.partner = self.env["res.partner"].create({"name": "Vendor - test"})
- self.picking_type = self.stock_picking_type_obj.search(
- [("warehouse_id", "=", self.warehouse.id), ("code", "=", "incoming")]
+ cls.partner = cls.env["res.partner"].create({"name": "Vendor - test"})
+ cls.picking_type = cls.stock_picking_type_obj.search(
+ [("warehouse_id", "=", cls.warehouse.id), ("code", "=", "incoming")]
)
- purchase_order = self.env["purchase.order"].create(
+ purchase_order = cls.env["purchase.order"].create(
{
- "partner_id": self.partner.id,
+ "partner_id": cls.partner.id,
"order_line": [
(
0,
0,
{
- "name": self.product.name,
- "product_id": self.product.id,
+ "name": cls.product.name,
+ "product_id": cls.product.id,
"product_qty": 1.0,
- "product_uom": self.product.uom_po_id.id,
+ "product_uom": cls.product.uom_po_id.id,
"price_unit": 10.0,
"date_planned": date.today(),
},
@@ -48,7 +50,7 @@ def setUp(self):
}
)
purchase_order.button_confirm()
- self.picking = self.stock_picking_obj.search(
+ cls.picking = cls.stock_picking_obj.search(
[("purchase_id", "=", purchase_order.id)]
)
diff --git a/stock_picking_purchase_order_link/views/stock_picking_view.xml b/stock_picking_purchase_order_link/views/stock_picking_view.xml
index c899c3eaa2d1..3b3751c004c7 100644
--- a/stock_picking_purchase_order_link/views/stock_picking_view.xml
+++ b/stock_picking_purchase_order_link/views/stock_picking_view.xml
@@ -6,8 +6,10 @@
stock.picking
+
+
+
-