Files
odoo-usability/stock_usability/models/stock_location.py
2024-12-19 17:30:14 +01:00

15 lines
465 B
Python

# Copyright 2023 Akretion France (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class StockLocation(models.Model):
_inherit = 'stock.location'
def action_show_quants(self):
self.ensure_one()
action = self.env['stock.quant']._get_quants_action(domain=[('location_id', 'child_of', self.id)])
return action