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.recurring.mixin

Compute Method: _compute_next_period_date_start

Inputs Method Outputs
"""Compute the start date of the next billing period."""
for rec in self:
            if rec.last_date_invoiced:
                next_period_date_start = rec.last_date_invoiced + relativedelta(days=1)
            else:
                next_period_date_start = rec.date_start
            if (
                rec.date_end
                and next_period_date_start
                and next_period_date_start > rec.date_end
            ):
                next_period_date_start = False
            rec.next_period_date_start = next_period_date_start

Back to entity