Skip to content
Health
88/100
good
  • Security25/25
    No findings
  • Activity25/25
    Last human commit 1 month ago
  • Required by20/25
    2 modules depend on it
  • Maturity18/25
    In 3 Odoo series since 12.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
2
Modules depending on it
External deps
1 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.14 MB
Module directory on disk
Code analysis 0 migration notes 5 models 6 views 0 HTTP endpoints

Description

The contract_forecast module enhances the Contract module by generating and managing forecast periods for each contract line. It automatically calculates future invoicing amounts and dates, allowing companies to better anticipate and report on expected revenues.

Forecasts are visible directly from the contract in a pivot view or list view.

## Features

  • Generate forecast periods based on the contract's invoicing rules.
  • View forecasts grouped by invoice date.
  • Automatic regeneration of forecast periods when contract data changes (product, quantity, price, dates, etc.).
  • Company-wide configuration to enable or disable forecasts.
  • Configurable forecast interval and period type (monthly or yearly).
  • Forecast period data includes:
    • Start and end dates
    • Expected invoice date
    • Quantity, unit price, discount, and subtotal (untaxed)
  • Clean handling of auto-renewing and manually-ended contracts.
  • Option to force forecasts to stop at a contract line's end date, even for auto-renewing lines.

Dependencies

Odoo dependencies
Python dependencies
requests
System dependencies
None
Required by
contract_forecast_brand, contract_forecast_variable_quantity

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

Views touched 6

XML IDNameModelTypeStatus
contract_contract_form_view contract.contract form Inherits contract.contract_contract_form_view
contract_line_forecast_period_graph_view contract.line.forecast.period.graph (in contract_forecast) contract.line.forecast.period graph New
contract_line_forecast_period_pivot_view contract.line.forecast.period.pivot (in contract_forecast) contract.line.forecast.period pivot New
contract_line_forecast_period_search_view contract.line.forecast.period search New
contract_line_forecast_period_tree_view contract.line.forecast.period list New
res_config_settings_form_view res.config.settings form Inherits contract.res_config_settings_form_view

HTTP endpoints 0

No HTTP endpoints found for this module.

Models touched 5

New fields (0)

No new fields.

Public methods (2)
  • action_show_contract_forecast(self)
  • write(self, values)

New fields (1)
  • forecast_period_ids One2many → contract.line.forecast.period
    comodel_name='contract.line.forecast.period' inverse_name='contract_line_id' required=False string='Forecast Periods'
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, values)

New fields (14)
  • company_id Many2one → res.company
    comodel_name='res.company' string='Company'
  • contract_id Many2one → contract.contract
    comodel_name='contract.contract' index=True ondelete='cascade' readonly=True related='contract_line_id.contract_id' required=True store=True
  • contract_line_id Many2one → contract.line
    comodel_name='contract.line' index=True ondelete='cascade' readonly=True required=True
  • currency_id Many2one
    related='contract_id.currency_id' store=True
  • date_end Date
    readonly=True required=True
  • date_invoice Date
    readonly=True required=True string='Invoice Date'
  • date_start Date
    readonly=True required=True
  • discount Float
    digits='Discount' help='Discount that is applied in generated invoices. It should be less or equal to 100' string='Discount (%)'
  • name Char
    readonly=True required=True
  • price_subtotal Monetary
    compute='_compute_price_subtotal' store=True string='Amount Untaxed'
  • price_unit Monetary
    string='Unit Price'
  • product_id Many2one → product.product
    comodel_name='product.product' index=True readonly=True related='contract_line_id.product_id' required=True store=True
  • quantity Float
    default=1.0 required=True
  • sequence Integer
    related='contract_line_id.sequence' store=True
Public methods (0)

No public methods.

New fields (4)
  • contract_forecast_interval Integer
    default=12 string='Number of contract forecast Periods'
  • contract_forecast_rule_type Selection
    default='monthly' args: [('monthly', 'Month(s)'), ('yearly', 'Year(s)')]
  • contract_forecast_stop_at_line_date_end Boolean
    default=False string='Stop forecast at contract line end date'
  • enable_contract_forecast Boolean
    default=True string='Enable contract forecast'
Public methods (0)

No public methods.

New fields (4)
  • contract_forecast_interval Integer
    readonly=False related='company_id.contract_forecast_interval'
  • contract_forecast_rule_type Selection
    readonly=False related='company_id.contract_forecast_rule_type'
  • contract_forecast_stop_at_line_date_end Boolean
    readonly=False related='company_id.contract_forecast_stop_at_line_date_end'
  • enable_contract_forecast Boolean
    readonly=False related='company_id.enable_contract_forecast'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…