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

Module: Purchase Work Acceptance

Entity: purchase.order

Compute Method: _compute_wa_accepted

Inputs Method Outputs
  • order_line
for order in self:
            lines = order.order_line.filtered(
                lambda line: line.product_qty > 0 and line.qty_to_accept > 0
            )
            order.wa_accepted = not any(lines)

Back to entity