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

Module: Purchase Open Qty

Entity: purchase.order

Compute Method: _compute_qty_to_invoice

Inputs Method Outputs
dp = self.env["decimal.precision"].precision_get("Product Unit of Measure")
for po in self:
            qty_to_invoice = sum(po.mapped("order_line.qty_to_invoice"))
            po.pending_qty_to_invoice = not float_is_zero(
                qty_to_invoice, precision_digits=dp
            )
            po.qty_to_invoice = qty_to_invoice

Back to entity