From 8b9995526e17f10f72a99e97505debd61c7bfabf Mon Sep 17 00:00:00 2001 From: GitHub Copilot Date: Thu, 28 May 2026 20:01:17 +0200 Subject: [PATCH] [IMP] stock_picking_batch_custom: order detailed ops by category, product, partner Store picking_partner_id on stock.move.line and set default_order to product_categ_complete_name, product_id, picking_partner_id in the detailed operations view so sorting uses the full category path (e.g. 'SECO ENVASADO / Aperitivos') instead of only the leaf name. Co-Authored-By: Claude Sonnet 4.6 --- stock_picking_batch_custom/models/stock_move_line.py | 7 +++++++ .../views/stock_picking_batch_views.xml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/stock_picking_batch_custom/models/stock_move_line.py b/stock_picking_batch_custom/models/stock_move_line.py index 5f921cd..9d73b53 100644 --- a/stock_picking_batch_custom/models/stock_move_line.py +++ b/stock_picking_batch_custom/models/stock_move_line.py @@ -17,6 +17,13 @@ class StockMoveLine(models.Model): readonly=True, ) + product_categ_complete_name = fields.Char( + string="Product Category Path", + related="product_id.categ_id.complete_name", + store=True, + readonly=True, + ) + product_default_code = fields.Char( string="Product Code", related="product_id.default_code", diff --git a/stock_picking_batch_custom/views/stock_picking_batch_views.xml b/stock_picking_batch_custom/views/stock_picking_batch_views.xml index d84b319..3282d5c 100644 --- a/stock_picking_batch_custom/views/stock_picking_batch_views.xml +++ b/stock_picking_batch_custom/views/stock_picking_batch_views.xml @@ -47,7 +47,7 @@ - product_categ_id,product_id,picking_partner_id + product_categ_complete_name,product_id,picking_partner_id o_batch_move_line_list