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

Module: Stock Picking Partner Note

Entity: stock.picking

Compute Method: _compute_note

Inputs Method Outputs
  • picking_type_id
  • picking_type_id.partner_note_type_ids
  • partner_id
  • partner_id.stock_picking_note_ids
for picking in self:
            picking_type_note_type_ids = picking.picking_type_id.partner_note_type_ids
            picking_notes = picking.partner_id.stock_picking_note_ids.filtered(
                lambda n, ptnts=picking_type_note_type_ids: n.active
                and n.note_type_id in ptnts
            )
            picking_notes = [
                html_escape(note.name.strip())
                for note in picking_notes
                if note.name and note.name.strip()
            ]
            picking.note = "<br />".join(picking_notes)

Back to entity