# Copyright 2022 ForgeFlow 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