diff --git a/setup/stock_quant_reservation_info_mrp/odoo/addons/stock_quant_reservation_info_mrp b/setup/stock_quant_reservation_info_mrp/odoo/addons/stock_quant_reservation_info_mrp new file mode 120000 index 000000000..7ec26e863 --- /dev/null +++ b/setup/stock_quant_reservation_info_mrp/odoo/addons/stock_quant_reservation_info_mrp @@ -0,0 +1 @@ +../../../../stock_quant_reservation_info_mrp \ No newline at end of file diff --git a/setup/stock_quant_reservation_info_mrp/setup.py b/setup/stock_quant_reservation_info_mrp/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/stock_quant_reservation_info_mrp/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/stock_quant_reservation_info_mrp/README.rst b/stock_quant_reservation_info_mrp/README.rst new file mode 100644 index 000000000..e69de29bb diff --git a/stock_quant_reservation_info_mrp/__init__.py b/stock_quant_reservation_info_mrp/__init__.py new file mode 100644 index 000000000..4b76c7b2d --- /dev/null +++ b/stock_quant_reservation_info_mrp/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from . import models diff --git a/stock_quant_reservation_info_mrp/__manifest__.py b/stock_quant_reservation_info_mrp/__manifest__.py new file mode 100644 index 000000000..abe27b0d4 --- /dev/null +++ b/stock_quant_reservation_info_mrp/__manifest__.py @@ -0,0 +1,17 @@ +# Copyright 2022 ForgeFlow S.L. +# (https://www.forgeflow.com) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +{ + "name": "Stock Move Reservation Info MRP", + "summary": "Allows to see the manufacturing order related to the reserved info of Products", + "version": "14.0.1.0.3", + "author": "ForgeFlow, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/stock-logistics-warehouse", + "category": "Generic", + "depends": ["stock_quant_reservation_info", "mrp"], + "license": "AGPL-3", + "data": ["views/stock_move_line.xml"], + "installable": True, + "auto-install": True, +} diff --git a/stock_quant_reservation_info_mrp/models/__init__.py b/stock_quant_reservation_info_mrp/models/__init__.py new file mode 100644 index 000000000..431f51c27 --- /dev/null +++ b/stock_quant_reservation_info_mrp/models/__init__.py @@ -0,0 +1 @@ +from . import stock_move_line diff --git a/stock_quant_reservation_info_mrp/models/stock_move_line.py b/stock_quant_reservation_info_mrp/models/stock_move_line.py new file mode 100644 index 000000000..edbd9301f --- /dev/null +++ b/stock_quant_reservation_info_mrp/models/stock_move_line.py @@ -0,0 +1,15 @@ +# Copyright 2022 ForgeFlow + +from odoo import models + + +class StockQuant(models.Model): + _inherit = "stock.move.line" + + def action_view_mrp_from_reserved(self): + action = self.env["ir.actions.act_window"]._for_xml_id( + "mrp.mrp_production_action" + ) + action["views"] = [(self.env.ref("mrp.mrp_production_form_view").id, "form")] + action["res_id"] = self.production_id.id + return action diff --git a/stock_quant_reservation_info_mrp/readme/CONTRIBUTORS.rst b/stock_quant_reservation_info_mrp/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..fcd081018 --- /dev/null +++ b/stock_quant_reservation_info_mrp/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* David Jiménez diff --git a/stock_quant_reservation_info_mrp/readme/DESCRIPTION.rst b/stock_quant_reservation_info_mrp/readme/DESCRIPTION.rst new file mode 100644 index 000000000..5ccbe26f3 --- /dev/null +++ b/stock_quant_reservation_info_mrp/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +This module allows to look which pickings, manufacture orders, etc. are reserving the products and check the following source. diff --git a/stock_quant_reservation_info_mrp/readme/USAGE.rst b/stock_quant_reservation_info_mrp/readme/USAGE.rst new file mode 100644 index 000000000..2bc99b449 --- /dev/null +++ b/stock_quant_reservation_info_mrp/readme/USAGE.rst @@ -0,0 +1 @@ +Go to one product and check the quantity on hand, on that view you can see the quantity reserved and the button next to this field allows to see the manufacturing order related to reservations (if it have it). diff --git a/stock_quant_reservation_info_mrp/views/stock_move_line.xml b/stock_quant_reservation_info_mrp/views/stock_move_line.xml new file mode 100644 index 000000000..e00ae1821 --- /dev/null +++ b/stock_quant_reservation_info_mrp/views/stock_move_line.xml @@ -0,0 +1,23 @@ + + + stock.move.line.tree.reserved.info + stock.move.line + + + + + +