[IMP] stock_usability: improve quants: allow groupby product category and show available qté in tree view of Inventory > Analysis > Locations

This commit is contained in:
Alexis de Lattre
2025-06-23 09:53:09 +00:00
parent 6567d6ad29
commit e05102d807
2 changed files with 18 additions and 13 deletions

View File

@@ -10,6 +10,9 @@ class StockQuant(models.Model):
product_barcode = fields.Char(
related='product_id.barcode', string="Product Barcode")
# product_categ_id is a native related field, but it lacks store=True
# to allow groupby
product_categ_id = fields.Many2one(store=True)
def action_stock_move_lines_reserved(self):
self.ensure_one()