Files
Patrick Hoste a54f3852d6 [IMP] crm: add recurring revenues feature
PURPOSE

Allow users to configure contract recurrences and Monthly Recurring Revenues
on Opportunities they're trying to close. One short revenues are not sufficient
to cover real life use cases of CRM revenu analysis.

SPECIFICATIONS

Adds an option in the settings to activate the recurring revenue feature.
This feature is set on an opportunity to indicate a revenue that could be
perceived over time. This time indicator is set by the crm.recurring.plan
model in which the number of months is determined.

By default some plans are added in data. When using plans, revenues are
computed across the plan months.

LINKS

Task ID-2283052
odoo/odoo#54194
odoo/enterprise#12423
odoo/upgrade#1463

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-14 12:59:30 +00:00

20 lines
657 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class RecurringPlan(models.Model):
_name = "crm.recurring.plan"
_description = "CRM Recurring revenue plans"
_order = "sequence"
name = fields.Char('Plan Name', required=True, translate=True)
number_of_months = fields.Integer('# Months', required=True)
active = fields.Boolean('Active', default=True)
sequence = fields.Integer('Sequence', default=10)
_sql_constraints = [
('check_number_of_months', 'CHECK(number_of_months >= 0)', 'The number of month can\'t be negative.'),
]