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

Module: Recurring - Contracts Management

Entity: contract.template.line

Compute Method: _compute_price_subtotal

Inputs Method Outputs
for line in self:
            subtotal = line.quantity * line.price_unit
            subtotal *= 1 - (line.discount / 100)
            cur = (
                line.contract_id.pricelist_id.currency_id
                if line.contract_id.pricelist_id
                else None
            )
            line.price_subtotal = cur.round(subtotal) if cur else subtotal

Back to entity