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_automatic_price

Inputs Method Outputs
"""Reset automatic price if contract is switched to 'purchase'."""
self.filtered(
            lambda line: line.contract_id.contract_type == "purchase"
            and line.automatic_price
        ).automatic_price = False

Back to entity