[IMP] stock_picking_batch_custom: show product code as separate optional column

Add product_default_code related field to stock.move.line and
stock.picking.batch.summary.line. Show it as a hidden-by-default column
to the right of product_id in both detailed operations and product summary
views. Hide the code prefix from the product name via display_default_code
context so sorting is alphabetical.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
GitHub Copilot 2026-05-21 16:44:54 +02:00
parent f25d2b5e2c
commit 9547193083
3 changed files with 19 additions and 3 deletions

View file

@ -17,6 +17,12 @@ class StockMoveLine(models.Model):
readonly=True,
)
product_default_code = fields.Char(
string="Product Code",
related="product_id.default_code",
readonly=True,
)
is_collected = fields.Boolean(
string="Collected",
default=False,