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_create_invoice_visibility

Inputs Method Outputs
  • display_type
  • is_recurring_note
  • date_start
  • recurring_next_date
today = fields.Date.context_today(self)
for rec in self:
            if (
                (not rec.display_type or rec.is_recurring_note)
                and rec.date_start
                and today >= rec.date_start
            ):
                rec.create_invoice_visibility = bool(rec.recurring_next_date)
            else:
                rec.create_invoice_visibility = False

Back to entity