stock_usability: clean-up zero-qty quants when opening quants from stock.location
When accessing stock.move.line from the show reservation on quants, in the form view of stock.move.line, have a link to the picking
This commit is contained in:
14
stock_usability/models/stock_location.py
Normal file
14
stock_usability/models/stock_location.py
Normal file
@@ -0,0 +1,14 @@
|
||||
# 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 fields, 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
|
||||
Reference in New Issue
Block a user