From 6707274efe2fee7e2a887734e45d3720a718485c Mon Sep 17 00:00:00 2001 From: Lois Rilo Date: Mon, 17 Jun 2024 11:21:14 +0200 Subject: [PATCH] [FIX] repair_picking: readme structure + issue in tests --- repair_picking/README.rst | 105 ++++ repair_picking/readme/CONFIGURE.rst | 3 + repair_picking/readme/DESCRIPTION.rst | 10 +- repair_picking/readme/USAGE.rst | 30 +- repair_picking/static/description/index.html | 453 ++++++++++++++++++ .../tests/test_stock_repair_order.py | 14 +- 6 files changed, 580 insertions(+), 35 deletions(-) create mode 100644 repair_picking/readme/CONFIGURE.rst create mode 100644 repair_picking/static/description/index.html diff --git a/repair_picking/README.rst b/repair_picking/README.rst index e69de29bb..6f286f38d 100644 --- a/repair_picking/README.rst +++ b/repair_picking/README.rst @@ -0,0 +1,105 @@ +============== +Repair Picking +============== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:7a770249391cf216da563d0a64febf0abd30c9fdae7325803988570d96d8d2f3 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |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%2Fmanufacture-lightgray.png?logo=github + :target: https://github.com/OCA/manufacture/tree/14.0/repair_picking + :alt: OCA/manufacture +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/manufacture-14-0/manufacture-14-0-repair_picking + :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/manufacture&target_branch=14.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module extends the repair management functionality in Odoo, providing additional +options for handling the repair process in a more customizable and efficient way. +It allows the configuration of repair steps based on specific business requirements +and adds new picking types for managing component addition and removal in repair orders. + +The main features are: + +- Customize repair steps: Choose between a 1-step, 2-step, or 3-step repair process. +- Add and remove components during the repair process using separate picking types. +- Associate repair orders with pickings for improved traceability. +- Automatic creation of pickings and procurement routes based on the selected repair steps. +- Manage repair locations and routes more efficiently with warehouse settings. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +#. Navigate to Inventory > Configuration > Warehouses, and select a warehouse. +#. In the "Repair Steps" field, choose between "Repair", "Pick component, repair", or "Pick component, repair, store removed component" to define the repair process. +#. Define the "Repair Location", "Add Component to Repair" picking type, "Remove component from Repair" picking type, and "Repair Route" as needed. + +Usage +===== + +#. Navigate to Repair > Repair Orders and create a new repair order. +#. In the Operations tab, add components to be added or removed during the repair process. +#. Confirm the repair order. This will automatically generate the necessary + pickings based on the configured repair steps. +#. Process the pickings as required during the repair process. +#. If the repair order needs to be canceled, all associated pickings that are not + in "cancel" or "done" state will also be canceled automatically. + +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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* ForgeFlow + +Contributors +~~~~~~~~~~~~ + +* Joan Sisquella + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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/manufacture `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/repair_picking/readme/CONFIGURE.rst b/repair_picking/readme/CONFIGURE.rst new file mode 100644 index 000000000..9ac6f605d --- /dev/null +++ b/repair_picking/readme/CONFIGURE.rst @@ -0,0 +1,3 @@ +#. Navigate to Inventory > Configuration > Warehouses, and select a warehouse. +#. In the "Repair Steps" field, choose between "Repair", "Pick component, repair", or "Pick component, repair, store removed component" to define the repair process. +#. Define the "Repair Location", "Add Component to Repair" picking type, "Remove component from Repair" picking type, and "Repair Route" as needed. diff --git a/repair_picking/readme/DESCRIPTION.rst b/repair_picking/readme/DESCRIPTION.rst index 1c1f9b63f..996f1311b 100644 --- a/repair_picking/readme/DESCRIPTION.rst +++ b/repair_picking/readme/DESCRIPTION.rst @@ -1,10 +1,10 @@ -Repair Management Extension for Odoo -===================================== +This module extends the repair management functionality in Odoo, providing additional +options for handling the repair process in a more customizable and efficient way. +It allows the configuration of repair steps based on specific business requirements +and adds new picking types for managing component addition and removal in repair orders. -This module extends the repair management functionality in Odoo, providing additional options for handling the repair process in a more customizable and efficient way. It allows the configuration of repair steps based on specific business requirements and adds new picking types for managing component addition and removal in repair orders. +The main features are: -Main Features: --------------- - Customize repair steps: Choose between a 1-step, 2-step, or 3-step repair process. - Add and remove components during the repair process using separate picking types. - Associate repair orders with pickings for improved traceability. diff --git a/repair_picking/readme/USAGE.rst b/repair_picking/readme/USAGE.rst index 19650f3a4..e07e5799d 100644 --- a/repair_picking/readme/USAGE.rst +++ b/repair_picking/readme/USAGE.rst @@ -1,23 +1,7 @@ -Getting Started -=============== - -1. Install the module in your Odoo instance. - -2. Navigate to Inventory > Configuration > Warehouses, and select a warehouse. - -3. In the "Repair Steps" field, choose between "Repair", "Pick component, repair", or "Pick component, repair, store removed component" to define the repair process. - -4. Define the "Repair Location", "Add Component to Repair" picking type, "Remove component from Repair" picking type, and "Repair Route" as needed. - -Using the Repair Management Extension -===================================== - -1. Navigate to Repair > Repair Orders and create a new repair order. - -2. In the Operations tab, add components to be added or removed during the repair process. - -3. Confirm the repair order. This will automatically generate the necessary pickings based on the configured repair steps. - -4. Process the pickings as required during the repair process. - -5. If the repair order needs to be canceled, all associated pickings that are not in "cancel" or "done" state will also be canceled automatically. +#. Navigate to Repair > Repair Orders and create a new repair order. +#. In the Operations tab, add components to be added or removed during the repair process. +#. Confirm the repair order. This will automatically generate the necessary + pickings based on the configured repair steps. +#. Process the pickings as required during the repair process. +#. If the repair order needs to be canceled, all associated pickings that are not + in "cancel" or "done" state will also be canceled automatically. diff --git a/repair_picking/static/description/index.html b/repair_picking/static/description/index.html new file mode 100644 index 000000000..7c956335b --- /dev/null +++ b/repair_picking/static/description/index.html @@ -0,0 +1,453 @@ + + + + + +Repair Picking + + + +
+

Repair Picking

+ + +

Beta License: LGPL-3 OCA/manufacture Translate me on Weblate Try me on Runboat

+

This module extends the repair management functionality in Odoo, providing additional +options for handling the repair process in a more customizable and efficient way. +It allows the configuration of repair steps based on specific business requirements +and adds new picking types for managing component addition and removal in repair orders.

+

The main features are:

+
    +
  • Customize repair steps: Choose between a 1-step, 2-step, or 3-step repair process.
  • +
  • Add and remove components during the repair process using separate picking types.
  • +
  • Associate repair orders with pickings for improved traceability.
  • +
  • Automatic creation of pickings and procurement routes based on the selected repair steps.
  • +
  • Manage repair locations and routes more efficiently with warehouse settings.
  • +
+

Table of contents

+ +
+

Configuration

+
    +
  1. Navigate to Inventory > Configuration > Warehouses, and select a warehouse.
  2. +
  3. In the “Repair Steps” field, choose between “Repair”, “Pick component, repair”, or “Pick component, repair, store removed component” to define the repair process.
  4. +
  5. Define the “Repair Location”, “Add Component to Repair” picking type, “Remove component from Repair” picking type, and “Repair Route” as needed.
  6. +
+
+
+

Usage

+
    +
  1. Navigate to Repair > Repair Orders and create a new repair order.
  2. +
  3. In the Operations tab, add components to be added or removed during the repair process.
  4. +
  5. Confirm the repair order. This will automatically generate the necessary +pickings based on the configured repair steps.
  6. +
  7. Process the pickings as required during the repair process.
  8. +
  9. If the repair order needs to be canceled, all associated pickings that are not +in “cancel” or “done” state will also be canceled automatically.
  10. +
+
+
+

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.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • ForgeFlow
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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

+

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

+
+
+
+ + diff --git a/repair_picking/tests/test_stock_repair_order.py b/repair_picking/tests/test_stock_repair_order.py index ea9bb71df..52f3b71f4 100644 --- a/repair_picking/tests/test_stock_repair_order.py +++ b/repair_picking/tests/test_stock_repair_order.py @@ -6,19 +6,15 @@ from odoo.tests import common class TestStockRepairOrder(common.SavepointCase): @classmethod - def setUp(cls): - super(TestStockRepairOrder, cls).setUpClass() + def setUpClass(cls): + super().setUpClass() cls.repair_model = cls.env["repair.order"] cls.repair_line_model = cls.env["repair.line"] cls.product_model = cls.env["product.product"] cls.stock_location_model = cls.env["stock.location"] cls.warehouse_model = cls.env["stock.warehouse"] - cls.company = cls.env["res.company"].create( - { - "name": "My Test Company", - } - ) + cls.company = cls.env.ref("base.main_company") cls.warehouse = cls.warehouse_model.create( { "name": "Test Warehouse", @@ -136,6 +132,7 @@ class TestStockRepairOrder(common.SavepointCase): } ) repair_order.action_repair_confirm() + repair_order._compute_picking_ids() self.assertEqual(repair_order.state, "confirmed") self.assertTrue(repair_order.picking_ids) self.assertEqual(len(repair_order.picking_ids), 1) @@ -185,6 +182,7 @@ class TestStockRepairOrder(common.SavepointCase): } ) repair_order.action_repair_confirm() + repair_order._compute_picking_ids() self.assertEqual(repair_order.state, "confirmed") self.assertTrue(repair_order.picking_ids) self.assertEqual(len(repair_order.picking_ids), 2) @@ -225,6 +223,7 @@ class TestStockRepairOrder(common.SavepointCase): } ) repair_order.action_repair_confirm() + repair_order._compute_picking_ids() self.assertEqual(repair_order.state, "confirmed") self.assertTrue(repair_order.picking_ids) self.assertEqual(len(repair_order.picking_ids), 1) @@ -263,4 +262,5 @@ class TestStockRepairOrder(common.SavepointCase): "location_dest_id": self.repair_location.id, } ) + repair_order._compute_picking_ids() self.assertEqual(len(repair_order.picking_ids), 2)