[14.0][ADD] stock_quant_reservation_info_mrp

This commit is contained in:
DavidJForgeFlow
2022-10-06 17:50:53 +02:00
parent a9c34525f2
commit 93c09635bd
11 changed files with 69 additions and 0 deletions

View File

@@ -0,0 +1 @@
../../../../stock_quant_reservation_info_mrp

View File

@@ -0,0 +1,6 @@
import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

View File

@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import models

View File

@@ -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,
}

View File

@@ -0,0 +1 @@
from . import stock_move_line

View File

@@ -0,0 +1,15 @@
# Copyright 2022 ForgeFlow <http://www.forgeflow.com>
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

View File

@@ -0,0 +1 @@
* David Jiménez <david.jimenez@forgeflow.com>

View File

@@ -0,0 +1 @@
This module allows to look which pickings, manufacture orders, etc. are reserving the products and check the following source.

View File

@@ -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).

View File

@@ -0,0 +1,23 @@
<odoo>
<record id="view_stock_move_line_reserved_info_tree" model="ir.ui.view">
<field name="name">stock.move.line.tree.reserved.info</field>
<field name="model">stock.move.line</field>
<field
name="inherit_id"
ref="stock_quant_reservation_info.view_stock_move_line_reserved_info_tree"
/>
<field name="arch" type="xml">
<button name="action_view_picking_from_reserved" position="after">
<field name="production_id" string="Manufacturing Order" />
<button
name="action_view_mrp_from_reserved"
type="object"
class="btn btn-link text-info"
icon="fa-arrow-right"
title="Related MO"
attrs="{'invisible': [('production_id', '=', False)]}"
/>
</button>
</field>
</record>
</odoo>