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

Module: Purchase

Entity: account.move

Compute Method: _compute_purchase_order_name

Inputs Method Outputs
  • purchase_order_count
  • invoice_line_ids
  • invoice_line_ids.purchase_order_id
  • invoice_line_ids.purchase_order_id.display_name
for move in self:
            if move.purchase_order_count == 1:
                move.purchase_order_name = move.invoice_line_ids.purchase_order_id.display_name
            else:
                move.purchase_order_name = False

Back to entity