[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_id, product_id, picking_partner_id in the detailed operations view. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e2a22c5d71
commit
c9188e4f10
2 changed files with 9 additions and 0 deletions
|
|
@ -23,6 +23,12 @@ class StockMoveLine(models.Model):
|
|||
readonly=True,
|
||||
)
|
||||
|
||||
picking_partner_id = fields.Many2one(
|
||||
related="picking_id.partner_id",
|
||||
store=True,
|
||||
readonly=True,
|
||||
)
|
||||
|
||||
is_collected = fields.Boolean(
|
||||
string="Collected",
|
||||
default=False,
|
||||
|
|
|
|||
|
|
@ -46,6 +46,9 @@
|
|||
<field name="model">stock.move.line</field>
|
||||
<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_id,product_id,picking_partner_id</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='product_id']" position="before">
|
||||
<field name="product_categ_id" readonly="1"/>
|
||||
</xpath>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue