Skip to content
Health
80/100
good
  • Security25/25
    No findings
  • Activity25/25
    Last human commit 1 month ago
  • Required by5/25
    0 modules depend on it
  • Maturity25/25
    In 9 Odoo series since 10.0

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

Security findings
Grave / minor (static analysis)
Required by
0
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.89 MB
Module directory on disk
Code analysis 0 migration notes 9 models 5 views 0 HTTP endpoints

Description

This module adds support for products to be linked to contract templates.

A contract is created on sale.order confirmation for each different template used in sale order line where recurrence details are set too.

Contract product are ignored on invoicing process and pass to nothing to invoice directly.

Dependencies

Odoo dependencies
Python dependencies
python-dateutil
System dependencies
None
Required by
None

Code analysis

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

Views touched 5

XML IDNameModelTypeStatus
contract_contract_customer_form_view contract.contract form Inherits contract.contract_contract_customer_form_view
product_contract_configurator_form product.contract.configurator form New
product_template_form_contract_view account.invoice.select.contract product.template form Inherits product.product_template_form_view
res_config_settings_form_view res.config.settings.form (in product_contract) res.config.settings form Inherits sale.res_config_settings_view_form
view_order_form sale.order.form (in product_contract) sale.order form Inherits sale.view_order_form

HTTP endpoints 0

No HTTP endpoints found for this module.

Models touched 9

New fields (1)
  • sale_order_count Integer
    compute='_compute_sale_order_count'
Public methods (1)
  • action_view_sales_orders(self)

New fields (1)
  • sale_order_line_id Many2one → sale.order.line
    comodel_name='sale.order.line' copy=False required=False
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (16)
  • auto_renew_interval Integer
    default=1 help='Renew every (Days/Week/Month/Year)' string='Renew Every'
  • auto_renew_rule_type Selection
    default='yearly' help='Specify Interval for automatic renewal.' string='Renewal type' args: [('daily', 'Day(s)'), ('weekly', 'Week(s)'), ('monthly', 'Month(s)'), ('yearly', 'Year(s)')]
  • contract_start_date_method Selection
    default='manual' help="This field allows to define how the start date of the contract will\n be calculated:\n\n - Manual: The start date will be selected by the user, by default will be the\n date of sale confirmation.\n - Start of current period: The start date will be the first day of the actual\n period selected on 'Invoicing Every' field. Example: If we are on 2024/08/27\n and the period selected is 'Year(s)' the start date will be 2024/01/01.\n - End of current period: The start date will be the last day of the actual\n period selected on 'Invoicing Every' field. Example: If we are on 2024/08/27\n and the period selected is 'Year(s)' the start date will be 2024/12/31.\n - Start of next period: The start date will be the first day of the next\n period selected on 'Invoicing Every' field. Example: If we are on 2024/08/27\n and the period selected is 'Year(s)' the start date will be 2025/01/01.\n - End of next period: The start date will be the last day of the actual\n period selected on 'Invoicing Every' field. Example: If we are on 2024/08/27\n and the period selected is 'Year(s)' the start date will be 2025/12/31.\n " args: [('manual', 'Manual'), ('start_this', 'Start of current period'), ('end_this', 'End of current period'), ('start_next', 'Start of next period'), ('end_next', 'End of next period')], 'Start Date Method'
  • force_month_quarterly Selection
    help='Force the month to be used inside the quarter' args: [('1', 'First month'), ('2', 'Second month'), ('3', 'Third month')], 'Force Month (quarterly)'
  • force_month_semesterly Selection
    help='Force the month to be used inside the semester' args: [('1', 'First month'), ('2', 'Second month'), ('3', 'Third month'), ('4', 'Fourth month'), ('5', 'Fifth month'), ('6', 'Sixth month')], 'Force Month (semesterly)'
  • force_month_yearly Selection
    args: [('1', 'January'), ('2', 'February'), ('3', 'March'), ('4', 'April'), ('5', 'May'), ('6', 'June'), ('7', 'July'), ('8', 'August'), ('9', 'September'), ('10', 'October'), ('11', 'November'), ('12', 'December')], 'Force Month'
  • is_auto_renew Boolean
    default=False string='Auto Renew'
  • is_contract Boolean
    args: 'Is a contract'
  • property_contract_template_id Many2one → contract.template
    comodel_name='contract.template' company_dependent=True string='Contract Template'
  • recurrence_interval Selection
    default='monthly' help='Define the length of each recurrence period (e.g., every 1 month, every 3 months).' args: [('monthly', 'Month(s)'), ('quarterly', 'Quarter(s)'), ('semesterly', 'Semester(s)'), ('yearly', 'Year(s)')]
  • recurrence_number Integer
    default=1 help='Total number of recurrence periods for the contract.' string='Number of Recurrences'
  • recurring_interval Integer
    default=1 help='Frequency at which invoices are generated (e.g., every 1 month, every 2 weeks).' string='Invoice Every'
  • recurring_invoicing_type Selection
    default='pre-paid' help='Define whether invoices are issued before (prepaid) or after (postpaid) the service period.' string='Invoicing type' args: [('pre-paid', 'Pre-paid'), ('post-paid', 'Post-paid')]
  • recurring_rule_type Selection
    default='monthly' help='Specify the time unit for generating recurring invoices (days, weeks, months, etc.).' string='Invoicing Recurrence' args: [('daily', 'Day(s)'), ('weekly', 'Week(s)'), ('monthly', 'Month(s)'), ('monthlylastday', 'Month(s) last day'), ('quarterly', 'Quarter(s)'), ('semesterly', 'Semester(s)'), ('yearly', 'Year(s)')]
  • termination_notice_interval Integer
    default=1 string='Termination Notice Before'
  • termination_notice_rule_type Selection
    default='monthly' string='Termination Notice type' args: [('daily', 'Day(s)'), ('weekly', 'Week(s)'), ('monthly', 'Month(s)')]
Public methods (1)
  • write(self, vals)

New fields (1)
  • create_contract_at_sale_order_confirmation Boolean
    default=True string='Automatically Create Contracts At Sale Order Confirmation'
Public methods (0)

No public methods.

New fields (1)
  • create_contract_at_sale_order_confirmation Boolean
    readonly=False related='company_id.create_contract_at_sale_order_confirmation'
Public methods (0)

No public methods.

New fields (3)
  • contract_count Integer
    compute='_compute_contract_count'
  • is_contract Boolean
    compute='_compute_is_contract' string='Is a contract'
  • need_contract_creation Boolean
    compute='_compute_need_contract_creation'
Public methods (3)
  • action_confirm(self)
    If we have a contract in the order, set it up
  • action_create_contract(self)
  • action_show_contracts(self)

New fields (0)

No new fields.

Public methods (1)
  • create_contract_line(self, contract)

New fields (19)
  • auto_renew_interval Integer
    compute='_compute_product_contract_data' help='Renew every (Days/Week/Month/Year)' precompute=True readonly=False store=True string='Renew Every'
  • auto_renew_rule_type Selection
    compute='_compute_product_contract_data' help='Specify Interval for automatic renewal.' precompute=True readonly=False store=True string='Renewal type' args: [('daily', 'Day(s)'), ('weekly', 'Week(s)'), ('monthly', 'Month(s)'), ('yearly', 'Year(s)')]
  • company_id Many2one → res.company
    args: 'res.company'
  • contract_id Many2one → contract.contract
    comodel_name='contract.contract'
  • contract_line_id Many2one → contract.line
    comodel_name='contract.line' required=False string='Contract Line to replace'
  • contract_start_date_method Selection
    compute='_compute_product_contract_data' help="This field allows to define how the start date of the contract will\n be calculated:\n\n - Manual: The start date will be selected by the user, by default will be the\n date of sale confirmation.\n - Start of current period: The start date will be the first day of the actual\n period selected on 'Invoicing Every' field. Example: If we are on 2024/08/27\n and the period selected is 'Year(s)' the start date will be 2024/01/01.\n - End of current period: The start date will be the last day of the actual\n period selected on 'Invoicing Every' field. Example: If we are on 2024/08/27\n and the period selected is 'Year(s)' the start date will be 2024/12/31.\n - Start of next period: The start date will be the first day of the next\n period selected on 'Invoicing Every' field. Example: If we are on 2024/08/27\n and the period selected is 'Year(s)' the start date will be 2025/01/01.\n - End of next period: The start date will be the last day of the actual\n period selected on 'Invoicing Every' field. Example: If we are on 2024/08/27\n and the period selected is 'Year(s)' the start date will be 2025/12/31.\n " precompute=True readonly=False store=True args: [('manual', 'Manual'), ('start_this', 'Start of current period'), ('end_this', 'End of current period'), ('start_next', 'Start of next period'), ('end_next', 'End of next period')], 'Start Date Method'
  • contract_template_id Many2one → contract.template
    comodel_name='contract.template' compute='_compute_contract_template_id'
  • date_end Date
    compute='_compute_contract_line_date_end' precompute=True readonly=False store=True
  • date_start Date
    compute='_compute_contract_line_date_start' precompute=True readonly=False store=True
  • is_auto_renew Boolean
    compute='_compute_product_contract_data' precompute=True readonly=False store=True string='Auto Renew'
  • is_contract Boolean
    related='product_id.is_contract' string='Is a contract'
  • partner_id Many2one → res.partner
    args: 'res.partner'
  • product_id Many2one → product.product
    args: 'product.product'
  • product_uom_qty Float
    args: 'Quantity'
  • recurrence_interval Selection
    compute='_compute_product_contract_data' help='Specify Interval for contract duration.' precompute=True readonly=False store=True args: [('monthly', 'Month(s)'), ('quarterly', 'Quarter(s)'), ('semesterly', 'Semester(s)'), ('yearly', 'Year(s)')]
  • recurrence_number Integer
    compute='_compute_product_contract_data' precompute=True readonly=False store=True
  • recurring_interval Integer
    compute='_compute_product_contract_data' help='Invoice every (Days/Week/Month/Year)' precompute=True readonly=False store=True string='Invoice Every'
  • recurring_invoicing_type Selection
    compute='_compute_product_contract_data' help='Specify if the invoice must be generated at the beginning (pre-paid) or end (post-paid) of the period.' precompute=True readonly=False store=True string='Invoicing type' args: [('pre-paid', 'Pre-paid'), ('post-paid', 'Post-paid')]
  • recurring_rule_type Selection
    compute='_compute_product_contract_data' help='Specify Interval for automatic invoice generation.' precompute=True readonly=False store=True string='Recurrence' args: [('daily', 'Day(s)'), ('weekly', 'Week(s)'), ('monthly', 'Month(s)'), ('monthlylastday', 'Month(s) last day'), ('quarterly', 'Quarter(s)'), ('semesterly', 'Semester(s)'), ('yearly', 'Year(s)')]
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…