[IMP] stock_picking_batch_custom: order detailed ops by category, product, partner

Override _order on stock.move.line using the existing stored Many2one fields.
Odoo JOINs product.category and uses its _order (complete_name, which is stored)
so the full category path is used for sorting without any extra fields.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
GitHub Copilot 2026-05-28 20:22:18 +02:00
parent f5670906f9
commit 6125515772
2 changed files with 2 additions and 23 deletions

View file

@ -47,7 +47,7 @@
<field name="inherit_id" ref="stock_picking_batch.view_move_line_tree"/>
<field name="arch" type="xml">
<xpath expr="//list" position="attributes">
<attribute name="default_order">product_categ_complete_name,product_name,partner_name</attribute>
<attribute name="default_order">product_categ_id,product_id,picking_partner_id</attribute>
<attribute name="class">o_batch_move_line_list</attribute>
</xpath>
<xpath expr="//field[@name='product_id']" position="before">