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_termination_notice_date

Inputs Method Outputs
  • date_end
  • termination_notice_rule_type
  • termination_notice_interval
for rec in self:
            if rec.date_end:
                rec.termination_notice_date = rec.date_end - self.get_relative_delta(
                    rec.termination_notice_rule_type,
                    rec.termination_notice_interval,
                )
            else:
                rec.termination_notice_date = False

Back to entity