From 9fbc13a8b7ee3d47a1d7453c59573fb9a6882a10 Mon Sep 17 00:00:00 2001 From: Bruno Zanotti Date: Fri, 22 Mar 2024 11:41:24 -0300 Subject: [PATCH] [MIG] stock_request_purchase: Migration to 16.0 --- .../odoo/addons/stock_request_purchase | 1 + setup/stock_request_purchase/setup.py | 6 ++++++ stock_request_purchase/README.rst | 20 ++++++++++--------- stock_request_purchase/__manifest__.py | 4 ++-- .../readme/CONTRIBUTORS.rst | 2 ++ .../static/description/index.html | 12 ++++++----- .../tests/test_stock_request_purchase.py | 8 ++++---- .../views/purchase_order_views.xml | 20 +++++++++---------- .../views/stock_request_order_views.xml | 2 +- .../views/stock_request_views.xml | 2 +- 10 files changed, 45 insertions(+), 32 deletions(-) create mode 120000 setup/stock_request_purchase/odoo/addons/stock_request_purchase create mode 100644 setup/stock_request_purchase/setup.py diff --git a/setup/stock_request_purchase/odoo/addons/stock_request_purchase b/setup/stock_request_purchase/odoo/addons/stock_request_purchase new file mode 120000 index 00000000..5822228f --- /dev/null +++ b/setup/stock_request_purchase/odoo/addons/stock_request_purchase @@ -0,0 +1 @@ +../../../../stock_request_purchase \ No newline at end of file diff --git a/setup/stock_request_purchase/setup.py b/setup/stock_request_purchase/setup.py new file mode 100644 index 00000000..28c57bb6 --- /dev/null +++ b/setup/stock_request_purchase/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/stock_request_purchase/README.rst b/stock_request_purchase/README.rst index 8d34b27a..a4080ec6 100644 --- a/stock_request_purchase/README.rst +++ b/stock_request_purchase/README.rst @@ -7,7 +7,7 @@ Stock Request Purchase !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:96f224f25a9395d4d82515ea71d5c95181b021a9ee42510b09dd962f5c0ec13a + !! source digest: sha256:907375da9d85a5f9ed2bc1aee0d47ff938bf44cfeb28dfa87287c634bde27746 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -16,14 +16,14 @@ Stock Request Purchase .. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License: LGPL-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/15.0/stock_request_purchase - :alt: OCA/stock-logistics-warehouse +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--request-lightgray.png?logo=github + :target: https://github.com/OCA/stock-logistics-request/tree/16.0/stock_request_purchase + :alt: OCA/stock-logistics-request .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-15-0/stock-logistics-warehouse-15-0-stock_request_purchase + :target: https://translation.odoo-community.org/projects/stock-logistics-request-16-0/stock-logistics-request-16-0-stock_request_purchase :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-warehouse&target_branch=15.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-request&target_branch=16.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -52,10 +52,10 @@ Known issues / Roadmap Bug Tracker =========== -Bugs are tracked on `GitHub Issues `_. +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. @@ -74,6 +74,8 @@ Contributors * Enric Tobella * Kitti Upariphutthiphong * Alan Ramos +* Urvisha Desai +* Bruno Zanotti Maintainers ~~~~~~~~~~~ @@ -88,6 +90,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-request `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/stock_request_purchase/__manifest__.py b/stock_request_purchase/__manifest__.py index cad9e085..3c663d19 100644 --- a/stock_request_purchase/__manifest__.py +++ b/stock_request_purchase/__manifest__.py @@ -4,9 +4,9 @@ { "name": "Stock Request Purchase", "summary": "Internal request for stock", - "version": "15.0.1.2.0", + "version": "16.0.1.0.0", "license": "LGPL-3", - "website": "https://github.com/OCA/stock-logistics-warehouse", + "website": "https://github.com/OCA/stock-logistics-request", "author": "ForgeFlow, Odoo Community Association (OCA)", "category": "Warehouse Management", "depends": ["stock_request", "purchase_stock"], diff --git a/stock_request_purchase/readme/CONTRIBUTORS.rst b/stock_request_purchase/readme/CONTRIBUTORS.rst index 188eb516..c15f2262 100644 --- a/stock_request_purchase/readme/CONTRIBUTORS.rst +++ b/stock_request_purchase/readme/CONTRIBUTORS.rst @@ -2,3 +2,5 @@ * Enric Tobella * Kitti Upariphutthiphong * Alan Ramos +* Urvisha Desai +* Bruno Zanotti diff --git a/stock_request_purchase/static/description/index.html b/stock_request_purchase/static/description/index.html index 55cd6dd4..39c84aa5 100644 --- a/stock_request_purchase/static/description/index.html +++ b/stock_request_purchase/static/description/index.html @@ -367,9 +367,9 @@

Stock Request Purchase

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:96f224f25a9395d4d82515ea71d5c95181b021a9ee42510b09dd962f5c0ec13a +!! source digest: sha256:907375da9d85a5f9ed2bc1aee0d47ff938bf44cfeb28dfa87287c634bde27746 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: LGPL-3 OCA/stock-logistics-warehouse Translate me on Weblate Try me on Runboat

+

Beta License: LGPL-3 OCA/stock-logistics-request Translate me on Weblate Try me on Runboat

This module allows for users to be able to display purchase orders that have been created as a consequence of Stock Requests.

Table of contents

@@ -401,10 +401,10 @@

Known issues / Roadmap

Bug Tracker

-

Bugs are tracked on GitHub Issues. +

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.

@@ -422,6 +422,8 @@

Contributors

  • Enric Tobella <etobella@creublanca.es>
  • Kitti Upariphutthiphong <kittiu@ecosoft.co.th>
  • Alan Ramos <alan.ramos@jarsa.com.mx>
  • +
  • Urvisha Desai <udesai@opensourceintegrators.com>
  • +
  • Bruno Zanotti <bz@adhoc.com.ar>
  • @@ -431,7 +433,7 @@

    Maintainers

    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-request project on GitHub.

    You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

    diff --git a/stock_request_purchase/tests/test_stock_request_purchase.py b/stock_request_purchase/tests/test_stock_request_purchase.py index 5b2b01a4..e46acb5d 100644 --- a/stock_request_purchase/tests/test_stock_request_purchase.py +++ b/stock_request_purchase/tests/test_stock_request_purchase.py @@ -78,7 +78,7 @@ def _create_product(self, default_code, name, company_id): "company_id": company_id, "type": "product", "route_ids": [(6, 0, self.route_buy.ids)], - "seller_ids": [(0, 0, {"name": self.supplier.id, "delay": 5})], + "seller_ids": [(0, 0, {"partner_id": self.supplier.id, "delay": 5})], } ) @@ -117,7 +117,7 @@ def test_create_request_01(self): self.assertEqual(order.state, "open") self.assertEqual(order.stock_request_ids.state, "open") - order.refresh() + order.invalidate_recordset() self.assertEqual(len(order.sudo().purchase_ids), 1) self.assertEqual(len(order.picking_ids), 0) self.assertEqual(len(order.move_ids), 0) @@ -176,8 +176,8 @@ def test_create_request_02(self): sum(stock_request_2.sudo().purchase_line_ids.mapped("product_qty")), 10 ) - stock_request_1.refresh() - stock_request_2.refresh() + stock_request_1.invalidate_recordset() + stock_request_2.invalidate_recordset() self.assertEqual(len(stock_request_1.sudo().purchase_ids), 1) self.assertEqual(len(stock_request_2.sudo().purchase_ids), 1) diff --git a/stock_request_purchase/views/purchase_order_views.xml b/stock_request_purchase/views/purchase_order_views.xml index 06acec41..f8e6da37 100644 --- a/stock_request_purchase/views/purchase_order_views.xml +++ b/stock_request_purchase/views/purchase_order_views.xml @@ -6,10 +6,6 @@ purchase.order.form purchase.order - diff --git a/stock_request_purchase/views/stock_request_views.xml b/stock_request_purchase/views/stock_request_views.xml index 26a6354b..cc0cf2a3 100644 --- a/stock_request_purchase/views/stock_request_views.xml +++ b/stock_request_purchase/views/stock_request_views.xml @@ -6,7 +6,6 @@ stock.request.form stock.request -
    @@ -16,6 +15,7 @@ class="oe_stat_button" icon="fa-credit-card" attrs="{'invisible': [('purchase_count', '=', 0)]}" + groups="purchase.group_purchase_user" >