From bca5ad8570b61250c8292274ca9bb76b5fa7bbaa Mon Sep 17 00:00:00 2001 From: DavidJForgeFlow Date: Wed, 28 Aug 2024 09:27:00 +0200 Subject: [PATCH] [IMP] repair_picking: add dependency to repair_stock, and moving there common methods. --- repair_picking/README.rst | 6 ++--- repair_picking/__manifest__.py | 7 +++--- repair_picking/models/repair.py | 26 -------------------- repair_picking/static/description/index.html | 2 +- repair_picking/views/repair_order_view.xml | 22 ----------------- 5 files changed, 7 insertions(+), 56 deletions(-) delete mode 100644 repair_picking/views/repair_order_view.xml diff --git a/repair_picking/README.rst b/repair_picking/README.rst index 5da12a80d..e6c9c92b5 100644 --- a/repair_picking/README.rst +++ b/repair_picking/README.rst @@ -13,9 +13,9 @@ Repair Picking .. |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 +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-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 diff --git a/repair_picking/__manifest__.py b/repair_picking/__manifest__.py index e1d9ba86e..1f5d67309 100644 --- a/repair_picking/__manifest__.py +++ b/repair_picking/__manifest__.py @@ -3,18 +3,17 @@ { "name": "Repair Picking", - "version": "14.0.1.0.0", + "version": "14.0.1.0.1", "author": "ForgeFlow, Odoo Community Association (OCA)", "category": "Repair", "website": "https://github.com/OCA/manufacture", "summary": "Enhanced repair order management with pickings " "for adding and removing components", - "depends": ["repair", "stock_move_forced_lot", "repair_stock_move"], + "depends": ["stock_move_forced_lot", "repair_stock_move", "repair_stock"], "data": [ "views/stock_warehouse_views.xml", - "views/repair_order_view.xml", ], - "license": "LGPL-3", + "license": "AGPL-3", "installable": True, "auto_install": False, } diff --git a/repair_picking/models/repair.py b/repair_picking/models/repair.py index 69c84edbc..bc85c8759 100644 --- a/repair_picking/models/repair.py +++ b/repair_picking/models/repair.py @@ -23,36 +23,10 @@ class RepairOrder(models.Model): location_id = fields.Many2one( default=_get_default_location_id, ) - - picking_ids = fields.Many2many( - comodel_name="stock.picking", - compute="_compute_picking_ids", - copy=False, - string="Pickings associated to this repair order", - ) - picking_count = fields.Integer( - string="Transfers", copy=False, compute="_compute_picking_ids" - ) procurement_group_id = fields.Many2one( "procurement.group", "Procurement Group", copy=False ) - def action_view_pickings(self): - self.ensure_one() - action = self.env["ir.actions.actions"]._for_xml_id( - "stock.action_picking_tree_all" - ) - action["domain"] = [("id", "in", self.picking_ids.ids)] - return action - - def _compute_picking_ids(self): - for order in self: - moves = self.env["stock.move"].search( - [("repair_line_id", "in", order.operations.ids)] - ) - order.picking_ids = moves.mapped("picking_id") - order.picking_count = len(moves.mapped("picking_id")) - def action_repair_cancel(self): res = super().action_repair_cancel() for picking in self.picking_ids: diff --git a/repair_picking/static/description/index.html b/repair_picking/static/description/index.html index ceed62588..d11ac7556 100644 --- a/repair_picking/static/description/index.html +++ b/repair_picking/static/description/index.html @@ -368,7 +368,7 @@ ul.auto-toc { !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:576ed4d5c0c1e57002a5f0fbd364f753297c27ebe3e35595ae64c9cd000b216d !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

+

Beta License: AGPL-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 diff --git a/repair_picking/views/repair_order_view.xml b/repair_picking/views/repair_order_view.xml deleted file mode 100644 index 7c25297b9..000000000 --- a/repair_picking/views/repair_order_view.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - repair.order.form - repair_stock_move - custom - repair.order - - - - - - - -