Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Stock Move Line Reference Link

Entity: stock.move.line

Compute Method: _compute_linked_reference

Inputs Method Outputs
  • move_id
  • move_id.picking_id
for move_line in self:
            record = (
                move_line.move_id.picking_id
                if move_line.move_id.picking_id
                else move_line.move_id
            )
            if record:
                move_line.linked_reference = f"{record._name},{record.id or 0}"
            else:
                move_line.linked_reference = False

Back to entity