Repository
OCA/credit-control · module folder · Try on Runboat
Module version
1.0.0
Category
Accounting
Folder size
2.23 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/credit-control
Last tracking update
2026-08-07 09:06:36
Authors
Odoo Community Association (OCA), Tecnativa
Maintainers
Odoo Community Association (OCA), Tecnativa
Committers
Weblate, OCA-git-bot, oca-ci, Pablo Cortés
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
sale_financial_risk, sale_financial_risk_info
Description
Adds a new page in partner to manage its *Financial Risk*. (Only visible
for User or Manager Financial Risk groups)

If any limit is exceeded, you won't be able to confirm any of its
invoices unless you are authorized (Financial Risk Manager group). You
can click in risk amount to view amount origin.

![](../static/description/financial_risk_click.png)

When a non-zero credit limit is set, the last modification date is saved
and displayed next to the credit limit.

Optionally, the credit information can be shown in the portal view
for the customer, if configured accordingly.

![](../static/description/financial_risk_portal.png)

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
financial_risk_account_move_line_pivot_view Account financial risk account move line pivot view account.move.line pivot New
financial_risk_info financial_risk_info ir.ui.view qweb New
partner_risk_exceeded_wizard Partner risk exceeded partner.risk.exceeded.wiz form New
res_config_settings_view_form res.config.settings.view.form.inherit.partner.financial.risk res.config.settings form Inherits account.res_config_settings_view_form
res_partner_view_risk res.partner.view.risk res.partner form Inherits base.view_partner_form
side_content side_content ir.ui.view qweb Inherits portal.side_content
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (6)

New fields (2)
  • risk_amount_total_currency Monetary
    compute='_compute_risk_amount_total_currency' currency_field='risk_currency_id' string='Risk Amount Total'
  • risk_currency_id Many2one
    related='partner_id.risk_currency_id'
Public methods (2)
  • action_post(self)
  • risk_exception_msg(self)

New fields (4)
  • continue_method Char
  • exception_msg Text
    readonly=True
  • origin_reference Reference
    string='Object' args: <expr>
  • partner_id Many2one → res.partner
    comodel_name='res.partner' readonly=True string='Customer'
Public methods (2)
  • action_show(self)
  • button_continue(self)

New fields (2)
  • allow_overrisk_invoice_validation Boolean
    help='Always allow the validation of draft invoices. Useful when the flow comes from sales orders and the over-risk has already been allowed when confirming these.' string='Allow invoice validation over the risk'
  • invoice_unpaid_margin Integer
    help='Days after due date to set an invoice as unpaid. The change of this field recompute all partners risk, be patient.' string='Maturity Margin'
Public methods (0)

No public methods.

New fields (3)
  • allow_overrisk_invoice_validation Boolean
    readonly=False related='company_id.allow_overrisk_invoice_validation'
  • invoice_unpaid_margin Integer
    readonly=False related='company_id.invoice_unpaid_margin'
  • portal_show_financial_risk Boolean
    config_parameter='account_financial_risk.portal_show_financial_risk' help='If enabled, portal users will be able to see their credit information.' string='Show credit information in portal'
Public methods (0)

No public methods.

New fields (30)
  • credit_currency Selection
    default='company' selection=[('company', 'Company Currency'), ('receivable', 'Receivable Currency'), ('pricelist', 'Pricelist Currency'), ('manual', 'Manual Credit Currency')] tracking=True
  • credit_limit Float
    tracking=True
  • credit_policy Char
  • date_credit_limit Date
    compute='_compute_date_credit_limit' readonly=False store=True string='Last Credit Limit Date'
  • manual_credit_currency_id Many2one → res.currency
    comodel_name='res.currency' string='Manual Credit Currency'
  • move_line_ids One2many → account.move.line
    comodel_name='account.move.line' inverse_name='partner_id' string='Account Moves'
  • portal_show_financial_risk_visible Boolean
    compute='_compute_portal_show_financial_risk_visible' help='Helper field to control visibility of the partner option based on global config.'
  • risk_account_amount Monetary
    compute='_compute_risk_account_amount' compute_sudo=True currency_field='risk_currency_id' help='Residual amount of move lines not reconciled with distinct account that is set as partner receivable and date maturity not exceeded, considering Due Margin set in account settings.' string='Total Other Account Open Amount'
  • risk_account_amount_include Boolean
    help='Full risk computation.\nResidual amount of move lines not reconciled with distinct account that is set as partner receivable and date maturity not exceeded, considering Due Margin set in account settings.' string='Include Other Account Open Amount'
  • risk_account_amount_limit Monetary
    currency_field='risk_currency_id' help='Set 0 if it is not locked' string='Limit Other Account Open Amount'
  • risk_account_amount_unpaid Monetary
    compute='_compute_risk_account_amount' compute_sudo=True currency_field='risk_currency_id' help='Residual amount of move lines not reconciled with distinct account that is set as partner receivable and date maturity exceeded, considering Due Margin set in account settings.' string='Total Other Account Unpaid Amount'
  • risk_account_amount_unpaid_include Boolean
    help='Full risk computation.\nResidual amount of move lines not reconciled with distinct account that is set as partner receivable and date maturity exceeded, considering Due Margin set in account settings.' string='Include Other Account Unpaid Amount'
  • risk_account_amount_unpaid_limit Monetary
    currency_field='risk_currency_id' help='Set 0 if it is not locked' string='Limit Other Account Unpaid Amount'
  • risk_allow_edit Boolean
    compute='_compute_risk_allow_edit'
  • risk_amount_exceeded Monetary
    compute='_compute_risk_exception' currency_field='risk_currency_id' string='Risk Over Limit'
  • risk_currency_id Many2one → res.currency
    comodel_name='res.currency' compute='_compute_credit_currency'
  • risk_exception Boolean
    compute='_compute_risk_exception' help='It Indicate if partner risk exceeded' search='_search_risk_exception'
  • risk_invoice_draft Monetary
    compute='_compute_risk_account_amount' compute_sudo=True currency_field='risk_currency_id' help='Total amount of invoices in Draft or Pro-forma state' string='Total Draft Invoices'
  • risk_invoice_draft_include Boolean
    help='Full risk computation' string='Include Draft Invoices'
  • risk_invoice_draft_limit Monetary
    currency_field='risk_currency_id' help='Set 0 if it is not locked' string='Limit In Draft Invoices'
  • risk_invoice_open Monetary
    compute='_compute_risk_account_amount' compute_sudo=True currency_field='risk_currency_id' help='Residual amount of move lines not reconciled with the same account that is set as partner receivable and date maturity not exceeded, considering Due Margin set in account settings.' string='Total Open Invoices/Principal Balance'
  • risk_invoice_open_include Boolean
    help='Full risk computation.\nResidual amount of move lines not reconciled with the same account that is set as partner receivable and date maturity not exceeded, considering Due Margin set in account settings.' string='Include Open Invoices/Principal Balance'
  • risk_invoice_open_limit Monetary
    currency_field='risk_currency_id' help='Set 0 if it is not locked' string='Limit In Open Invoices/Principal Balance'
  • risk_invoice_unpaid Monetary
    compute='_compute_risk_account_amount' compute_sudo=True currency_field='risk_currency_id' help='Residual amount of move lines not reconciled with the same account that is set as partner receivable and date maturity exceeded, considering Due Margin set in account settings.' string='Total Unpaid Invoices/Principal Balance'
  • risk_invoice_unpaid_include Boolean
    help='Full risk computation.\nResidual amount of move lines not reconciled with the same account that is set as partner receivable and date maturity exceeded, considering Due Margin set in account settings.' string='Include Unpaid Invoices/Principal Balance'
  • risk_invoice_unpaid_limit Monetary
    currency_field='risk_currency_id' help='Set 0 if it is not locked' string='Limit In Unpaid Invoices/Principal Balance'
  • risk_remaining_percentage Float
    compute='_compute_risk_remaining' search='_search_risk_remaining_percentage' string='Risk Remaining (Percentage)'
  • risk_remaining_value Monetary
    compute='_compute_risk_remaining' currency_field='risk_currency_id' string='Risk Remaining (Value)'
  • risk_total Monetary
    compute='_compute_risk_exception' currency_field='risk_currency_id' help='Sum of total risk included' string='Total Risk'
  • show_financial_risk_in_portal Boolean
    default=True help='If enabled, this partner will see their financial risk in the portal, provided the global setting is also enabled.' string='Show credit information in portal'
Public methods (1)
  • open_risk_pivot_info(self)

New fields (0)

No new fields.

Public methods (1)
  • validate_move(self)

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…