mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
33 lines
972 B
Python
33 lines
972 B
Python
# Copyright 2022 ForgeFlow <http://www.forgeflow.com>
|
|
|
|
from odoo import _, models
|
|
|
|
|
|
class StockQuant(models.Model):
|
|
_inherit = "stock.quant"
|
|
|
|
def action_reserved_moves(self):
|
|
self.ensure_one()
|
|
action = {
|
|
"name": _("Reserved moves for: " + self.product_id.name),
|
|
"view_mode": "list,form",
|
|
"res_model": "stock.move.line",
|
|
"views": [
|
|
(
|
|
self.env.ref(
|
|
"stock_quant_reservation_info.view_stock_move_line_reserved_info_tree"
|
|
).id,
|
|
"list",
|
|
),
|
|
(False, "form"),
|
|
],
|
|
"type": "ir.actions.act_window",
|
|
"context": {},
|
|
"domain": [
|
|
("product_id", "=", self.product_id.id),
|
|
("product_uom_qty", ">", 0),
|
|
("location_id.usage", "=", "internal"),
|
|
],
|
|
}
|
|
return action
|