mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[14.0][MIG] stock_quant_view_reservation
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
"name": "Stock Quant View Reservation",
|
"name": "Stock Quant View Reservation",
|
||||||
"summary": """
|
"summary": """
|
||||||
Allows to see details of reservations on a quant""",
|
Allows to see details of reservations on a quant""",
|
||||||
"version": "13.0.1.0.0",
|
"version": "14.0.1.0.0",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
|
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
|
||||||
"website": "https://github.com/OCA/stock-logistics-warehouse",
|
"website": "https://github.com/OCA/stock-logistics-warehouse",
|
||||||
|
|||||||
@@ -10,7 +10,10 @@ class StockQuant(models.Model):
|
|||||||
|
|
||||||
def action_view_reservations(self):
|
def action_view_reservations(self):
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
action = self.env.ref("stock.stock_move_line_action").read([])[0]
|
action = self.env["ir.actions.act_window"]._for_xml_id(
|
||||||
|
"stock.stock_move_line_action"
|
||||||
|
)
|
||||||
|
action["domain"] = [("product_qty", ">", 0)]
|
||||||
action.update(
|
action.update(
|
||||||
{
|
{
|
||||||
"context": {
|
"context": {
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
* Cédric Pigeon <cedric.pigeon@acsone.eu>
|
* Cédric Pigeon <cedric.pigeon@acsone.eu>
|
||||||
|
* Xavier Bouquiaux <xavier.bouquiaux@acsone.eu>
|
||||||
|
|||||||
@@ -2,15 +2,24 @@
|
|||||||
<!-- Copyright 2020 ACSONE SA/NV
|
<!-- Copyright 2020 ACSONE SA/NV
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
||||||
<odoo>
|
<odoo>
|
||||||
<record model="ir.ui.view" id="stock_quant_tree_view">
|
<record model="ir.ui.view" id="stock_quant_tree_view_editable">
|
||||||
<field name="name">stock.quant.tree (in stock_quant_view_reservations)</field>
|
<field
|
||||||
|
name="name"
|
||||||
|
>stock.quant.tree.editable (in stock_quant_view_reservations)</field>
|
||||||
<field name="model">stock.quant</field>
|
<field name="model">stock.quant</field>
|
||||||
<field name="inherit_id" ref="stock.view_stock_quant_tree_editable" />
|
<field name="inherit_id" ref="stock.view_stock_quant_tree_editable" />
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<field name="reserved_quantity" position="attributes">
|
<field name="quantity" position="after">
|
||||||
<attribute name="optional" />
|
<button name="action_view_reservations" type="object" icon="fa-eye" />
|
||||||
</field>
|
</field>
|
||||||
<field name="reserved_quantity" position="after">
|
</field>
|
||||||
|
</record>
|
||||||
|
<record model="ir.ui.view" id="stock_quant_tree_view">
|
||||||
|
<field name="name">stock.quant.tree (in stock_quant_view_reservations)</field>
|
||||||
|
<field name="model">stock.quant</field>
|
||||||
|
<field name="inherit_id" ref="stock.view_stock_quant_tree" />
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<field name="quantity" position="after">
|
||||||
<button name="action_view_reservations" type="object" icon="fa-eye" />
|
<button name="action_view_reservations" type="object" icon="fa-eye" />
|
||||||
</field>
|
</field>
|
||||||
</field>
|
</field>
|
||||||
|
|||||||
Reference in New Issue
Block a user