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.line

Compute Method: _compute_monthly_recurring

Inputs Method Outputs
  • display_type
  • recurring_rule_type
  • recurring_interval
  • price_subtotal
for line in self:
            if line.display_type:
                line.monthly_recurring = 0.0
                continue
            months = _MONTHS_PER_RULE.get(line.recurring_rule_type, 1.0) * (
                line.recurring_interval or 1
            )
            line.monthly_recurring = line.price_subtotal / months if months else 0.0

Back to entity