Account Credit Control

account_credit_control
REPOSITORY
REPOSITORYOCA/credit-control
GIT
GIThttps://github.com/OCA/credit-control.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/credit-control/tree/19.0/account_credit_control
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYFinance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA), Camptocamp, ACSONE SA/NV, Okia, Access Bookings
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, andrea
WEBSITE
WEBSITEhttps://github.com/OCA/credit-control
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:40:50
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
    - account
    - base_setup
    - web
    - onboarding
    - product
    - mail
    - bus
    - web_tour
    - html_editor
    - uom
    - analytic
    - portal
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Account Credit Control module is a part of Financial Tools used in
business to ensure that once sales are made they are realised as cash.
This module helps to identify outstanding debt beyond tolerance level
and setup followup method.

Code Analysis

Views touched (28)
XML IDNameModelTypeStatus
credit_control_analysis_pivot_view credit.control.analysis.pivot (in account_credit_control_analysis) credit.control.analysis pivot New
credit_control_analysis_tree_view credit.control.analysis.tree (in account_credit_control_analysis) credit.control.analysis list New
credit_control_communication_form_view credit.control.communication.form credit.control.communication form New
credit_control_communication_search_view Credit Control Communications credit.control.communication search New
credit_control_communication_tree_view credit.control.communication.list credit.control.communication list New
credit_control_company_form credit.control.company.form res.company field Inherits base.view_company_form
credit_control_line_form credit.control.line.form credit.control.line form New
credit_control_line_search Credit Control Lines credit.control.line search New
credit_control_line_tree credit.control.line.list credit.control.line list New
credit_control_policy_changer_form credit control policy form credit.control.policy.changer form New
credit_control_policy_form credit.control.policy.form credit.control.policy form New
credit_control_policy_level_tree credit.control.policy.level.list credit.control.policy.level list New
credit_control_policy_tree credit.control.policy.list credit.control.policy list New
credit_control_run_form credit.control.run.form credit.control.run form New
credit_control_run_tree credit.control.run.list credit.control.run list New
credit_line_emailer_form credit.line.emailer.form credit.control.emailer form New
credit_line_marker_form credit.line.marker.form credit.control.marker form New
credit_line_printer_form credit.line.printer.form credit.control.printer form New
credit_mangement_policy_level_form credit.mangement.policy.level.form credit.control.policy.level form New
customer_followup_tree res.partner.followup.inherit.list res.partner list New
partner_followup_form_view partner.credit_control.form.view res.partner page Inherits account.view_partner_property_form
partner_view_buttons res.partner button Inherits account.partner_view_buttons
report_credit_control_summary report_credit_control_summary ir.ui.view qweb New
report_credit_control_summary_document report_credit_control_summary_document ir.ui.view qweb New
res_config_settings_view_form res.config.settings.view.form.inherit.credit.control res.config.settings xpath Inherits account.res_config_settings_view_form
res_partner_payment_action_type_form_view res.partner.payment.action.type.form res.partner.payment.action.type form New
res_partner_payment_action_type_tree_view res.partner.payment.action.type.form res.partner.payment.action.type list New
view_move_form invoice.move.form account.move notebook Inherits account.view_move_form
Models touched (18)

New fields (1)
  • credit_control_line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='account_id' readonly=True string='Credit Lines'
Public methods (0)

No public methods.

New fields (2)
  • credit_control_line_ids One2many → credit.control.line
    comodel_name='credit.control.line' copy=False inverse_name='invoice_id' readonly=True string='Credit Lines'
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' copy=False groups='account_credit_control.group_account_credit_control_manager,account_credit_control.group_account_credit_control_user,account_credit_control.group_account_credit_control_info' help='The Credit Control Policy used for this invoice. If nothing is defined, it will use the account setting or the partner setting.' readonly=True string='Credit Control Policy'
Public methods (1)
  • button_cancel(self)
    Prevent to cancel invoice related to credit line

New fields (8)
  • company_id Many2one → res.company
    comodel_name='res.company' readonly=True
  • currency_id Many2one → res.currency
    comodel_name='res.currency' readonly=True
  • level Integer
    readonly=True string='Max Level'
  • open_balance Float
    help='Open balance on credit control lines of same partner, policy and currency' readonly=True string='Overdue Balance'
  • partner_id Many2one → res.partner
    comodel_name='res.partner' readonly=True
  • partner_ref Char
    readonly=True
  • policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' readonly=True
  • policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' readonly=True string='Overdue Level'
Public methods (1)
  • init(self)

New fields (11)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> index=True required=True
  • contact_address_id Many2one → res.partner
    comodel_name='res.partner' index=True readonly=True
  • credit_control_line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='communication_id' string='Credit Lines'
  • currency_id Many2one → res.currency
    comodel_name='res.currency' index=True required=True
  • partner_id Many2one → res.partner
    comodel_name='res.partner' index=True required=True
  • policy_id Many2one
    index=True related='policy_level_id.policy_id' store=True
  • policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' index=True required=True string='Level'
  • report_date Date
    default=<expr>
  • total_due Float
    compute='_compute_total'
  • total_invoiced Float
    compute='_compute_total'
  • user_id Many2one → res.users
    comodel_name='res.users' default=<expr> index=True
Public methods (2)
  • get_email(self)
    Kept for backwards compatibility. To be removed in v13/v14
  • get_emailing_contact(self)
    Return a valid customer for the emailing. If the contact address doesn't have a valid email we fallback to the commercial partner

New fields (1)
  • line_ids Many2many → credit.control.line
    comodel_name='credit.control.line' default=<expr> domain=[('state', '=', 'to_be_sent'), ('channel', '=', 'email')] string='Credit Control Lines'
Public methods (1)
  • email_lines(self)

New fields (23)
  • account_id Many2one → account.account
    comodel_name='account.account' related='move_line_id.account_id' store=True
  • amount_due Float
    readonly=True required=True string='Due Amount Tax incl.'
  • balance_due Float
    readonly=True required=True string='Due balance'
  • channel Selection
    readonly=False required=True selection=CHANNEL_LIST
  • commercial_partner_id Many2one → res.partner
    comodel_name='res.partner' compute_sudo=True index=True related='partner_id.commercial_partner_id' store=True string='Commercial Entity'
  • communication_id Many2one → credit.control.communication
    comodel_name='credit.control.communication' help='Credit control communication process where this line belongs' string='Communication process'
  • company_id Many2one → res.company
    comodel_name='res.company' related='move_line_id.company_id' store=True
  • currency_id Many2one → res.currency
    comodel_name='res.currency' related='move_line_id.currency_id' store=True
  • date Date
    index=True readonly=False required=True string='Controlling date'
  • date_due Date
    readonly=False required=True string='Due date'
  • date_entry Date
    related='move_line_id.date' store=True string='Entry date'
  • date_sent Date
    readonly=False string='Reminded date'
  • invoice_id Many2one → account.move
    comodel_name='account.move' readonly=True
  • level Integer
    aggregator='max' related='policy_level_id.level' store=True
  • manual_followup Boolean
  • manually_overridden Boolean
  • move_line_id Many2one → account.move.line
    comodel_name='account.move.line' index=True readonly=True required=True string='Move line'
  • partner_id Many2one → res.partner
    comodel_name='res.partner' readonly=False required=True
  • partner_user_id Many2one → res.users
    comodel_name='res.users' compute='_compute_partner_user_id' store=True string='Salesperson'
  • policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' related='policy_level_id.policy_id' store=True
  • policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' readonly=False required=True string='Overdue Level'
  • run_id Many2one → credit.control.run
    comodel_name='credit.control.run' string='Source'
  • state Selection
    default='draft' help='Draft lines need to be triaged.\nIgnored lines are lines for which we do not want to send something.\nDraft and ignored lines will be generated again on the next run.' readonly=True required=True selection=[('draft', 'Draft'), ('ignored', 'Ignored'), ('queued', 'Queued'), ('to_be_sent', 'To Do'), ('sent', 'Done'), ('error', 'Error'), ('email_error', 'Emailing Error')] tracking=True
Public methods (3)
  • create_or_update_from_mv_lines(self, lines, level, controlling_date, company, check_tolerance=True, default_lines_vals=None)
    @api.model
    Create or update line based on levels if check_tolerance is true credit line will not be created if open amount is too small. eg. we do not want to send a letter for 10 cents of open amount. :param lines: move.line id recordset :param level: credit.control.policy.level record :param controlling_date: date string of the credit controlling date. Generally it should be the same as create date :param company: res.company :param default_lines_vals: default values to create new credit control lines with :param check_tolerance: boolean if True credit line will not be generated if open amount is smaller than company defined tolerance :returns: recordset of created credit lines
  • unlink(self)
  • write(self, values)

New fields (2)
  • line_ids Many2many → credit.control.line
    comodel_name='credit.control.line' default=<expr> domain="[('state', '!=', 'sent')]" string='Credit Control Lines'
  • name Selection
    default='to_be_sent' required=True selection=[('draft', 'Draft'), ('ignored', 'Ignored'), ('to_be_sent', 'To Do'), ('sent', 'Done')] string='Mark as'
Public methods (1)
  • mark_lines(self)
    Write state of selected credit lines to the one in entry done credit line will be ignored

New fields (7)
  • account_ids Many2many → account.account
    comodel_name='account.account' domain="[('account_type', '=', 'asset_receivable')]" help='This policy will be active only for the selected accounts' required=True string='Accounts'
  • active Boolean
    default=True
  • apply_max_policy_level Boolean
    help='Apply max policy level for one partner in a credit control run execution to have all credit control lines on same communication level' string='Apply max policy level'
  • company_id Many2one → res.company
    comodel_name='res.company'
  • do_nothing Boolean
    help='For policies which should not generate lines or are obsolete'
  • level_ids One2many → credit.control.policy.level
    comodel_name='credit.control.policy.level' copy=True inverse_name='policy_id' string='Policy Levels'
  • name Char
    required=True
Public methods (1)
  • check_policy_against_account(self, account)
    Ensure that the policy corresponds to account relation

New fields (4)
  • do_nothing Boolean
    string='No follow policy'
  • move_line_ids Many2many → account.move.line
    comodel_name='account.move.line' default=<expr> relation='credit_changer_ml_rel' string='Move line to change'
  • new_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' required=True string='New Policy to Apply'
  • new_policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' required=True string='New level to apply'
Public methods (2)
  • onchange_policy_id(self)
    @api.onchange('new_policy_level_id')
  • set_new_policy(self)
    Set new policy on an invoice. This is done by creating a new credit control line related to the move line and the policy settled in the wizard form :return: ir.actions.act_windows dict

New fields (11)
  • channel Selection
    required=True selection=CHANNEL_LIST
  • computation_mode Selection
    required=True selection=[('net_days', 'Due Date'), ('end_of_month', 'Due Date, End Of Month'), ('previous_date', 'Previous Reminder')] string='Compute Mode'
  • custom_mail_text Html
    required=True string='Custom Mail Message' translate=True
  • custom_text Text
    required=True string='Custom Message' translate=True
  • custom_text_after_details Text
    string='Custom Message after details' translate=True
  • delay_days Integer
    required=True string='Delay (in days)'
  • email_template_id Many2one → mail.template
    comodel_name='mail.template' domain=[('model', '=', 'credit.control.communication')] required=True
  • level Integer
    required=True
  • mail_show_invoice_detail Boolean
    string='Show Invoice Details in mail'
  • name Char
    required=True translate=True
  • policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' ondelete='cascade' required=True string='Related Policy'
Public methods (1)
  • get_level_lines(self, controlling_date, lines)
    get all move lines in entry lines that match the current level

New fields (2)
  • line_ids Many2many → credit.control.line
    comodel_name='credit.control.line' default=<expr> string='Credit Control Lines'
  • mark_as_sent Boolean
    default=True help='Only letter lines will be marked.' string='Mark letter lines as done'
Public methods (1)
  • print_lines(self)

New fields (10)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> index=True readonly=False
  • credit_control_communication_count Integer
    compute='_compute_credit_control_count' string='# of Credit Control Communications'
  • credit_control_count Integer
    compute='_compute_credit_control_count' string='# of Credit Control Lines'
  • date Date
    readonly=False required=True string='Controlling Date'
  • hide_change_state_button Boolean
  • line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='run_id' string='Generated lines'
  • manual_ids Many2many → account.move.line
    comodel_name='account.move.line' copy=False help='If a credit control line has been generatedon a policy and the policy has been changed in the meantime, it has to be handled manually' readonly=True relation='credit_runreject_rel' string='Lines to handle manually'
  • policy_ids Many2many → credit.control.policy
    column1='run_id' column2='policy_id' comodel_name='credit.control.policy' default=<expr> readonly=False relation='credit_run_policy_rel' string='Policies'
  • report Html
    copy=False readonly=True
  • state Selection
    default='draft' readonly=True required=True selection=[('draft', 'Draft'), ('done', 'Done')]
Public methods (6)
  • generate_credit_lines(self)
    Generate credit control lines Lock the ``credit_control_run`` Postgres table to avoid concurrent calls of this method.
  • open_credit_communications(self)
    Open the generated communications.
  • open_credit_lines(self)
    Open the generated lines
  • run_channel_action(self)
  • set_to_ready_lines(self)
  • unlink(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • credit_control_tolerance Float
    default=0.1 readonly=False
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' help='The Credit Control Policy used on partners by default. This setting can be overridden on partners or invoices.' readonly=False string='Credit Control Policy'
Public methods (0)

No public methods.

New fields (3)
  • credit_control_tolerance Float
    readonly=False related='company_id.credit_control_tolerance'
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' help='The Credit Control Policy used on partners by default. This setting can be overridden on partners or invoices.' readonly=False related='company_id.credit_policy_id' string='Credit Control Policy'
  • default_apply_max_policy_level Boolean
    default_model='credit.control.policy' help='Apply max policy lavel for one partner in a credit control run execution to have all credit control lines on same communication level' string='Apply max policy level'
Public methods (0)

No public methods.

New fields (9)
  • credit_control_analysis_ids One2many → credit.control.analysis
    groups='account_credit_control.group_account_credit_control_info' string='Credit Control Levels' args: 'credit.control.analysis', 'partner_id'
  • credit_control_count Integer
    compute='_compute_credit_control_count' string='# of Credit Control Lines'
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' help='The Credit Control Policy used for this partner. This setting can be forced on the invoice. If nothing is defined, it will use the company setting.' string='Credit Control Policy'
  • manual_followup Boolean
  • payment_next_action Text
    help='This is the next action to be taken.' string='Next Action' tracking=True
  • payment_next_action_date Date
    help='This is when the manual follow-up is needed.' string='Next Action Date' tracking=True
  • payment_next_action_type Many2one → res.partner.payment.action.type
    comodel_name='res.partner.payment.action.type' string='Next Action Type' tracking=True
  • payment_note Text
    help='Payment Note' string='Customer Payment Promise' tracking=True
  • payment_responsible_id Many2one → res.users
    comodel_name='res.users' help='Optionally you can assign a user to this field, which will make him responsible for the action.' ondelete='set null' string='Follow-up Responsible' tracking=True
Public methods (0)

No public methods.

New fields (5)
  • active Boolean
    default=True
  • company_id Many2one → res.company
    default=<expr> args: 'res.company'
  • name Char
  • partner_ids One2many → res.partner
    comodel_name='res.partner' inverse_name='payment_next_action_type' string='Partners'
  • sequence Integer
    default=10
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/credit-control
GIT
GIThttps://github.com/OCA/credit-control.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/credit-control/tree/18.0/account_credit_control
VERSION
VERSION 2.0.2
CATEGORY
CATEGORYFinance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA), Camptocamp, ACSONE SA/NV, Okia, Access Bookings
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSCarlos Lopez, Víctor Martínez, Weblate, OCA-git-bot, oca-ci, pilarvargas-tecnativa, len
WEBSITE
WEBSITEhttps://github.com/OCA/credit-control
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:18
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
    - account
    - base_setup
    - web
    - onboarding
    - product
    - mail
    - bus
    - web_tour
    - html_editor
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Account Credit Control module is a part of Financial Tools used in
business to ensure that once sales are made they are realised as cash.
This module helps to identify outstanding debt beyond tolerance level
and setup followup method.

Code Analysis

Views touched (28)
XML IDNameModelTypeStatus
credit_control_analysis_pivot_view credit.control.analysis.pivot (in account_credit_control_analysis) credit.control.analysis pivot New
credit_control_analysis_tree_view credit.control.analysis.tree (in account_credit_control_analysis) credit.control.analysis list New
credit_control_communication_form_view credit.control.communication.form credit.control.communication form New
credit_control_communication_search_view Credit Control Communications credit.control.communication search New
credit_control_communication_tree_view credit.control.communication.list credit.control.communication list New
credit_control_company_form credit.control.company.form res.company field Inherits base.view_company_form
credit_control_line_form credit.control.line.form credit.control.line form New
credit_control_line_search Credit Control Lines credit.control.line search New
credit_control_line_tree credit.control.line.list credit.control.line list New
credit_control_policy_changer_form credit control policy form credit.control.policy.changer form New
credit_control_policy_form credit.control.policy.form credit.control.policy form New
credit_control_policy_level_tree credit.control.policy.level.list credit.control.policy.level list New
credit_control_policy_tree credit.control.policy.list credit.control.policy list New
credit_control_run_form credit.control.run.form credit.control.run form New
credit_control_run_tree credit.control.run.list credit.control.run list New
credit_line_emailer_form credit.line.emailer.form credit.control.emailer form New
credit_line_marker_form credit.line.marker.form credit.control.marker form New
credit_line_printer_form credit.line.printer.form credit.control.printer form New
credit_mangement_policy_level_form credit.mangement.policy.level.form credit.control.policy.level form New
customer_followup_tree res.partner.followup.inherit.list res.partner list New
partner_followup_form_view partner.credit_control.form.view res.partner page Inherits account.view_partner_property_form
partner_view_buttons res.partner button Inherits account.partner_view_buttons
report_credit_control_summary report_credit_control_summary ir.ui.view qweb New
report_credit_control_summary_document report_credit_control_summary_document ir.ui.view qweb New
res_config_settings_view_form res.config.settings.view.form.inherit.credit.control res.config.settings xpath Inherits account.res_config_settings_view_form
res_partner_payment_action_type_form_view res.partner.payment.action.type.form res.partner.payment.action.type form New
res_partner_payment_action_type_tree_view res.partner.payment.action.type.form res.partner.payment.action.type list New
view_move_form invoice.move.form account.move notebook Inherits account.view_move_form
Models touched (18)

New fields (1)
  • credit_control_line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='account_id' readonly=True string='Credit Lines'
Public methods (0)

No public methods.

New fields (2)
  • credit_control_line_ids One2many → credit.control.line
    comodel_name='credit.control.line' copy=False inverse_name='invoice_id' readonly=True string='Credit Lines'
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' copy=False groups='account_credit_control.group_account_credit_control_manager,account_credit_control.group_account_credit_control_user,account_credit_control.group_account_credit_control_info' help='The Credit Control Policy used for this invoice. If nothing is defined, it will use the account setting or the partner setting.' readonly=True string='Credit Control Policy'
Public methods (1)
  • button_cancel(self)
    Prevent to cancel invoice related to credit line

New fields (8)
  • company_id Many2one → res.company
    comodel_name='res.company' readonly=True
  • currency_id Many2one → res.currency
    comodel_name='res.currency' readonly=True
  • level Integer
    readonly=True string='Max Level'
  • open_balance Float
    help='Open balance on credit control linesof same partner, policy and currency' readonly=True string='Overdue Balance'
  • partner_id Many2one → res.partner
    comodel_name='res.partner' readonly=True
  • partner_ref Char
    readonly=True
  • policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' readonly=True
  • policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' readonly=True string='Overdue Level'
Public methods (1)
  • init(self)

New fields (11)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> index=True required=True
  • contact_address_id Many2one → res.partner
    comodel_name='res.partner' index=True readonly=True
  • credit_control_line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='communication_id' string='Credit Lines'
  • currency_id Many2one → res.currency
    comodel_name='res.currency' index=True required=True
  • partner_id Many2one → res.partner
    comodel_name='res.partner' index=True required=True
  • policy_id Many2one
    index=True related='policy_level_id.policy_id' store=True
  • policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' index=True required=True string='Level'
  • report_date Date
    default=<expr>
  • total_due Float
    compute='_compute_total'
  • total_invoiced Float
    compute='_compute_total'
  • user_id Many2one → res.users
    comodel_name='res.users' default=<expr> index=True
Public methods (2)
  • get_email(self)
    Kept for backwards compatibility. To be removed in v13/v14
  • get_emailing_contact(self)
    Return a valid customer for the emailing. If the contact address doesn't have a valid email we fallback to the commercial partner

New fields (1)
  • line_ids Many2many → credit.control.line
    comodel_name='credit.control.line' default=<expr> domain=[('state', '=', 'to_be_sent'), ('channel', '=', 'email')] string='Credit Control Lines'
Public methods (1)
  • email_lines(self)

New fields (23)
  • account_id Many2one → account.account
    comodel_name='account.account' related='move_line_id.account_id' store=True
  • amount_due Float
    readonly=True required=True string='Due Amount Tax incl.'
  • balance_due Float
    readonly=True required=True string='Due balance'
  • channel Selection
    readonly=False required=True selection=CHANNEL_LIST
  • commercial_partner_id Many2one → res.partner
    comodel_name='res.partner' compute_sudo=True index=True related='partner_id.commercial_partner_id' store=True string='Commercial Entity'
  • communication_id Many2one → credit.control.communication
    comodel_name='credit.control.communication' help='Credit control communication process where this line belongs' string='Communication process'
  • company_id Many2one → res.company
    comodel_name='res.company' related='move_line_id.company_id' store=True
  • currency_id Many2one → res.currency
    comodel_name='res.currency' related='move_line_id.currency_id' store=True
  • date Date
    index=True readonly=False required=True string='Controlling date'
  • date_due Date
    readonly=False required=True string='Due date'
  • date_entry Date
    related='move_line_id.date' store=True string='Entry date'
  • date_sent Date
    readonly=False string='Reminded date'
  • invoice_id Many2one → account.move
    comodel_name='account.move' readonly=True
  • level Integer
    aggregator='max' related='policy_level_id.level' store=True
  • manual_followup Boolean
  • manually_overridden Boolean
  • move_line_id Many2one → account.move.line
    comodel_name='account.move.line' index=True readonly=True required=True string='Move line'
  • partner_id Many2one → res.partner
    comodel_name='res.partner' readonly=False required=True
  • partner_user_id Many2one → res.users
    comodel_name='res.users' compute='_compute_partner_user_id' store=True string='Salesperson'
  • policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' related='policy_level_id.policy_id' store=True
  • policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' readonly=False required=True string='Overdue Level'
  • run_id Many2one → credit.control.run
    comodel_name='credit.control.run' string='Source'
  • state Selection
    default='draft' help='Draft lines need to be triaged.\nIgnored lines are lines for which we do not want to send something.\nDraft and ignored lines will be generated again on the next run.' readonly=True required=True selection=[('draft', 'Draft'), ('ignored', 'Ignored'), ('queued', 'Queued'), ('to_be_sent', 'To Do'), ('sent', 'Done'), ('error', 'Error'), ('email_error', 'Emailing Error')] tracking=True
Public methods (3)
  • create_or_update_from_mv_lines(self, lines, level, controlling_date, company, check_tolerance=True, default_lines_vals=None)
    @api.model
    Create or update line based on levels if check_tolerance is true credit line will not be created if open amount is too small. eg. we do not want to send a letter for 10 cents of open amount. :param lines: move.line id recordset :param level: credit.control.policy.level record :param controlling_date: date string of the credit controlling date. Generally it should be the same as create date :param company: res.company :param default_lines_vals: default values to create new credit control lines with :param check_tolerance: boolean if True credit line will not be generated if open amount is smaller than company defined tolerance :returns: recordset of created credit lines
  • unlink(self)
  • write(self, values)

New fields (2)
  • line_ids Many2many → credit.control.line
    comodel_name='credit.control.line' default=<expr> domain="[('state', '!=', 'sent')]" string='Credit Control Lines'
  • name Selection
    default='to_be_sent' required=True selection=[('draft', 'Draft'), ('ignored', 'Ignored'), ('to_be_sent', 'To Do'), ('sent', 'Done')] string='Mark as'
Public methods (1)
  • mark_lines(self)
    Write state of selected credit lines to the one in entry done credit line will be ignored

New fields (7)
  • account_ids Many2many → account.account
    comodel_name='account.account' domain="[('account_type', '=', 'asset_receivable')]" help='This policy will be active only for the selected accounts' required=True string='Accounts'
  • active Boolean
    default=True
  • apply_max_policy_level Boolean
    help='Apply max policy lavel for one partner in a credit control run execution to have all credit control lines on same communication level' string='Apply max policy level'
  • company_id Many2one → res.company
    comodel_name='res.company'
  • do_nothing Boolean
    help='For policies which should not generate lines or are obsolete'
  • level_ids One2many → credit.control.policy.level
    comodel_name='credit.control.policy.level' copy=True inverse_name='policy_id' string='Policy Levels'
  • name Char
    required=True
Public methods (1)
  • check_policy_against_account(self, account)
    Ensure that the policy corresponds to account relation

New fields (4)
  • do_nothing Boolean
    string='No follow policy'
  • move_line_ids Many2many → account.move.line
    comodel_name='account.move.line' default=<expr> relation='credit_changer_ml_rel' string='Move line to change'
  • new_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' required=True string='New Policy to Apply'
  • new_policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' required=True string='New level to apply'
Public methods (2)
  • onchange_policy_id(self)
    @api.onchange('new_policy_level_id')
  • set_new_policy(self)
    Set new policy on an invoice. This is done by creating a new credit control line related to the move line and the policy settled in the wizard form :return: ir.actions.act_windows dict

New fields (11)
  • channel Selection
    required=True selection=CHANNEL_LIST
  • computation_mode Selection
    required=True selection=[('net_days', 'Due Date'), ('end_of_month', 'Due Date, End Of Month'), ('previous_date', 'Previous Reminder')] string='Compute Mode'
  • custom_mail_text Html
    required=True string='Custom Mail Message' translate=True
  • custom_text Text
    required=True string='Custom Message' translate=True
  • custom_text_after_details Text
    string='Custom Message after details' translate=True
  • delay_days Integer
    required=True string='Delay (in days)'
  • email_template_id Many2one → mail.template
    comodel_name='mail.template' domain=[('model', '=', 'credit.control.communication')] required=True
  • level Integer
    required=True
  • mail_show_invoice_detail Boolean
    string='Show Invoice Details in mail'
  • name Char
    required=True translate=True
  • policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' ondelete='cascade' required=True string='Related Policy'
Public methods (1)
  • get_level_lines(self, controlling_date, lines)
    get all move lines in entry lines that match the current level

New fields (2)
  • line_ids Many2many → credit.control.line
    comodel_name='credit.control.line' default=<expr> string='Credit Control Lines'
  • mark_as_sent Boolean
    default=True help='Only letter lines will be marked.' string='Mark letter lines as done'
Public methods (1)
  • print_lines(self)

New fields (10)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> index=True readonly=False
  • credit_control_communication_count Integer
    compute='_compute_credit_control_count' string='# of Credit Control Communications'
  • credit_control_count Integer
    compute='_compute_credit_control_count' string='# of Credit Control Lines'
  • date Date
    readonly=False required=True string='Controlling Date'
  • hide_change_state_button Boolean
  • line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='run_id' string='Generated lines'
  • manual_ids Many2many → account.move.line
    comodel_name='account.move.line' copy=False help='If a credit control line has been generatedon a policy and the policy has been changed in the meantime, it has to be handled manually' readonly=True relation='credit_runreject_rel' string='Lines to handle manually'
  • policy_ids Many2many → credit.control.policy
    column1='run_id' column2='policy_id' comodel_name='credit.control.policy' default=<expr> readonly=False relation='credit_run_policy_rel' string='Policies'
  • report Html
    copy=False readonly=True
  • state Selection
    default='draft' readonly=True required=True selection=[('draft', 'Draft'), ('done', 'Done')]
Public methods (6)
  • generate_credit_lines(self)
    Generate credit control lines Lock the ``credit_control_run`` Postgres table to avoid concurrent calls of this method.
  • open_credit_communications(self)
    Open the generated communications.
  • open_credit_lines(self)
    Open the generated lines
  • run_channel_action(self)
  • set_to_ready_lines(self)
  • unlink(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • credit_control_tolerance Float
    default=0.1 readonly=False
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' help='The Credit Control Policy used on partners by default. This setting can be overridden on partners or invoices.' readonly=False string='Credit Control Policy'
Public methods (0)

No public methods.

New fields (3)
  • credit_control_tolerance Float
    readonly=False related='company_id.credit_control_tolerance'
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' help='The Credit Control Policy used on partners by default. This setting can be overridden on partners or invoices.' readonly=False related='company_id.credit_policy_id' string='Credit Control Policy'
  • default_apply_max_policy_level Boolean
    default_model='credit.control.policy' help='Apply max policy lavel for one partner in a credit control run execution to have all credit control lines on same communication level' string='Apply max policy level'
Public methods (0)

No public methods.

New fields (9)
  • credit_control_analysis_ids One2many → credit.control.analysis
    groups='account_credit_control.group_account_credit_control_info' string='Credit Control Levels' args: 'credit.control.analysis', 'partner_id'
  • credit_control_count Integer
    compute='_compute_credit_control_count' string='# of Credit Control Lines'
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' help='The Credit Control Policy used for this partner. This setting can be forced on the invoice. If nothing is defined, it will use the company setting.' string='Credit Control Policy'
  • manual_followup Boolean
  • payment_next_action Text
    help='This is the next action to be taken.' string='Next Action' tracking=True
  • payment_next_action_date Date
    help='This is when the manual follow-up is needed.' string='Next Action Date' tracking=True
  • payment_next_action_type Many2one → res.partner.payment.action.type
    comodel_name='res.partner.payment.action.type' string='Next Action Type' tracking=True
  • payment_note Text
    help='Payment Note' string='Customer Payment Promise' tracking=True
  • payment_responsible_id Many2one → res.users
    comodel_name='res.users' help='Optionally you can assign a user to this field, which will make him responsible for the action.' ondelete='set null' string='Follow-up Responsible' tracking=True
Public methods (0)

No public methods.

New fields (5)
  • active Boolean
    default=True
  • company_id Many2one → res.company
    default=<expr> args: 'res.company'
  • name Char
  • partner_ids One2many → res.partner
    comodel_name='res.partner' inverse_name='payment_next_action_type' string='Partners'
  • sequence Integer
    default=10
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/credit-control
GIT
GIThttps://github.com/OCA/credit-control.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/credit-control/tree/17.0/account_credit_control
VERSION
VERSION 2.2.6
CATEGORY
CATEGORYFinance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA), Camptocamp, ACSONE SA/NV, Okia, Access Bookings
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSCarlos Lopez, sergio-teruel, Víctor Martínez, Weblate, OCA-git-bot, oca-ci, pilarvargas-tecnativa, andrea, len
WEBSITE
WEBSITEhttps://github.com/OCA/credit-control
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:20:10
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
    - account
    - base_setup
    - web
    - onboarding
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Account Credit Control module is a part of Financial Tools used in
business to ensure that once sales are made they are realised as cash.
This module helps to identify outstanding debt beyond tolerance level
and setup followup method.

Code Analysis

Views touched (28)
XML IDNameModelTypeStatus
credit_control_analysis_pivot_view credit.control.analysis.pivot (in account_credit_control_analysis) credit.control.analysis pivot New
credit_control_analysis_tree_view credit.control.analysis.tree (in account_credit_control_analysis) credit.control.analysis tree New
credit_control_communication_form_view credit.control.communication.form credit.control.communication form New
credit_control_communication_search_view Credit Control Communications credit.control.communication search New
credit_control_communication_tree_view credit.control.communication.tree credit.control.communication tree New
credit_control_company_form credit.control.company.form res.company field Inherits base.view_company_form
credit_control_line_form credit.control.line.form credit.control.line form New
credit_control_line_search Credit Control Lines credit.control.line search New
credit_control_line_tree credit.control.line.tree credit.control.line tree New
credit_control_policy_changer_form credit control policy form credit.control.policy.changer form New
credit_control_policy_form credit.control.policy.form credit.control.policy form New
credit_control_policy_level_tree credit.control.policy.level.tree credit.control.policy.level tree New
credit_control_policy_tree credit.control.policy.tree credit.control.policy tree New
credit_control_run_form credit.control.run.form credit.control.run form New
credit_control_run_tree credit.control.run.tree credit.control.run tree New
credit_line_emailer_form credit.line.emailer.form credit.control.emailer form New
credit_line_marker_form credit.line.marker.form credit.control.marker form New
credit_line_printer_form credit.line.printer.form credit.control.printer form New
credit_mangement_policy_level_form credit.mangement.policy.level.form credit.control.policy.level form New
customer_followup_tree res.partner.followup.inherit.tree res.partner tree New
partner_followup_form_view partner.credit_control.form.view res.partner page Inherits account.view_partner_property_form
partner_view_buttons res.partner button Inherits account.partner_view_buttons
report_credit_control_summary report_credit_control_summary ir.ui.view qweb New
report_credit_control_summary_document report_credit_control_summary_document ir.ui.view qweb New
res_config_settings_view_form res.config.settings.view.form.inherit.credit.control res.config.settings xpath Inherits account.res_config_settings_view_form
res_partner_payment_action_type_form_view res.partner.payment.action.type.form res.partner.payment.action.type form New
res_partner_payment_action_type_tree_view res.partner.payment.action.type.form res.partner.payment.action.type tree New
view_move_form invoice.move.form account.move notebook Inherits account.view_move_form
Models touched (19)

New fields (1)
  • credit_control_line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='account_id' readonly=True string='Credit Lines'
Public methods (0)

No public methods.

New fields (2)
  • credit_control_line_ids One2many → credit.control.line
    comodel_name='credit.control.line' copy=False inverse_name='invoice_id' readonly=True string='Credit Lines'
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' copy=False groups='account_credit_control.group_account_credit_control_manager,account_credit_control.group_account_credit_control_user,account_credit_control.group_account_credit_control_info' help='The Credit Control Policy used for this invoice. If nothing is defined, it will use the account setting or the partner setting.' readonly=True string='Credit Control Policy'
Public methods (1)
  • button_cancel(self)
    Prevent to cancel invoice related to credit line

New fields (8)
  • company_id Many2one → res.company
    comodel_name='res.company' readonly=True
  • currency_id Many2one → res.currency
    comodel_name='res.currency' readonly=True
  • level Integer
    readonly=True string='Max Level'
  • open_balance Float
    help='Open balance on credit control linesof same partner, policy and currency' readonly=True string='Overdue Balance'
  • partner_id Many2one → res.partner
    comodel_name='res.partner' readonly=True
  • partner_ref Char
    readonly=True
  • policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' readonly=True
  • policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' readonly=True string='Overdue Level'
Public methods (1)
  • init(self)

New fields (11)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> index=True required=True
  • contact_address_id Many2one → res.partner
    comodel_name='res.partner' index=True readonly=True
  • credit_control_line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='communication_id' string='Credit Lines'
  • currency_id Many2one → res.currency
    comodel_name='res.currency' index=True required=True
  • partner_id Many2one → res.partner
    comodel_name='res.partner' index=True required=True
  • policy_id Many2one
    index=True related='policy_level_id.policy_id' store=True
  • policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' index=True required=True string='Level'
  • report_date Date
    default=<expr>
  • total_due Float
    compute='_compute_total'
  • total_invoiced Float
    compute='_compute_total'
  • user_id Many2one → res.users
    comodel_name='res.users' default=<expr> index=True
Public methods (3)
  • get_email(self)
    Kept for backwards compatibility. To be removed in v13/v14
  • get_emailing_contact(self)
    Return a valid customer for the emailing. If the contact address doesn't have a valid email we fallback to the commercial partner
  • send_mails_threaded(self, record_ids)

New fields (1)
  • line_ids Many2many → credit.control.line
    comodel_name='credit.control.line' default=<expr> domain=[('state', '=', 'to_be_sent'), ('channel', '=', 'email')] string='Credit Control Lines'
Public methods (1)
  • email_lines(self)

New fields (23)
  • account_id Many2one → account.account
    comodel_name='account.account' related='move_line_id.account_id' store=True
  • amount_due Float
    readonly=True required=True string='Due Amount Tax incl.'
  • balance_due Float
    readonly=True required=True string='Due balance'
  • channel Selection
    readonly=False required=True selection=CHANNEL_LIST
  • commercial_partner_id Many2one → res.partner
    comodel_name='res.partner' compute_sudo=True index=True related='partner_id.commercial_partner_id' store=True string='Commercial Entity'
  • communication_id Many2one → credit.control.communication
    comodel_name='credit.control.communication' help='Credit control communication process where this line belongs' string='Communication process'
  • company_id Many2one → res.company
    comodel_name='res.company' related='move_line_id.company_id' store=True
  • currency_id Many2one → res.currency
    comodel_name='res.currency' related='move_line_id.currency_id' store=True
  • date Date
    index=True readonly=False required=True string='Controlling date'
  • date_due Date
    readonly=False required=True string='Due date'
  • date_entry Date
    related='move_line_id.date' store=True string='Entry date'
  • date_sent Date
    readonly=False string='Reminded date'
  • invoice_id Many2one → account.move
    comodel_name='account.move' readonly=True
  • level Integer
    group_operator='max' related='policy_level_id.level' store=True
  • manual_followup Boolean
  • manually_overridden Boolean
  • move_line_id Many2one → account.move.line
    comodel_name='account.move.line' index=True readonly=True required=True string='Move line'
  • partner_id Many2one → res.partner
    comodel_name='res.partner' readonly=False required=True
  • partner_user_id Many2one → res.users
    comodel_name='res.users' compute='_compute_partner_user_id' store=True string='Salesperson'
  • policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' related='policy_level_id.policy_id' store=True
  • policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' readonly=False required=True string='Overdue Level'
  • run_id Many2one → credit.control.run
    comodel_name='credit.control.run' string='Source'
  • state Selection
    default='draft' help='Draft lines need to be triaged.\nIgnored lines are lines for which we do not want to send something.\nDraft and ignored lines will be generated again on the next run.' readonly=True required=True selection=[('draft', 'Draft'), ('ignored', 'Ignored'), ('queued', 'Queued'), ('to_be_sent', 'To Do'), ('sent', 'Done'), ('error', 'Error'), ('email_error', 'Emailing Error')] tracking=True
Public methods (3)
  • create_or_update_from_mv_lines(self, lines, level, controlling_date, company, check_tolerance=True, default_lines_vals=None)
    @api.model
    Create or update line based on levels if check_tolerance is true credit line will not be created if open amount is too small. eg. we do not want to send a letter for 10 cents of open amount. :param lines: move.line id recordset :param level: credit.control.policy.level record :param controlling_date: date string of the credit controlling date. Generally it should be the same as create date :param company: res.company :param default_lines_vals: default values to create new credit control lines with :param check_tolerance: boolean if True credit line will not be generated if open amount is smaller than company defined tolerance :returns: recordset of created credit lines
  • unlink(self)
  • write(self, values)

New fields (2)
  • line_ids Many2many → credit.control.line
    comodel_name='credit.control.line' default=<expr> domain="[('state', '!=', 'sent')]" string='Credit Control Lines'
  • name Selection
    default='to_be_sent' required=True selection=[('draft', 'Draft'), ('ignored', 'Ignored'), ('to_be_sent', 'To Do'), ('sent', 'Done')] string='Mark as'
Public methods (1)
  • mark_lines(self)
    Write state of selected credit lines to the one in entry done credit line will be ignored

New fields (7)
  • account_ids Many2many → account.account
    comodel_name='account.account' domain="[('account_type', '=', 'asset_receivable')]" help='This policy will be active only for the selected accounts' required=True string='Accounts'
  • active Boolean
    default=True
  • apply_max_policy_level Boolean
    help='Apply max policy lavel for one partner in a credit control run execution to have all credit control lines on same communication level' string='Apply max policy level'
  • company_id Many2one → res.company
    comodel_name='res.company'
  • do_nothing Boolean
    help='For policies which should not generate lines or are obsolete'
  • level_ids One2many → credit.control.policy.level
    comodel_name='credit.control.policy.level' copy=True inverse_name='policy_id' string='Policy Levels'
  • name Char
    required=True
Public methods (1)
  • check_policy_against_account(self, account)
    Ensure that the policy corresponds to account relation

New fields (4)
  • do_nothing Boolean
    string='No follow policy'
  • move_line_ids Many2many → account.move.line
    comodel_name='account.move.line' default=<expr> relation='credit_changer_ml_rel' string='Move line to change'
  • new_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' required=True string='New Policy to Apply'
  • new_policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' required=True string='New level to apply'
Public methods (2)
  • onchange_policy_id(self)
    @api.onchange('new_policy_level_id')
  • set_new_policy(self)
    Set new policy on an invoice. This is done by creating a new credit control line related to the move line and the policy settled in the wizard form :return: ir.actions.act_windows dict

New fields (11)
  • channel Selection
    required=True selection=CHANNEL_LIST
  • computation_mode Selection
    required=True selection=[('net_days', 'Due Date'), ('end_of_month', 'Due Date, End Of Month'), ('previous_date', 'Previous Reminder')] string='Compute Mode'
  • custom_mail_text Html
    required=True string='Custom Mail Message' translate=True
  • custom_text Text
    required=True string='Custom Message' translate=True
  • custom_text_after_details Text
    string='Custom Message after details' translate=True
  • delay_days Integer
    required=True string='Delay (in days)'
  • email_template_id Many2one → mail.template
    comodel_name='mail.template' domain=[('model', '=', 'credit.control.communication')] required=True
  • level Integer
    required=True
  • mail_show_invoice_detail Boolean
    string='Show Invoice Details in mail'
  • name Char
    required=True translate=True
  • policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' ondelete='cascade' required=True string='Related Policy'
Public methods (1)
  • get_level_lines(self, controlling_date, lines)
    get all move lines in entry lines that match the current level

New fields (2)
  • line_ids Many2many → credit.control.line
    comodel_name='credit.control.line' default=<expr> string='Credit Control Lines'
  • mark_as_sent Boolean
    default=True help='Only letter lines will be marked.' string='Mark letter lines as done'
Public methods (1)
  • print_lines(self)

New fields (10)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> index=True readonly=False
  • credit_control_communication_count Integer
    compute='_compute_credit_control_count' string='# of Credit Control Communications'
  • credit_control_count Integer
    compute='_compute_credit_control_count' string='# of Credit Control Lines'
  • date Date
    readonly=False required=True string='Controlling Date'
  • hide_change_state_button Boolean
  • line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='run_id' string='Generated lines'
  • manual_ids Many2many → account.move.line
    comodel_name='account.move.line' copy=False help='If a credit control line has been generatedon a policy and the policy has been changed in the meantime, it has to be handled manually' readonly=True relation='credit_runreject_rel' string='Lines to handle manually'
  • policy_ids Many2many → credit.control.policy
    column1='run_id' column2='policy_id' comodel_name='credit.control.policy' default=<expr> readonly=False relation='credit_run_policy_rel' string='Policies'
  • report Html
    copy=False readonly=True
  • state Selection
    default='draft' readonly=True required=True selection=[('draft', 'Draft'), ('done', 'Done')]
Public methods (6)
  • generate_credit_lines(self)
    Generate credit control lines Lock the ``credit_control_run`` Postgres table to avoid concurrent calls of this method.
  • open_credit_communications(self)
    Open the generated communications.
  • open_credit_lines(self)
    Open the generated lines
  • run_channel_action(self)
  • set_to_ready_lines(self)
  • unlink(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • message_format(self, format_reply=True, msg_vals=None)

New fields (2)
  • credit_control_tolerance Float
    default=0.1 readonly=False
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' help='The Credit Control Policy used on partners by default. This setting can be overridden on partners or invoices.' readonly=False string='Credit Control Policy'
Public methods (0)

No public methods.

New fields (3)
  • credit_control_tolerance Float
    readonly=False related='company_id.credit_control_tolerance'
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' help='The Credit Control Policy used on partners by default. This setting can be overridden on partners or invoices.' readonly=False related='company_id.credit_policy_id' string='Credit Control Policy'
  • default_apply_max_policy_level Boolean
    default_model='credit.control.policy' help='Apply max policy lavel for one partner in a credit control run execution to have all credit control lines on same communication level' string='Apply max policy level'
Public methods (0)

No public methods.

New fields (9)
  • credit_control_analysis_ids One2many → credit.control.analysis
    groups='account_credit_control.group_account_credit_control_info' string='Credit Control Levels' args: 'credit.control.analysis', 'partner_id'
  • credit_control_count Integer
    compute='_compute_credit_control_count' string='# of Credit Control Lines'
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' help='The Credit Control Policy used for this partner. This setting can be forced on the invoice. If nothing is defined, it will use the company setting.' string='Credit Control Policy'
  • manual_followup Boolean
  • payment_next_action Text
    help='This is the next action to be taken.' string='Next Action' tracking=True
  • payment_next_action_date Date
    help='This is when the manual follow-up is needed.' string='Next Action Date' tracking=True
  • payment_next_action_type Many2one → res.partner.payment.action.type
    comodel_name='res.partner.payment.action.type' string='Next Action Type' tracking=True
  • payment_note Text
    help='Payment Note' string='Customer Payment Promise' tracking=True
  • payment_responsible_id Many2one → res.users
    comodel_name='res.users' help='Optionally you can assign a user to this field, which will make him responsible for the action.' ondelete='set null' string='Follow-up Responsible' tracking=True
Public methods (0)

No public methods.

New fields (5)
  • active Boolean
    default=True
  • company_id Many2one → res.company
    default=<expr> args: 'res.company'
  • name Char
  • partner_ids One2many → res.partner
    comodel_name='res.partner' inverse_name='payment_next_action_type' string='Partners'
  • sequence Integer
    default=10
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/credit-control
GIT
GIThttps://github.com/OCA/credit-control.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/credit-control/tree/16.0/account_credit_control
VERSION
VERSION 2.0.2
CATEGORY
CATEGORYFinance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA), Camptocamp, ACSONE SA/NV, Okia, Access Bookings
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSJairo Llopis, Víctor Martínez, Weblate, OCA-git-bot, Andrea Stirpe, oca-ci, josep-tecnativa, bobslee
WEBSITE
WEBSITEhttps://github.com/OCA/credit-control
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:53:57
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
    - account
    - base_setup
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (28)
XML IDNameModelTypeStatus
credit_control_analysis_pivot_view credit.control.analysis.pivot (in account_credit_control_analysis) credit.control.analysis pivot New
credit_control_analysis_tree_view credit.control.analysis.tree (in account_credit_control_analysis) credit.control.analysis tree New
credit_control_communication_form_view credit.control.communication.form credit.control.communication form New
credit_control_communication_search_view Credit Control Communications credit.control.communication search New
credit_control_communication_tree_view credit.control.communication.tree credit.control.communication tree New
credit_control_company_form credit.control.company.form res.company field Inherits base.view_company_form
credit_control_line_form credit.control.line.form credit.control.line form New
credit_control_line_search Credit Control Lines credit.control.line search New
credit_control_line_tree credit.control.line.tree credit.control.line tree New
credit_control_policy_changer_form credit control policy form credit.control.policy.changer form New
credit_control_policy_form credit.control.policy.form credit.control.policy form New
credit_control_policy_level_tree credit.control.policy.level.tree credit.control.policy.level tree New
credit_control_policy_tree credit.control.policy.tree credit.control.policy tree New
credit_control_run_form credit.control.run.form credit.control.run form New
credit_control_run_tree credit.control.run.tree credit.control.run tree New
credit_line_emailer_form credit.line.emailer.form credit.control.emailer form New
credit_line_marker_form credit.line.marker.form credit.control.marker form New
credit_line_printer_form credit.line.printer.form credit.control.printer form New
credit_mangement_policy_level_form credit.mangement.policy.level.form credit.control.policy.level form New
customer_followup_tree res.partner.followup.inherit.tree res.partner tree New
partner_followup_form_view partner.credit_control.form.view res.partner page Inherits account.view_partner_property_form
partner_view_buttons res.partner button Inherits account.partner_view_buttons
report_credit_control_summary report_credit_control_summary ir.ui.view qweb New
report_credit_control_summary_document report_credit_control_summary_document ir.ui.view qweb New
res_config_settings_view_form res.config.settings.view.form.inherit.credit.control res.config.settings xpath Inherits account.res_config_settings_view_form
res_partner_payment_action_type_form_view res.partner.payment.action.type.form res.partner.payment.action.type form New
res_partner_payment_action_type_tree_view res.partner.payment.action.type.form res.partner.payment.action.type tree New
view_move_form invoice.move.form account.move notebook Inherits account.view_move_form
Models touched (19)

New fields (1)
  • credit_control_line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='account_id' readonly=True string='Credit Lines'
Public methods (0)

No public methods.

New fields (2)
  • credit_control_line_ids One2many → credit.control.line
    comodel_name='credit.control.line' copy=False inverse_name='invoice_id' readonly=True string='Credit Lines'
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' copy=False groups='account_credit_control.group_account_credit_control_manager,account_credit_control.group_account_credit_control_user,account_credit_control.group_account_credit_control_info' help='The Credit Control Policy used for this invoice. If nothing is defined, it will use the account setting or the partner setting.' readonly=True string='Credit Control Policy'
Public methods (1)
  • button_cancel(self)
    Prevent to cancel invoice related to credit line

New fields (8)
  • company_id Many2one → res.company
    comodel_name='res.company' readonly=True
  • currency_id Many2one → res.currency
    comodel_name='res.currency' readonly=True
  • level Integer
    readonly=True string='Max Level'
  • open_balance Float
    help='Open balance on credit control linesof same partner, policy and currency' readonly=True string='Overdue Balance'
  • partner_id Many2one → res.partner
    comodel_name='res.partner' readonly=True
  • partner_ref Char
    readonly=True
  • policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' readonly=True
  • policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' readonly=True string='Overdue Level'
Public methods (1)
  • init(self)

New fields (11)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> index=True required=True
  • contact_address_id Many2one → res.partner
    comodel_name='res.partner' index=True readonly=True
  • credit_control_line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='communication_id' string='Credit Lines'
  • currency_id Many2one → res.currency
    comodel_name='res.currency' index=True required=True
  • partner_id Many2one → res.partner
    comodel_name='res.partner' index=True required=True
  • policy_id Many2one
    index=True related='policy_level_id.policy_id' store=True
  • policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' index=True required=True string='Level'
  • report_date Date
    default=<expr>
  • total_due Float
    compute='_compute_total'
  • total_invoiced Float
    compute='_compute_total'
  • user_id Many2one → res.users
    comodel_name='res.users' default=<expr> index=True
Public methods (2)
  • get_email(self)
    Kept for backwards compatibility. To be removed in v13/v14
  • get_emailing_contact(self)
    Return a valid customer for the emailing. If the contact address doesn't have a valid email we fallback to the commercial partner

New fields (1)
  • line_ids Many2many → credit.control.line
    comodel_name='credit.control.line' default=<expr> domain=[('state', '=', 'to_be_sent'), ('channel', '=', 'email')] string='Credit Control Lines'
Public methods (1)
  • email_lines(self)

New fields (23)
  • account_id Many2one → account.account
    comodel_name='account.account' related='move_line_id.account_id' store=True
  • amount_due Float
    readonly=True required=True string='Due Amount Tax incl.'
  • balance_due Float
    readonly=True required=True string='Due balance'
  • channel Selection
    readonly=True required=True selection=CHANNEL_LIST states={'draft': [('readonly', False)]}
  • commercial_partner_id Many2one → res.partner
    comodel_name='res.partner' compute_sudo=True index=True related='partner_id.commercial_partner_id' store=True string='Commercial Entity'
  • communication_id Many2one → credit.control.communication
    comodel_name='credit.control.communication' help='Credit control communication process where this line belongs' string='Communication process'
  • company_id Many2one → res.company
    comodel_name='res.company' related='move_line_id.company_id' store=True
  • currency_id Many2one → res.currency
    comodel_name='res.currency' related='move_line_id.currency_id' store=True
  • date Date
    index=True readonly=True required=True states={'draft': [('readonly', False)]} string='Controlling date'
  • date_due Date
    readonly=True required=True states={'draft': [('readonly', False)]} string='Due date'
  • date_entry Date
    related='move_line_id.date' store=True string='Entry date'
  • date_sent Date
    readonly=True states={'draft': [('readonly', False)]} string='Reminded date'
  • invoice_id Many2one → account.move
    comodel_name='account.move' readonly=True
  • level Integer
    group_operator='max' related='policy_level_id.level' store=True
  • manual_followup Boolean
  • manually_overridden Boolean
  • move_line_id Many2one → account.move.line
    comodel_name='account.move.line' index=True readonly=True required=True string='Move line'
  • partner_id Many2one → res.partner
    comodel_name='res.partner' readonly=True required=True states={'draft': [('readonly', False)]}
  • partner_user_id Many2one → res.users
    comodel_name='res.users' compute='_compute_partner_user_id' store=True string='Salesperson'
  • policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' related='policy_level_id.policy_id' store=True
  • policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' readonly=True required=True states={'draft': [('readonly', False)]} string='Overdue Level'
  • run_id Many2one → credit.control.run
    comodel_name='credit.control.run' string='Source'
  • state Selection
    default='draft' help='Draft lines need to be triaged.\nIgnored lines are lines for which we do not want to send something.\nDraft and ignored lines will be generated again on the next run.' readonly=True required=True selection=[('draft', 'Draft'), ('ignored', 'Ignored'), ('queued', 'Queued'), ('to_be_sent', 'To Do'), ('sent', 'Done'), ('error', 'Error'), ('email_error', 'Emailing Error')] tracking=True
Public methods (5)
  • button_credit_control_line_form(self)
  • button_schedule_activity(self)
  • create_or_update_from_mv_lines(self, lines, level, controlling_date, company, check_tolerance=True, default_lines_vals=None)
    @api.model
    Create or update line based on levels if check_tolerance is true credit line will not be created if open amount is too small. eg. we do not want to send a letter for 10 cents of open amount. :param lines: move.line id recordset :param level: credit.control.policy.level record :param controlling_date: date string of the credit controlling date. Generally it should be the same as create date :param company: res.company :param default_lines_vals: default values to create new credit control lines with :param check_tolerance: boolean if True credit line will not be generated if open amount is smaller than company defined tolerance :returns: recordset of created credit lines
  • unlink(self)
  • write(self, values)

New fields (2)
  • line_ids Many2many → credit.control.line
    comodel_name='credit.control.line' default=<expr> domain="[('state', '!=', 'sent')]" string='Credit Control Lines'
  • name Selection
    default='to_be_sent' required=True selection=[('draft', 'Draft'), ('ignored', 'Ignored'), ('to_be_sent', 'To Do'), ('sent', 'Done')] string='Mark as'
Public methods (1)
  • mark_lines(self)
    Write state of selected credit lines to the one in entry done credit line will be ignored

New fields (6)
  • account_ids Many2many → account.account
    comodel_name='account.account' domain="[('account_type', '=', 'asset_receivable')]" help='This policy will be active only for the selected accounts' required=True string='Accounts'
  • active Boolean
    default=True
  • company_id Many2one → res.company
    comodel_name='res.company'
  • do_nothing Boolean
    help='For policies which should not generate lines or are obsolete'
  • level_ids One2many → credit.control.policy.level
    comodel_name='credit.control.policy.level' inverse_name='policy_id' string='Policy Levels'
  • name Char
    required=True
Public methods (1)
  • check_policy_against_account(self, account)
    Ensure that the policy corresponds to account relation

New fields (4)
  • do_nothing Boolean
    string='No follow policy'
  • move_line_ids Many2many → account.move.line
    comodel_name='account.move.line' default=<expr> relation='credit_changer_ml_rel' string='Move line to change'
  • new_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' required=True string='New Policy to Apply'
  • new_policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' required=True string='New level to apply'
Public methods (2)
  • onchange_policy_id(self)
    @api.onchange('new_policy_level_id')
  • set_new_policy(self)
    Set new policy on an invoice. This is done by creating a new credit control line related to the move line and the policy settled in the wizard form :return: ir.actions.act_windows dict

New fields (11)
  • channel Selection
    required=True selection=CHANNEL_LIST
  • computation_mode Selection
    required=True selection=[('net_days', 'Due Date'), ('end_of_month', 'Due Date, End Of Month'), ('previous_date', 'Previous Reminder')] string='Compute Mode'
  • custom_mail_text Html
    required=True string='Custom Mail Message' translate=True
  • custom_text Text
    required=True string='Custom Message' translate=True
  • custom_text_after_details Text
    string='Custom Message after details' translate=True
  • delay_days Integer
    required=True string='Delay (in days)'
  • email_template_id Many2one → mail.template
    comodel_name='mail.template' domain=[('model_id.model', '=', 'credit.control.communication')] required=True
  • level Integer
    required=True
  • mail_show_invoice_detail Boolean
    string='Show Invoice Details in mail'
  • name Char
    required=True translate=True
  • policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' ondelete='cascade' required=True string='Related Policy'
Public methods (1)
  • get_level_lines(self, controlling_date, lines)
    get all move lines in entry lines that match the current level

New fields (2)
  • line_ids Many2many → credit.control.line
    comodel_name='credit.control.line' default=<expr> string='Credit Control Lines'
  • mark_as_sent Boolean
    default=True help='Only letter lines will be marked.' string='Mark letter lines as done'
Public methods (1)
  • print_lines(self)

New fields (10)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> index=True readonly=True states={'draft': [('readonly', False)]}
  • credit_control_communication_count Integer
    compute='_compute_credit_control_count' string='# of Credit Control Communications'
  • credit_control_count Integer
    compute='_compute_credit_control_count' string='# of Credit Control Lines'
  • date Date
    readonly=True required=True states={'draft': [('readonly', False)]} string='Controlling Date'
  • hide_change_state_button Boolean
  • line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='run_id' string='Generated lines'
  • manual_ids Many2many → account.move.line
    comodel_name='account.move.line' copy=False help='If a credit control line has been generatedon a policy and the policy has been changed in the meantime, it has to be handled manually' readonly=True relation='credit_runreject_rel' string='Lines to handle manually'
  • policy_ids Many2many → credit.control.policy
    column1='run_id' column2='policy_id' comodel_name='credit.control.policy' default=<expr> readonly=True relation='credit_run_policy_rel' states={'draft': [('readonly', False)]} string='Policies'
  • report Html
    copy=False readonly=True
  • state Selection
    default='draft' readonly=True required=True selection=[('draft', 'Draft'), ('done', 'Done')]
Public methods (6)
  • generate_credit_lines(self)
    Generate credit control lines Lock the ``credit_control_run`` Postgres table to avoid concurrent calls of this method.
  • open_credit_communications(self)
    Open the generated communications.
  • open_credit_lines(self)
    Open the generated lines
  • run_channel_action(self)
  • set_to_ready_lines(self)
  • unlink(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • message_format(self, format_reply=True)

New fields (2)
  • credit_control_tolerance Float
    default=0.1 readonly=False
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' help='The Credit Control Policy used on partners by default. This setting can be overridden on partners or invoices.' readonly=False string='Credit Control Policy'
Public methods (0)

No public methods.

New fields (2)
  • credit_control_tolerance Float
    readonly=False related='company_id.credit_control_tolerance'
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' help='The Credit Control Policy used on partners by default. This setting can be overridden on partners or invoices.' readonly=False related='company_id.credit_policy_id' string='Credit Control Policy'
Public methods (0)

No public methods.

New fields (9)
  • credit_control_analysis_ids One2many → credit.control.analysis
    groups='account_credit_control.group_account_credit_control_info' string='Credit Control Levels' args: 'credit.control.analysis', 'partner_id'
  • credit_control_count Integer
    compute='_compute_credit_control_count' string='# of Credit Control Lines'
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' help='The Credit Control Policy used for this partner. This setting can be forced on the invoice. If nothing is defined, it will use the company setting.' string='Credit Control Policy'
  • manual_followup Boolean
  • payment_next_action Text
    help='This is the next action to be taken.' string='Next Action' tracking=True
  • payment_next_action_date Date
    help='This is when the manual follow-up is needed.' string='Next Action Date' tracking=True
  • payment_next_action_type Many2one → res.partner.payment.action.type
    comodel_name='res.partner.payment.action.type' string='Next Action Type' tracking=True
  • payment_note Text
    help='Payment Note' string='Customer Payment Promise' tracking=True
  • payment_responsible_id Many2one → res.users
    comodel_name='res.users' help='Optionally you can assign a user to this field, which will make him responsible for the action.' ondelete='set null' string='Follow-up Responsible' tracking=True
Public methods (0)

No public methods.

New fields (5)
  • active Boolean
    default=True
  • company_id Many2one → res.company
    default=<expr> args: 'res.company'
  • name Char
  • partner_ids One2many → res.partner
    comodel_name='res.partner' inverse_name='payment_next_action_type' string='Partners'
  • sequence Integer
    default=10
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/credit-control
GIT
GIThttps://github.com/OCA/credit-control.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/credit-control/tree/15.0/account_credit_control
VERSION
VERSION 1.4.0
CATEGORY
CATEGORYFinance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA), Camptocamp, ACSONE SA/NV, Okia, Access Bookings
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSPedro M. Baeza, Víctor Martínez, Weblate, OCA-git-bot, antonio, oca-ci, dsolanki, Cesar Andres Sanchez, Luis D. Lafaurie, josep-tecnativa
WEBSITE
WEBSITEhttps://github.com/OCA/credit-control
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:46:41
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
    - account
    - base_setup
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (28)
XML IDNameModelTypeStatus
credit_control_analysis_pivot_view credit.control.analysis.pivot (in account_credit_control_analysis) credit.control.analysis pivot New
credit_control_analysis_tree_view credit.control.analysis.tree (in account_credit_control_analysis) credit.control.analysis tree New
credit_control_communication_form_view credit.control.communication.form credit.control.communication form New
credit_control_communication_search_view Credit Control Communications credit.control.communication search New
credit_control_communication_tree_view credit.control.communication.tree credit.control.communication tree New
credit_control_company_form credit.control.company.form res.company field Inherits base.view_company_form
credit_control_line_form credit.control.line.form credit.control.line form New
credit_control_line_search Credit Control Lines credit.control.line search New
credit_control_line_tree credit.control.line.tree credit.control.line tree New
credit_control_policy_changer_form credit control policy form credit.control.policy.changer form New
credit_control_policy_form credit.control.policy.form credit.control.policy form New
credit_control_policy_level_tree credit.control.policy.level.tree credit.control.policy.level tree New
credit_control_policy_tree credit.control.policy.tree credit.control.policy tree New
credit_control_run_form credit.control.run.form credit.control.run form New
credit_control_run_tree credit.control.run.tree credit.control.run tree New
credit_line_emailer_form credit.line.emailer.form credit.control.emailer form New
credit_line_marker_form credit.line.marker.form credit.control.marker form New
credit_line_printer_form credit.line.printer.form credit.control.printer form New
credit_mangement_policy_level_form credit.mangement.policy.level.form credit.control.policy.level form New
customer_followup_tree res.partner.followup.inherit.tree res.partner tree New
partner_followup_form_view partner.credit_control.form.view res.partner page Inherits account.view_partner_property_form
partner_view_buttons res.partner button Inherits account.partner_view_buttons
report_credit_control_summary report_credit_control_summary ir.ui.view qweb New
report_credit_control_summary_document report_credit_control_summary_document ir.ui.view qweb New
res_config_settings_view_form res.config.settings.view.form.inherit.credit.control res.config.settings xpath Inherits account.res_config_settings_view_form
res_partner_payment_action_type_form_view res.partner.payment.action.type.form res.partner.payment.action.type form New
res_partner_payment_action_type_tree_view res.partner.payment.action.type.form res.partner.payment.action.type tree New
view_move_form invoice.move.form account.move notebook Inherits account.view_move_form
Models touched (19)

New fields (1)
  • credit_control_line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='account_id' readonly=True string='Credit Lines'
Public methods (0)

No public methods.

New fields (2)
  • credit_control_line_ids One2many → credit.control.line
    comodel_name='credit.control.line' copy=False inverse_name='invoice_id' readonly=True string='Credit Lines'
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' copy=False groups='account_credit_control.group_account_credit_control_manager,account_credit_control.group_account_credit_control_user,account_credit_control.group_account_credit_control_info' help='The Credit Control Policy used for this invoice. If nothing is defined, it will use the account setting or the partner setting.' readonly=True string='Credit Control Policy'
Public methods (1)
  • button_cancel(self)
    Prevent to cancel invoice related to credit line

New fields (8)
  • company_id Many2one → res.company
    comodel_name='res.company' readonly=True
  • currency_id Many2one → res.currency
    comodel_name='res.currency' readonly=True
  • level Integer
    readonly=True string='Max Level'
  • open_balance Float
    help='Open balance on credit control linesof same partner, policy and currency' readonly=True string='Overdue Balance'
  • partner_id Many2one → res.partner
    comodel_name='res.partner' readonly=True
  • partner_ref Char
    readonly=True
  • policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' readonly=True
  • policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' readonly=True string='Overdue Level'
Public methods (1)
  • init(self)

New fields (11)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> index=True required=True
  • contact_address_id Many2one → res.partner
    comodel_name='res.partner' index=True readonly=True
  • credit_control_line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='communication_id' string='Credit Lines'
  • currency_id Many2one → res.currency
    comodel_name='res.currency' index=True required=True
  • partner_id Many2one → res.partner
    comodel_name='res.partner' index=True required=True
  • policy_id Many2one
    index=True related='policy_level_id.policy_id' store=True
  • policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' index=True required=True string='Level'
  • report_date Date
    default=<expr>
  • total_due Float
    compute='_compute_total'
  • total_invoiced Float
    compute='_compute_total'
  • user_id Many2one → res.users
    comodel_name='res.users' default=<expr> index=True
Public methods (2)
  • get_email(self)
    Kept for backwards compatibility. To be removed in v13/v14
  • get_emailing_contact(self)
    Return a valid customer for the emailing. If the contact address doesn't have a valid email we fallback to the commercial partner

New fields (1)
  • line_ids Many2many → credit.control.line
    comodel_name='credit.control.line' default=<expr> domain=[('state', '=', 'to_be_sent'), ('channel', '=', 'email')] string='Credit Control Lines'
Public methods (1)
  • email_lines(self)

New fields (23)
  • account_id Many2one → account.account
    comodel_name='account.account' related='move_line_id.account_id' store=True
  • amount_due Float
    readonly=True required=True string='Due Amount Tax incl.'
  • balance_due Float
    readonly=True required=True string='Due balance'
  • channel Selection
    readonly=True required=True selection=CHANNEL_LIST states={'draft': [('readonly', False)]}
  • commercial_partner_id Many2one → res.partner
    comodel_name='res.partner' compute_sudo=True index=True related='partner_id.commercial_partner_id' store=True string='Commercial Entity'
  • communication_id Many2one → credit.control.communication
    comodel_name='credit.control.communication' help='Credit control communication process where this line belongs' string='Communication process'
  • company_id Many2one → res.company
    comodel_name='res.company' related='move_line_id.company_id' store=True
  • currency_id Many2one → res.currency
    comodel_name='res.currency' related='move_line_id.currency_id' store=True
  • date Date
    index=True readonly=True required=True states={'draft': [('readonly', False)]} string='Controlling date'
  • date_due Date
    readonly=True required=True states={'draft': [('readonly', False)]} string='Due date'
  • date_entry Date
    related='move_line_id.date' store=True string='Entry date'
  • date_sent Date
    readonly=True states={'draft': [('readonly', False)]} string='Reminded date'
  • invoice_id Many2one → account.move
    comodel_name='account.move' readonly=True
  • level Integer
    group_operator='max' related='policy_level_id.level' store=True
  • manual_followup Boolean
  • manually_overridden Boolean
  • move_line_id Many2one → account.move.line
    comodel_name='account.move.line' index=True readonly=True required=True string='Move line'
  • partner_id Many2one → res.partner
    comodel_name='res.partner' readonly=True required=True states={'draft': [('readonly', False)]}
  • partner_user_id Many2one → res.users
    comodel_name='res.users' compute='_compute_partner_user_id' store=True string='Salesperson'
  • policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' related='policy_level_id.policy_id' store=True
  • policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' readonly=True required=True states={'draft': [('readonly', False)]} string='Overdue Level'
  • run_id Many2one → credit.control.run
    comodel_name='credit.control.run' string='Source'
  • state Selection
    default='draft' help='Draft lines need to be triaged.\nIgnored lines are lines for which we do not want to send something.\nDraft and ignored lines will be generated again on the next run.' readonly=True required=True selection=[('draft', 'Draft'), ('ignored', 'Ignored'), ('queued', 'Queued'), ('to_be_sent', 'To Do'), ('sent', 'Done'), ('error', 'Error'), ('email_error', 'Emailing Error')] tracking=True
Public methods (5)
  • button_credit_control_line_form(self)
  • button_schedule_activity(self)
  • create_or_update_from_mv_lines(self, lines, level, controlling_date, company, check_tolerance=True, default_lines_vals=None)
    @api.model
    Create or update line based on levels if check_tolerance is true credit line will not be created if open amount is too small. eg. we do not want to send a letter for 10 cents of open amount. :param lines: move.line id recordset :param level: credit.control.policy.level record :param controlling_date: date string of the credit controlling date. Generally it should be the same as create date :param company: res.company :param default_lines_vals: default values to create new credit control lines with :param check_tolerance: boolean if True credit line will not be generated if open amount is smaller than company defined tolerance :returns: recordset of created credit lines
  • unlink(self)
  • write(self, values)

New fields (2)
  • line_ids Many2many → credit.control.line
    comodel_name='credit.control.line' default=<expr> domain="[('state', '!=', 'sent')]" string='Credit Control Lines'
  • name Selection
    default='to_be_sent' required=True selection=[('draft', 'Draft'), ('ignored', 'Ignored'), ('to_be_sent', 'To Do'), ('sent', 'Done')] string='Mark as'
Public methods (1)
  • mark_lines(self)
    Write state of selected credit lines to the one in entry done credit line will be ignored

New fields (6)
  • account_ids Many2many → account.account
    comodel_name='account.account' domain="[('internal_type', '=', 'receivable')]" help='This policy will be active only for the selected accounts' required=True string='Accounts'
  • active Boolean
    default=True
  • company_id Many2one → res.company
    comodel_name='res.company'
  • do_nothing Boolean
    help='For policies which should not generate lines or are obsolete'
  • level_ids One2many → credit.control.policy.level
    comodel_name='credit.control.policy.level' inverse_name='policy_id' string='Policy Levels'
  • name Char
    required=True
Public methods (1)
  • check_policy_against_account(self, account)
    Ensure that the policy corresponds to account relation

New fields (4)
  • do_nothing Boolean
    string='No follow policy'
  • move_line_ids Many2many → account.move.line
    comodel_name='account.move.line' default=<expr> relation='credit_changer_ml_rel' string='Move line to change'
  • new_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' required=True string='New Policy to Apply'
  • new_policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' required=True string='New level to apply'
Public methods (2)
  • onchange_policy_id(self)
    @api.onchange('new_policy_level_id')
  • set_new_policy(self)
    Set new policy on an invoice. This is done by creating a new credit control line related to the move line and the policy settled in the wizard form :return: ir.actions.act_windows dict

New fields (11)
  • channel Selection
    required=True selection=CHANNEL_LIST
  • computation_mode Selection
    required=True selection=[('net_days', 'Due Date'), ('end_of_month', 'Due Date, End Of Month'), ('previous_date', 'Previous Reminder')] string='Compute Mode'
  • custom_mail_text Html
    required=True string='Custom Mail Message' translate=True
  • custom_text Text
    required=True string='Custom Message' translate=True
  • custom_text_after_details Text
    string='Custom Message after details' translate=True
  • delay_days Integer
    required=True string='Delay (in days)'
  • email_template_id Many2one → mail.template
    comodel_name='mail.template' domain=[('model_id.model', '=', 'credit.control.communication')] required=True
  • level Integer
    required=True
  • mail_show_invoice_detail Boolean
    string='Show Invoice Details in mail'
  • name Char
    required=True translate=True
  • policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' ondelete='cascade' required=True string='Related Policy'
Public methods (1)
  • get_level_lines(self, controlling_date, lines)
    get all move lines in entry lines that match the current level

New fields (2)
  • line_ids Many2many → credit.control.line
    comodel_name='credit.control.line' default=<expr> string='Credit Control Lines'
  • mark_as_sent Boolean
    default=True help='Only letter lines will be marked.' string='Mark letter lines as done'
Public methods (1)
  • print_lines(self)

New fields (10)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> index=True readonly=True states={'draft': [('readonly', False)]}
  • credit_control_communication_count Integer
    compute='_compute_credit_control_count' string='# of Credit Control Communications'
  • credit_control_count Integer
    compute='_compute_credit_control_count' string='# of Credit Control Lines'
  • date Date
    readonly=True required=True states={'draft': [('readonly', False)]} string='Controlling Date'
  • hide_change_state_button Boolean
  • line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='run_id' string='Generated lines'
  • manual_ids Many2many → account.move.line
    comodel_name='account.move.line' copy=False help='If a credit control line has been generatedon a policy and the policy has been changed in the meantime, it has to be handled manually' readonly=True relation='credit_runreject_rel' string='Lines to handle manually'
  • policy_ids Many2many → credit.control.policy
    column1='run_id' column2='policy_id' comodel_name='credit.control.policy' default=<expr> readonly=True relation='credit_run_policy_rel' states={'draft': [('readonly', False)]} string='Policies'
  • report Html
    copy=False readonly=True
  • state Selection
    default='draft' readonly=True required=True selection=[('draft', 'Draft'), ('done', 'Done')]
Public methods (6)
  • generate_credit_lines(self)
    Generate credit control lines Lock the ``credit_control_run`` Postgres table to avoid concurrent calls of this method.
  • open_credit_communications(self)
    Open the generated communications.
  • open_credit_lines(self)
    Open the generated lines
  • run_channel_action(self)
  • set_to_ready_lines(self)
  • unlink(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • message_format(self, format_reply=True)

New fields (2)
  • credit_control_tolerance Float
    default=0.1 readonly=False
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' help='The Credit Control Policy used on partners by default. This setting can be overridden on partners or invoices.' readonly=False string='Credit Control Policy'
Public methods (0)

No public methods.

New fields (2)
  • credit_control_tolerance Float
    readonly=False related='company_id.credit_control_tolerance'
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' help='The Credit Control Policy used on partners by default. This setting can be overridden on partners or invoices.' readonly=False related='company_id.credit_policy_id' string='Credit Control Policy'
Public methods (0)

No public methods.

New fields (9)
  • credit_control_analysis_ids One2many → credit.control.analysis
    string='Credit Control Levels' args: 'credit.control.analysis', 'partner_id'
  • credit_control_count Integer
    compute='_compute_credit_control_count' string='# of Credit Control Lines'
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' domain="[('account_ids', 'in', property_account_receivable_id)]" help='The Credit Control Policy used for this partner. This setting can be forced on the invoice. If nothing is defined, it will use the company setting.' string='Credit Control Policy'
  • manual_followup Boolean
  • payment_next_action Text
    help='This is the next action to be taken.' string='Next Action' tracking=True
  • payment_next_action_date Date
    help='This is when the manual follow-up is needed.' string='Next Action Date' tracking=True
  • payment_next_action_type Many2one → res.partner.payment.action.type
    comodel_name='res.partner.payment.action.type' string='Next Action Type' tracking=True
  • payment_note Text
    help='Payment Note' string='Customer Payment Promise' tracking=True
  • payment_responsible_id Many2one → res.users
    comodel_name='res.users' help='Optionally you can assign a user to this field, which will make him responsible for the action.' ondelete='set null' string='Follow-up Responsible' tracking=True
Public methods (0)

No public methods.

New fields (5)
  • active Boolean
    default=True
  • company_id Many2one → res.company
    default=<expr> args: 'res.company'
  • name Char
  • partner_ids One2many → res.partner
    comodel_name='res.partner' inverse_name='payment_next_action_type' string='Partners'
  • sequence Integer
    default=10
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/credit-control
GIT
GIThttps://github.com/OCA/credit-control.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/credit-control/tree/14.0/account_credit_control
VERSION
VERSION 1.5.0
CATEGORY
CATEGORYFinance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA), Camptocamp, ACSONE SA/NV, Okia, Access Bookings
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSPedro M. Baeza, Naglis Jonaitis, OCA Transbot, Víctor Martínez, oca-travis, Weblate, OCA-git-bot, Abraham Anes, oca-ci, Xavier Bouquiaux, oca-git-bot, Núria Sancho
WEBSITE
WEBSITEhttps://github.com/OCA/credit-control
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:41:10
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
    - account
    - base_setup
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (28)
XML IDNameModelTypeStatus
credit_control_analysis_pivot_view credit.control.analysis.pivot (in account_credit_control_analysis) credit.control.analysis pivot New
credit_control_analysis_tree_view credit.control.analysis.tree (in account_credit_control_analysis) credit.control.analysis tree New
credit_control_communication_form_view credit.control.communication.form credit.control.communication form New
credit_control_communication_search_view Credit Control Communications credit.control.communication search New
credit_control_communication_tree_view credit.control.communication.tree credit.control.communication tree New
credit_control_company_form credit.control.company.form res.company field Inherits base.view_company_form
credit_control_line_form credit.control.line.form credit.control.line form New
credit_control_line_search Credit Control Lines credit.control.line search New
credit_control_line_tree credit.control.line.tree credit.control.line tree New
credit_control_policy_changer_form credit control policy form credit.control.policy.changer form New
credit_control_policy_form credit.control.policy.form credit.control.policy form New
credit_control_policy_level_tree credit.control.policy.level.tree credit.control.policy.level tree New
credit_control_policy_tree credit.control.policy.tree credit.control.policy tree New
credit_control_run_form credit.control.run.form credit.control.run form New
credit_control_run_tree credit.control.run.tree credit.control.run tree New
credit_line_emailer_form credit.line.emailer.form credit.control.emailer form New
credit_line_marker_form credit.line.marker.form credit.control.marker form New
credit_line_printer_form credit.line.printer.form credit.control.printer form New
credit_mangement_policy_level_form credit.mangement.policy.level.form credit.control.policy.level form New
customer_followup_tree res.partner.followup.inherit.tree res.partner tree New
partner_followup_form_view partner.credit_control.form.view res.partner page Inherits account.view_partner_property_form
partner_view_buttons res.partner button Inherits account.partner_view_buttons
report_credit_control_summary report_credit_control_summary ir.ui.view qweb New
report_credit_control_summary_document report_credit_control_summary_document ir.ui.view qweb New
res_config_settings_view_form res.config.settings.view.form.inherit.credit.control res.config.settings xpath Inherits account.res_config_settings_view_form
res_partner_payment_action_type_form_view res.partner.payment.action.type.form res.partner.payment.action.type form New
res_partner_payment_action_type_tree_view res.partner.payment.action.type.form res.partner.payment.action.type tree New
view_move_form invoice.move.form account.move notebook Inherits account.view_move_form
Models touched (19)

New fields (1)
  • credit_control_line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='account_id' readonly=True string='Credit Lines'
Public methods (0)

No public methods.

New fields (2)
  • credit_control_line_ids One2many → credit.control.line
    comodel_name='credit.control.line' copy=False inverse_name='invoice_id' readonly=True string='Credit Lines'
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' copy=False groups='account_credit_control.group_account_credit_control_manager,account_credit_control.group_account_credit_control_user,account_credit_control.group_account_credit_control_info' help='The Credit Control Policy used for this invoice. If nothing is defined, it will use the account setting or the partner setting.' readonly=True string='Credit Control Policy'
Public methods (1)
  • button_cancel(self)
    Prevent to cancel invoice related to credit line

New fields (8)
  • company_id Many2one → res.company
    comodel_name='res.company' readonly=True
  • currency_id Many2one → res.currency
    comodel_name='res.currency' readonly=True
  • level Integer
    readonly=True string='Max Level'
  • open_balance Float
    help='Open balance on credit control linesof same partner, policy and currency' readonly=True string='Overdue Balance'
  • partner_id Many2one → res.partner
    comodel_name='res.partner' readonly=True
  • partner_ref Char
    readonly=True
  • policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' readonly=True
  • policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' readonly=True string='Overdue Level'
Public methods (1)
  • init(self)

New fields (11)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> index=True required=True
  • contact_address_id Many2one → res.partner
    comodel_name='res.partner' index=True readonly=True
  • credit_control_line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='communication_id' string='Credit Lines'
  • currency_id Many2one → res.currency
    comodel_name='res.currency' index=True required=True
  • partner_id Many2one → res.partner
    comodel_name='res.partner' index=True required=True
  • policy_id Many2one
    index=True related='policy_level_id.policy_id' store=True
  • policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' index=True required=True string='Level'
  • report_date Date
    default=<expr>
  • total_due Float
    compute='_compute_total'
  • total_invoiced Float
    compute='_compute_total'
  • user_id Many2one → res.users
    comodel_name='res.users' default=<expr> index=True
Public methods (2)
  • get_email(self)
    Kept for backwards compatibility. To be removed in v13/v14
  • get_emailing_contact(self)
    Return a valid customer for the emailing. If the contact address doesn't have a valid email we fallback to the commercial partner

New fields (1)
  • line_ids Many2many → credit.control.line
    comodel_name='credit.control.line' default=<expr> domain=[('state', '=', 'to_be_sent'), ('channel', '=', 'email')] string='Credit Control Lines'
Public methods (1)
  • email_lines(self)

New fields (23)
  • account_id Many2one → account.account
    comodel_name='account.account' related='move_line_id.account_id' store=True
  • amount_due Float
    readonly=True required=True string='Due Amount Tax incl.'
  • balance_due Float
    readonly=True required=True string='Due balance'
  • channel Selection
    readonly=True required=True selection=CHANNEL_LIST states={'draft': [('readonly', False)]}
  • commercial_partner_id Many2one → res.partner
    comodel_name='res.partner' compute_sudo=True index=True related='partner_id.commercial_partner_id' store=True string='Commercial Entity'
  • communication_id Many2one → credit.control.communication
    comodel_name='credit.control.communication' help='Credit control communication process where this line belongs' string='Communication process'
  • company_id Many2one → res.company
    comodel_name='res.company' related='move_line_id.company_id' store=True
  • currency_id Many2one → res.currency
    comodel_name='res.currency' related='move_line_id.currency_id' store=True
  • date Date
    index=True readonly=True required=True states={'draft': [('readonly', False)]} string='Controlling date'
  • date_due Date
    readonly=True required=True states={'draft': [('readonly', False)]} string='Due date'
  • date_entry Date
    related='move_line_id.date' store=True string='Entry date'
  • date_sent Date
    readonly=True states={'draft': [('readonly', False)]} string='Reminded date'
  • invoice_id Many2one → account.move
    comodel_name='account.move' readonly=True
  • level Integer
    group_operator='max' related='policy_level_id.level' store=True
  • manual_followup Boolean
  • manually_overridden Boolean
  • move_line_id Many2one → account.move.line
    comodel_name='account.move.line' index=True readonly=True required=True string='Move line'
  • partner_id Many2one → res.partner
    comodel_name='res.partner' readonly=True required=True states={'draft': [('readonly', False)]}
  • partner_user_id Many2one → res.users
    comodel_name='res.users' compute='_compute_partner_user_id' store=True string='Salesperson'
  • policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' related='policy_level_id.policy_id' store=True
  • policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' readonly=True required=True states={'draft': [('readonly', False)]} string='Overdue Level'
  • run_id Many2one → credit.control.run
    comodel_name='credit.control.run' string='Source'
  • state Selection
    default='draft' help='Draft lines need to be triaged.\nIgnored lines are lines for which we do not want to send something.\nDraft and ignored lines will be generated again on the next run.' readonly=True required=True selection=[('draft', 'Draft'), ('ignored', 'Ignored'), ('queued', 'Queued'), ('to_be_sent', 'To Do'), ('sent', 'Done'), ('error', 'Error'), ('email_error', 'Emailing Error')] tracking=True
Public methods (5)
  • button_credit_control_line_form(self)
  • button_schedule_activity(self)
  • create_or_update_from_mv_lines(self, lines, level, controlling_date, company, check_tolerance=True, default_lines_vals=None)
    @api.model
    Create or update line based on levels if check_tolerance is true credit line will not be created if open amount is too small. eg. we do not want to send a letter for 10 cents of open amount. :param lines: move.line id recordset :param level: credit.control.policy.level record :param controlling_date: date string of the credit controlling date. Generally it should be the same as create date :param company: res.company :param default_lines_vals: default values to create new credit control lines with :param check_tolerance: boolean if True credit line will not be generated if open amount is smaller than company defined tolerance :returns: recordset of created credit lines
  • unlink(self)
  • write(self, values)

New fields (2)
  • line_ids Many2many → credit.control.line
    comodel_name='credit.control.line' default=<expr> domain="[('state', '!=', 'sent')]" string='Credit Control Lines'
  • name Selection
    default='to_be_sent' required=True selection=[('draft', 'Draft'), ('ignored', 'Ignored'), ('to_be_sent', 'To Do'), ('sent', 'Done')] string='Mark as'
Public methods (1)
  • mark_lines(self)
    Write state of selected credit lines to the one in entry done credit line will be ignored

New fields (6)
  • account_ids Many2many → account.account
    comodel_name='account.account' domain="[('internal_type', '=', 'receivable')]" help='This policy will be active only for the selected accounts' required=True string='Accounts'
  • active Boolean
    default=True
  • company_id Many2one → res.company
    comodel_name='res.company'
  • do_nothing Boolean
    help='For policies which should not generate lines or are obsolete'
  • level_ids One2many → credit.control.policy.level
    comodel_name='credit.control.policy.level' inverse_name='policy_id' string='Policy Levels'
  • name Char
    required=True
Public methods (1)
  • check_policy_against_account(self, account)
    Ensure that the policy corresponds to account relation

New fields (4)
  • do_nothing Boolean
    string='No follow policy'
  • move_line_ids Many2many → account.move.line
    comodel_name='account.move.line' default=<expr> string='Move line to change'
  • new_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' required=True string='New Policy to Apply'
  • new_policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' required=True string='New level to apply'
Public methods (2)
  • onchange_policy_id(self)
    @api.onchange('new_policy_level_id')
  • set_new_policy(self)
    Set new policy on an invoice. This is done by creating a new credit control line related to the move line and the policy settled in the wizard form :return: ir.actions.act_windows dict

New fields (11)
  • channel Selection
    required=True selection=CHANNEL_LIST
  • computation_mode Selection
    required=True selection=[('net_days', 'Due Date'), ('end_of_month', 'Due Date, End Of Month'), ('previous_date', 'Previous Reminder')] string='Compute Mode'
  • custom_mail_text Html
    required=True string='Custom Mail Message' translate=True
  • custom_text Text
    required=True string='Custom Message' translate=True
  • custom_text_after_details Text
    string='Custom Message after details' translate=True
  • delay_days Integer
    required=True string='Delay (in days)'
  • email_template_id Many2one → mail.template
    comodel_name='mail.template' domain=[('model_id.model', '=', 'credit.control.communication')] required=True
  • level Integer
    required=True
  • mail_show_invoice_detail Boolean
    string='Show Invoice Details in mail'
  • name Char
    required=True translate=True
  • policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' ondelete='cascade' required=True string='Related Policy'
Public methods (1)
  • get_level_lines(self, controlling_date, lines)
    get all move lines in entry lines that match the current level

New fields (2)
  • line_ids Many2many → credit.control.line
    comodel_name='credit.control.line' default=<expr> string='Credit Control Lines'
  • mark_as_sent Boolean
    default=True help='Only letter lines will be marked.' string='Mark letter lines as done'
Public methods (1)
  • print_lines(self)

New fields (10)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> index=True readonly=True states={'draft': [('readonly', False)]}
  • credit_control_communication_count Integer
    compute='_compute_credit_control_count' string='# of Credit Control Communications'
  • credit_control_count Integer
    compute='_compute_credit_control_count' string='# of Credit Control Lines'
  • date Date
    readonly=True required=True states={'draft': [('readonly', False)]} string='Controlling Date'
  • hide_change_state_button Boolean
  • line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='run_id' string='Generated lines'
  • manual_ids Many2many → account.move.line
    comodel_name='account.move.line' copy=False help='If a credit control line has been generatedon a policy and the policy has been changed in the meantime, it has to be handled manually' readonly=True string='Lines to handle manually'
  • policy_ids Many2many → credit.control.policy
    column1='run_id' column2='policy_id' comodel_name='credit.control.policy' default=<expr> readonly=True relation='credit_run_policy_rel' states={'draft': [('readonly', False)]} string='Policies'
  • report Html
    copy=False readonly=True
  • state Selection
    default='draft' readonly=True required=True selection=[('draft', 'Draft'), ('done', 'Done')]
Public methods (6)
  • generate_credit_lines(self)
    Generate credit control lines Lock the ``credit_control_run`` Postgres table to avoid concurrent calls of this method.
  • open_credit_communications(self)
    Open the generated communications.
  • open_credit_lines(self)
    Open the generated lines
  • run_channel_action(self)
  • set_to_ready_lines(self)
  • unlink(self)

New fields (0)

No new fields.

Public methods (1)
  • onchange_template_id(self, template_id, composition_mode, model, res_id)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • message_format(self)

New fields (2)
  • credit_control_tolerance Float
    default=0.1 readonly=False
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' help='The Credit Control Policy used on partners by default. This setting can be overridden on partners or invoices.' readonly=False string='Credit Control Policy'
Public methods (0)

No public methods.

New fields (2)
  • credit_control_tolerance Float
    readonly=False related='company_id.credit_control_tolerance'
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' help='The Credit Control Policy used on partners by default. This setting can be overridden on partners or invoices.' readonly=False related='company_id.credit_policy_id' string='Credit Control Policy'
Public methods (0)

No public methods.

New fields (9)
  • credit_control_analysis_ids One2many → credit.control.analysis
    string='Credit Control Levels' args: 'credit.control.analysis', 'partner_id'
  • credit_control_count Integer
    compute='_compute_credit_control_count' string='# of Credit Control Lines'
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' domain="[('account_ids', 'in', property_account_receivable_id)]" help='The Credit Control Policy used for this partner. This setting can be forced on the invoice. If nothing is defined, it will use the company setting.' string='Credit Control Policy'
  • manual_followup Boolean
  • payment_next_action Text
    help='This is the next action to be taken.' string='Next Action' tracking=True
  • payment_next_action_date Date
    help='This is when the manual follow-up is needed.' string='Next Action Date' tracking=True
  • payment_next_action_type Many2one → res.partner.payment.action.type
    comodel_name='res.partner.payment.action.type' string='Next Action Type' tracking=True
  • payment_note Text
    help='Payment Note' string='Customer Payment Promise' tracking=True
  • payment_responsible_id Many2one → res.users
    comodel_name='res.users' help='Optionally you can assign a user to this field, which will make him responsible for the action.' ondelete='set null' string='Follow-up Responsible' tracking=True
Public methods (0)

No public methods.

New fields (5)
  • active Boolean
    default=True
  • company_id Many2one → res.company
    default=<expr> args: 'res.company'
  • name Char
  • partner_ids One2many → res.partner
    comodel_name='res.partner' inverse_name='payment_next_action_type' string='Partners'
  • sequence Integer
    default=10
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/credit-control
GIT
GIThttps://github.com/OCA/credit-control.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/credit-control/tree/13.0/account_credit_control
VERSION
VERSION 2.4.0
CATEGORY
CATEGORYFinance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA), Camptocamp, ACSONE SA/NV, Okia, Access Bookings
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSPedro M. Baeza, GitHub, Jairo Llopis, mreficent, Carlos Dauden, Enric Tobella, david, Cas Vissers, OCA Transbot, Víctor Martínez, João Marques, oca-travis, Weblate, OCA-git-bot, Dawson Coleman
WEBSITE
WEBSITEhttps://github.com/OCA/credit-control
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:34:19
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
    - account
    - base_setup
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (28)
XML IDNameModelTypeStatus
credit_control_analysis_pivot_view credit.control.analysis.pivot (in account_credit_control_analysis) credit.control.analysis pivot New
credit_control_analysis_tree_view credit.control.analysis.tree (in account_credit_control_analysis) credit.control.analysis tree New
credit_control_communication_form_view credit.control.communication.form credit.control.communication form New
credit_control_communication_search_view Credit Control Communications credit.control.communication search New
credit_control_communication_tree_view credit.control.communication.tree credit.control.communication tree New
credit_control_company_form credit.control.company.form res.company field Inherits base.view_company_form
credit_control_line_form credit.control.line.form credit.control.line form New
credit_control_line_search Credit Control Lines credit.control.line search New
credit_control_line_tree credit.control.line.tree credit.control.line tree New
credit_control_policy_changer_form credit control policy form credit.control.policy.changer form New
credit_control_policy_form credit.control.policy.form credit.control.policy form New
credit_control_policy_level_tree credit.control.policy.level.tree credit.control.policy.level tree New
credit_control_policy_tree credit.control.policy.tree credit.control.policy tree New
credit_control_run_form credit.control.run.form credit.control.run form New
credit_control_run_tree credit.control.run.tree credit.control.run tree New
credit_line_emailer_form credit.line.emailer.form credit.control.emailer form New
credit_line_marker_form credit.line.marker.form credit.control.marker form New
credit_line_printer_form credit.line.printer.form credit.control.printer form New
credit_mangement_policy_level_form credit.mangement.policy.level.form credit.control.policy.level form New
customer_followup_tree res.partner.followup.inherit.tree res.partner tree New
partner_followup_form_view partner.credit_control.form.view res.partner page Inherits account.view_partner_property_form
partner_view_buttons res.partner button Inherits account.partner_view_buttons
report_credit_control_summary report_credit_control_summary ir.ui.view qweb New
report_credit_control_summary_document report_credit_control_summary_document ir.ui.view qweb New
res_config_settings_view_form res.config.settings.view.form.inherit.credit.control res.config.settings xpath Inherits account.res_config_settings_view_form
res_partner_payment_action_type_form_view res.partner.payment.action.type.form res.partner.payment.action.type form New
res_partner_payment_action_type_tree_view res.partner.payment.action.type.form res.partner.payment.action.type tree New
view_move_form invoice.move.form account.move notebook Inherits account.view_move_form
Models touched (18)

New fields (1)
  • credit_control_line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='account_id' readonly=True string='Credit Lines'
Public methods (0)

No public methods.

New fields (2)
  • credit_control_line_ids One2many → credit.control.line
    comodel_name='credit.control.line' copy=False inverse_name='invoice_id' readonly=True string='Credit Lines'
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' copy=False groups='account_credit_control.group_account_credit_control_manager,account_credit_control.group_account_credit_control_user,account_credit_control.group_account_credit_control_info' help='The Credit Control Policy used for this invoice. If nothing is defined, it will use the account setting or the partner setting.' readonly=True string='Credit Control Policy'
Public methods (1)
  • button_cancel(self)
    Prevent to cancel invoice related to credit line

New fields (8)
  • company_id Many2one → res.company
    comodel_name='res.company' readonly=True
  • currency_id Many2one → res.currency
    comodel_name='res.currency' readonly=True
  • level Integer
    readonly=True string='Max Level'
  • open_balance Float
    help='Open balance on credit control linesof same partner, policy and currency' readonly=True string='Overdue Balance'
  • partner_id Many2one → res.partner
    comodel_name='res.partner' readonly=True
  • partner_ref Char
    readonly=True string='Partner Ref'
  • policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' readonly=True string='Policy'
  • policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' readonly=True string='Overdue Level'
Public methods (1)
  • init(self)

New fields (11)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> index=True required=True string='Company'
  • contact_address_id Many2one → res.partner
    comodel_name='res.partner' index=True readonly=True
  • credit_control_line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='communication_id' string='Credit Lines'
  • currency_id Many2one → res.currency
    comodel_name='res.currency' index=True required=True string='Currency'
  • partner_id Many2one → res.partner
    comodel_name='res.partner' index=True required=True string='Partner'
  • policy_id Many2one
    index=True related='policy_level_id.policy_id' store=True
  • policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' index=True required=True string='Level'
  • report_date Date
    default=<expr>
  • total_due Float
    compute='_compute_total'
  • total_invoiced Float
    compute='_compute_total'
  • user_id Many2one → res.users
    comodel_name='res.users' default=<expr> index=True string='User'
Public methods (2)
  • get_email(self)
    Kept for backwards compatibility. To be removed in v13/v14
  • get_emailing_contact(self)
    Return a valid customer for the emailing. If the contact address doesn't have a valid email we fallback to the commercial partner

New fields (1)
  • line_ids Many2many → credit.control.line
    comodel_name='credit.control.line' default=<expr> domain=[('state', '=', 'to_be_sent'), ('channel', '=', 'email')] string='Credit Control Lines'
Public methods (1)
  • email_lines(self)

New fields (23)
  • account_id Many2one → account.account
    comodel_name='account.account' related='move_line_id.account_id' store=True
  • amount_due Float
    readonly=True required=True string='Due Amount Tax incl.'
  • balance_due Float
    readonly=True required=True string='Due balance'
  • channel Selection
    readonly=True required=True selection=CHANNEL_LIST states={'draft': [('readonly', False)]}
  • commercial_partner_id Many2one → res.partner
    comodel_name='res.partner' compute_sudo=True index=True related='partner_id.commercial_partner_id' store=True string='Commercial Entity'
  • communication_id Many2one → credit.control.communication
    comodel_name='credit.control.communication' help='Credit control communication process where this line belongs' string='Communication process'
  • company_id Many2one → res.company
    comodel_name='res.company' related='move_line_id.company_id' store=True
  • currency_id Many2one → res.currency
    comodel_name='res.currency' related='move_line_id.currency_id' store=True
  • date Date
    index=True readonly=True required=True states={'draft': [('readonly', False)]} string='Controlling date'
  • date_due Date
    readonly=True required=True states={'draft': [('readonly', False)]} string='Due date'
  • date_entry Date
    related='move_line_id.date' store=True string='Entry date'
  • date_sent Date
    readonly=True states={'draft': [('readonly', False)]} string='Reminded date'
  • invoice_id Many2one → account.move
    comodel_name='account.move' readonly=True string='Invoice'
  • level Integer
    group_operator='max' related='policy_level_id.level' store=True
  • manual_followup Boolean
  • manually_overridden Boolean
  • move_line_id Many2one → account.move.line
    comodel_name='account.move.line' index=True readonly=True required=True string='Move line'
  • partner_id Many2one → res.partner
    comodel_name='res.partner' readonly=True required=True states={'draft': [('readonly', False)]} string='Partner'
  • partner_user_id Many2one → res.users
    comodel_name='res.users' compute='_compute_partner_user_id' store=True string='Salesperson'
  • policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' related='policy_level_id.policy_id' store=True
  • policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' readonly=True required=True states={'draft': [('readonly', False)]} string='Overdue Level'
  • run_id Many2one → credit.control.run
    comodel_name='credit.control.run' string='Source'
  • state Selection
    default='draft' help='Draft lines need to be triaged.\nIgnored lines are lines for which we do not want to send something.\nDraft and ignored lines will be generated again on the next run.' readonly=True required=True selection=[('draft', 'Draft'), ('ignored', 'Ignored'), ('queued', 'Queued'), ('to_be_sent', 'To Do'), ('sent', 'Done'), ('error', 'Error'), ('email_error', 'Emailing Error')] tracking=True
Public methods (5)
  • button_credit_control_line_form(self)
  • button_schedule_activity(self)
  • create_or_update_from_mv_lines(self, lines, level, controlling_date, company, check_tolerance=True, default_lines_vals=None)
    @api.model
    Create or update line based on levels if check_tolerance is true credit line will not be created if open amount is too small. eg. we do not want to send a letter for 10 cents of open amount. :param lines: move.line id recordset :param level: credit.control.policy.level record :param controlling_date: date string of the credit controlling date. Generally it should be the same as create date :param company: res.company :param default_lines_vals: default values to create new credit control lines with :param check_tolerance: boolean if True credit line will not be generated if open amount is smaller than company defined tolerance :returns: recordset of created credit lines
  • unlink(self)
  • write(self, values)

New fields (2)
  • line_ids Many2many → credit.control.line
    comodel_name='credit.control.line' default=<expr> domain="[('state', '!=', 'sent')]" string='Credit Control Lines'
  • name Selection
    default='to_be_sent' required=True selection=[('draft', 'Draft'), ('ignored', 'Ignored'), ('to_be_sent', 'To Do'), ('sent', 'Done')] string='Mark as'
Public methods (1)
  • mark_lines(self)
    Write state of selected credit lines to the one in entry done credit line will be ignored

New fields (6)
  • account_ids Many2many → account.account
    comodel_name='account.account' domain="[('internal_type', '=', 'receivable')]" help='This policy will be active only for the selected accounts' required=True string='Accounts'
  • active Boolean
    default=True
  • company_id Many2one → res.company
    comodel_name='res.company' string='Company'
  • do_nothing Boolean
    help='For policies which should not generate lines or are obsolete'
  • level_ids One2many → credit.control.policy.level
    comodel_name='credit.control.policy.level' inverse_name='policy_id' string='Policy Levels'
  • name Char
    required=True
Public methods (1)
  • check_policy_against_account(self, account)
    Ensure that the policy corresponds to account relation

New fields (4)
  • do_nothing Boolean
    string='No follow policy'
  • move_line_ids Many2many → account.move.line
    comodel_name='account.move.line' default=<expr> rel='credit_changer_ml_rel' string='Move line to change'
  • new_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' required=True string='New Policy to Apply'
  • new_policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' required=True string='New level to apply'
Public methods (2)
  • onchange_policy_id(self)
    @api.onchange('new_policy_level_id')
  • set_new_policy(self)
    Set new policy on an invoice. This is done by creating a new credit control line related to the move line and the policy settled in the wizard form :return: ir.actions.act_windows dict

New fields (10)
  • channel Selection
    required=True selection=CHANNEL_LIST
  • computation_mode Selection
    required=True selection=[('net_days', 'Due Date'), ('end_of_month', 'Due Date, End Of Month'), ('previous_date', 'Previous Reminder')] string='Compute Mode'
  • custom_mail_text Html
    required=True string='Custom Mail Message' translate=True
  • custom_text Text
    required=True string='Custom Message' translate=True
  • custom_text_after_details Text
    string='Custom Message after details' translate=True
  • delay_days Integer
    required=True string='Delay (in days)'
  • email_template_id Many2one → mail.template
    comodel_name='mail.template' required=True string='Email Template'
  • level Integer
    required=True
  • name Char
    required=True translate=True
  • policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' ondelete='cascade' required=True string='Related Policy'
Public methods (1)
  • get_level_lines(self, controlling_date, lines)
    @api.returns('account.move.line')
    get all move lines in entry lines that match the current level

New fields (2)
  • line_ids Many2many → credit.control.line
    comodel_name='credit.control.line' default=<expr> string='Credit Control Lines'
  • mark_as_sent Boolean
    default=True help='Only letter lines will be marked.' string='Mark letter lines as done'
Public methods (1)
  • print_lines(self)

New fields (10)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> index=True readonly=True states={'draft': [('readonly', False)]} string='Company'
  • credit_control_communication_count Integer
    compute='_compute_credit_control_count' string='# of Credit Control Communications'
  • credit_control_count Integer
    compute='_compute_credit_control_count' string='# of Credit Control Lines'
  • date Date
    readonly=True required=True states={'draft': [('readonly', False)]} string='Controlling Date'
  • hide_change_state_button Boolean
  • line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='run_id' string='Generated lines'
  • manual_ids Many2many → account.move.line
    comodel_name='account.move.line' copy=False help='If a credit control line has been generatedon a policy and the policy has been changed in the meantime, it has to be handled manually' readonly=True rel='credit_runreject_rel' string='Lines to handle manually'
  • policy_ids Many2many → credit.control.policy
    column1='run_id' column2='policy_id' comodel_name='credit.control.policy' default=<expr> readonly=True relation='credit_run_policy_rel' states={'draft': [('readonly', False)]} string='Policies'
  • report Html
    copy=False readonly=True
  • state Selection
    default='draft' readonly=True required=True selection=[('draft', 'Draft'), ('done', 'Done')]
Public methods (6)
  • generate_credit_lines(self)
    Generate credit control lines Lock the ``credit_control_run`` Postgres table to avoid concurrent calls of this method.
  • open_credit_communications(self)
    Open the generated communications.
  • open_credit_lines(self)
    Open the generated lines
  • run_channel_action(self)
  • set_to_ready_lines(self)
  • unlink(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • message_format(self)

New fields (2)
  • credit_control_tolerance Float
    default=0.1 readonly=False
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' help='The Credit Control Policy used on partners by default. This setting can be overridden on partners or invoices.' readonly=False string='Credit Control Policy'
Public methods (0)

No public methods.

New fields (2)
  • credit_control_tolerance Float
    readonly=False related='company_id.credit_control_tolerance'
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' help='The Credit Control Policy used on partners by default. This setting can be overridden on partners or invoices.' readonly=False related='company_id.credit_policy_id' string='Credit Control Policy'
Public methods (0)

No public methods.

New fields (9)
  • credit_control_analysis_ids One2many → credit.control.analysis
    string='Credit Control Levels' args: 'credit.control.analysis', 'partner_id'
  • credit_control_count Integer
    compute='_compute_credit_control_count' string='# of Credit Control Lines'
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' domain="[('account_ids', 'in', property_account_receivable_id)]" help='The Credit Control Policy used for this partner. This setting can be forced on the invoice. If nothing is defined, it will use the company setting.' string='Credit Control Policy'
  • manual_followup Boolean
  • payment_next_action Text
    help='This is the next action to be taken.' string='Next Action' tracking=True
  • payment_next_action_date Date
    help='This is when the manual follow-up is needed.' string='Next Action Date' tracking=True
  • payment_next_action_type Many2one → res.partner.payment.action.type
    comodel_name='res.partner.payment.action.type' string='Next Action Type' tracking=True
  • payment_note Text
    help='Payment Note' string='Customer Payment Promise' tracking=True
  • payment_responsible_id Many2one → res.users
    comodel_name='res.users' help='Optionally you can assign a user to this field, which will make him responsible for the action.' ondelete='set null' string='Follow-up Responsible' tracking=True
Public methods (0)

No public methods.

New fields (5)
  • active Boolean
    default=True
  • company_id Many2one → res.company
    default=<expr> args: 'res.company', 'Company'
  • name Char
  • partner_ids One2many → res.partner
    comodel_name='res.partner' inverse_name='payment_next_action_type' string='Partners'
  • sequence Integer
    default=10 args: 'Sequence'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/credit-control
GIT
GIThttps://github.com/OCA/credit-control.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/credit-control/tree/12.0/account_credit_control
VERSION
VERSION 3.0.5
CATEGORY
CATEGORYFinance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA), Camptocamp, ACSONE SA/NV, Okia, Access Bookings
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSPedro M. Baeza, GitHub, Jairo Llopis, mreficent, Enric Tobella, david, OCA Transbot, Ernesto Tejeda, Sergio Teruel, oca-travis, Weblate, OCA-git-bot, Iryna Vyshnevska, Quentin Groulard, Stephan Keller, gaikaz, Victor Champonnois, DoDo
WEBSITE
WEBSITEhttps://github.com/OCA/credit-control
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:29:24
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
    - account
    - base_setup
    - web
    - product
    - decimal_precision
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - http_routing
    - digest
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (28)
XML IDNameModelTypeStatus
credit_control_analysis_pivot_view credit.control.analysis.pivot (in account_credit_control_analysis) credit.control.analysis pivot New
credit_control_analysis_tree_view credit.control.analysis.tree (in account_credit_control_analysis) credit.control.analysis tree New
credit_control_communication_form_view credit.control.communication.form credit.control.communication form New
credit_control_communication_search_view Credit Control Communications credit.control.communication search New
credit_control_communication_tree_view credit.control.communication.tree credit.control.communication tree New
credit_control_company_form credit.control.company.form res.company field Inherits base.view_company_form
credit_control_line_form credit.control.line.form credit.control.line form New
credit_control_line_search Credit Control Lines credit.control.line search New
credit_control_line_tree credit.control.line.tree credit.control.line tree New
credit_control_policy_changer_form credit control policy form credit.control.policy.changer form New
credit_control_policy_form credit.control.policy.form credit.control.policy form New
credit_control_policy_level_tree credit.control.policy.level.tree credit.control.policy.level tree New
credit_control_policy_tree credit.control.policy.tree credit.control.policy tree New
credit_control_run_form credit.control.run.form credit.control.run form New
credit_control_run_tree credit.control.run.tree credit.control.run tree New
credit_line_emailer_form credit.line.emailer.form credit.control.emailer form New
credit_line_marker_form credit.line.marker.form credit.control.marker form New
credit_line_printer_form credit.line.printer.form credit.control.printer form New
credit_mangement_policy_level_form credit.mangement.policy.level.form credit.control.policy.level form New
customer_followup_tree res.partner.followup.inherit.tree res.partner tree New
invoice_followup_form_view invoice.followup.form.view account.invoice notebook Inherits account.invoice_form
partner_followup_form_view partner.credit_control.form.view res.partner page Inherits account.view_partner_property_form
partner_view_buttons res.partner button Inherits account.partner_view_buttons
report_credit_control_summary report_credit_control_summary ir.ui.view qweb New
report_credit_control_summary_document report_credit_control_summary_document ir.ui.view qweb New
res_config_settings_view_form res.config.settings.view.form.inherit.credit.control res.config.settings xpath Inherits account.res_config_settings_view_form
res_partner_payment_action_type_form_view res.partner.payment.action.type.form res.partner.payment.action.type form New
res_partner_payment_action_type_tree_view res.partner.payment.action.type.form res.partner.payment.action.type tree New
Models touched (18)

New fields (1)
  • credit_control_line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='account_id' readonly=True string='Credit Lines'
Public methods (0)

No public methods.

New fields (2)
  • credit_control_line_ids One2many → credit.control.line
    comodel_name='credit.control.line' copy=False inverse_name='invoice_id' readonly=True string='Credit Lines'
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' copy=False groups='account_credit_control.group_account_credit_control_manager,account_credit_control.group_account_credit_control_user,account_credit_control.group_account_credit_control_info' help='The Credit Control Policy used for this invoice. If nothing is defined, it will use the account setting or the partner setting.' readonly=True string='Credit Control Policy'
Public methods (1)
  • action_cancel(self)
    @api.multi
    Prevent to cancel invoice related to credit line

New fields (8)
  • company_id Many2one → res.company
    comodel_name='res.company' readonly=True
  • currency_id Many2one → res.currency
    comodel_name='res.currency' readonly=True
  • level Integer
    readonly=True string='Max Level'
  • open_balance Float
    help='Open balance on credit control linesof same partner, policy and currency' readonly=True string='Overdue Balance'
  • partner_id Many2one → res.partner
    comodel_name='res.partner' readonly=True
  • partner_ref Char
    readonly=True string='Partner Ref'
  • policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' readonly=True string='Policy'
  • policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' readonly=True string='Overdue Level'
Public methods (1)
  • init(self)
    @api.model_cr

New fields (11)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> index=True required=True string='Company'
  • contact_address_id Many2one → res.partner
    comodel_name='res.partner' index=True
  • credit_control_line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='communication_id' string='Credit Lines'
  • currency_id Many2one → res.currency
    comodel_name='res.currency' index=True required=True string='Currency'
  • partner_id Many2one → res.partner
    comodel_name='res.partner' index=True required=True string='Partner'
  • policy_id Many2one
    index=True related='policy_level_id.policy_id' store=True
  • policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' index=True required=True string='Level'
  • report_date Date
    default=<expr>
  • total_due Float
    compute='_compute_total'
  • total_invoiced Float
    compute='_compute_total'
  • user_id Many2one → res.users
    comodel_name='res.users' default=<expr> index=True string='User'
Public methods (2)
  • get_email(self)
    Kept for backwards compatibility. To be removed in v13/v14
  • get_emailing_contact(self)
    Return a valid customer for the emailing. If the contact address doesn't have a valid email we fallback to the commercial partner

New fields (1)
  • line_ids Many2many → credit.control.line
    comodel_name='credit.control.line' default=<expr> domain=[('state', '=', 'to_be_sent'), ('channel', '=', 'email')] string='Credit Control Lines'
Public methods (1)
  • email_lines(self)

New fields (23)
  • account_id Many2one → account.account
    comodel_name='account.account' related='move_line_id.account_id' store=True
  • amount_due Float
    readonly=True required=True string='Due Amount Tax incl.'
  • balance_due Float
    readonly=True required=True string='Due balance'
  • channel Selection
    readonly=True required=True selection=CHANNEL_LIST states={'draft': [('readonly', False)]}
  • commercial_partner_id Many2one → res.partner
    comodel_name='res.partner' compute_sudo=True index=True related='partner_id.commercial_partner_id' store=True string='Commercial Entity'
  • communication_id Many2one → credit.control.communication
    comodel_name='credit.control.communication' help='Credit control communication process where this line belongs' string='Communication process'
  • company_id Many2one → res.company
    comodel_name='res.company' related='move_line_id.company_id' store=True
  • currency_id Many2one → res.currency
    comodel_name='res.currency' related='move_line_id.currency_id' store=True
  • date Date
    index=True readonly=True required=True states={'draft': [('readonly', False)]} string='Controlling date'
  • date_due Date
    readonly=True required=True states={'draft': [('readonly', False)]} string='Due date'
  • date_entry Date
    related='move_line_id.date' store=True string='Entry date'
  • date_sent Date
    readonly=True states={'draft': [('readonly', False)]} string='Reminded date'
  • invoice_id Many2one → account.invoice
    comodel_name='account.invoice' readonly=True string='Invoice'
  • level Integer
    group_operator='max' related='policy_level_id.level' store=True
  • manual_followup Boolean
  • manually_overridden Boolean
  • move_line_id Many2one → account.move.line
    comodel_name='account.move.line' index=True readonly=True required=True string='Move line'
  • partner_id Many2one → res.partner
    comodel_name='res.partner' readonly=True required=True states={'draft': [('readonly', False)]} string='Partner'
  • partner_user_id Many2one → res.users
    comodel_name='res.users' compute='_compute_partner_user_id' store=True string='Salesperson'
  • policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' related='policy_level_id.policy_id' store=True
  • policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' readonly=True required=True states={'draft': [('readonly', False)]} string='Overdue Level'
  • run_id Many2one → credit.control.run
    comodel_name='credit.control.run' string='Source'
  • state Selection
    default='draft' help='Draft lines need to be triaged.\nIgnored lines are lines for which we do not want to send something.\nDraft and ignored lines will be generated again on the next run.' readonly=True required=True selection=[('draft', 'Draft'), ('ignored', 'Ignored'), ('queued', 'Queued'), ('to_be_sent', 'To Do'), ('sent', 'Done'), ('error', 'Error'), ('email_error', 'Emailing Error')] track_visibility='on_change'
Public methods (5)
  • button_credit_control_line_form(self)
  • button_schedule_activity(self)
  • create_or_update_from_mv_lines(self, lines, level, controlling_date, company, check_tolerance=True, default_lines_vals=None)
    @api.model
    Create or update line based on levels if check_tolerance is true credit line will not be created if open amount is too small. eg. we do not want to send a letter for 10 cents of open amount. :param lines: move.line id recordset :param level: credit.control.policy.level record :param controlling_date: date string of the credit controlling date. Generally it should be the same as create date :param company: res.company :param default_lines_vals: default values to create new credit control lines with :param check_tolerance: boolean if True credit line will not be generated if open amount is smaller than company defined tolerance :returns: recordset of created credit lines
  • unlink(self)
    @api.multi
  • write(self, values)
    @api.multi

New fields (2)
  • line_ids Many2many → credit.control.line
    comodel_name='credit.control.line' default=<expr> domain="[('state', '!=', 'sent')]" string='Credit Control Lines'
  • name Selection
    default='to_be_sent' required=True selection=[('draft', 'Draft'), ('ignored', 'Ignored'), ('to_be_sent', 'To Do'), ('sent', 'Done')] string='Mark as'
Public methods (1)
  • mark_lines(self)
    @api.multi
    Write state of selected credit lines to the one in entry done credit line will be ignored

New fields (7)
  • account_ids Many2many → account.account
    comodel_name='account.account' domain="[('internal_type', '=', 'receivable')]" help='This policy will be active only for the selected accounts' required=True string='Accounts'
  • active Boolean
    default=True
  • company_id Many2one → res.company
    comodel_name='res.company' string='Company'
  • do_nothing Boolean
    help='For policies which should not generate lines or are obsolete'
  • level_ids One2many → credit.control.policy.level
    comodel_name='credit.control.policy.level' inverse_name='policy_id' string='Policy Levels'
  • name Char
    required=True
  • policy_sign Selection
    compute='_compute_policy_sign' selection=[('positive', 'Positive'), ('negative', 'Negative')]
Public methods (1)
  • check_policy_against_account(self, account)
    @api.multi
    Ensure that the policy corresponds to account relation

New fields (4)
  • do_nothing Boolean
    string='No follow policy'
  • move_line_ids Many2many → account.move.line
    comodel_name='account.move.line' default=<expr> rel='credit_changer_ml_rel' string='Move line to change'
  • new_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' required=True string='New Policy to Apply'
  • new_policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' required=True string='New level to apply'
Public methods (2)
  • onchange_policy_id(self)
    @api.onchange('new_policy_level_id')
  • set_new_policy(self)
    @api.multi
    Set new policy on an invoice. This is done by creating a new credit control line related to the move line and the policy settled in the wizard form :return: ir.actions.act_windows dict

New fields (10)
  • channel Selection
    required=True selection=CHANNEL_LIST
  • computation_mode Selection
    required=True selection=[('net_days', 'Due Date'), ('end_of_month', 'Due Date, End Of Month'), ('previous_date', 'Previous Reminder')] string='Compute Mode'
  • custom_mail_text Html
    required=True string='Custom Mail Message' translate=True
  • custom_text Html
    required=True string='Custom Message' translate=True
  • custom_text_after_details Html
    string='Custom Message after details' translate=True
  • delay_days Integer
    required=True string='Delay (in days)'
  • email_template_id Many2one → mail.template
    comodel_name='mail.template' required=True string='Email Template'
  • level Integer
    required=True
  • name Char
    required=True translate=True
  • policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' ondelete='cascade' required=True string='Related Policy'
Public methods (1)
  • get_level_lines(self, controlling_date, lines)
    @api.multi@api.returns('account.move.line')
    get all move lines in entry lines that match the current level

New fields (2)
  • line_ids Many2many → credit.control.line
    comodel_name='credit.control.line' default=<expr> string='Credit Control Lines'
  • mark_as_sent Boolean
    default=True help='Only letter lines will be marked.' string='Mark letter lines as done'
Public methods (1)
  • print_lines(self)
    @api.multi

New fields (10)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> index=True readonly=True states={'draft': [('readonly', False)]} string='Company'
  • credit_control_communication_count Integer
    compute='_compute_credit_control_count' string='# of Credit Control Communications'
  • credit_control_count Integer
    compute='_compute_credit_control_count' string='# of Credit Control Lines'
  • date Date
    readonly=True required=True states={'draft': [('readonly', False)]} string='Controlling Date'
  • hide_change_state_button Boolean
  • line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='run_id' string='Generated lines'
  • manual_ids Many2many → account.move.line
    comodel_name='account.move.line' copy=False help='If a credit control line has been generatedon a policy and the policy has been changed in the meantime, it has to be handled manually' readonly=True rel='credit_runreject_rel' string='Lines to handle manually'
  • policy_ids Many2many → credit.control.policy
    column1='run_id' column2='policy_id' comodel_name='credit.control.policy' default=<expr> readonly=True relation='credit_run_policy_rel' states={'draft': [('readonly', False)]} string='Policies'
  • report Html
    copy=False readonly=True
  • state Selection
    default='draft' readonly=True required=True selection=[('draft', 'Draft'), ('done', 'Done')]
Public methods (6)
  • generate_credit_lines(self)
    @api.multi
    Generate credit control lines Lock the ``credit_control_run`` Postgres table to avoid concurrent calls of this method.
  • open_credit_communications(self)
    Open the generated communications.
  • open_credit_lines(self)
    Open the generated lines
  • run_channel_action(self)
  • set_to_ready_lines(self)
  • unlink(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • message_format(self)

New fields (2)
  • credit_control_tolerance Float
    default=0.1 readonly=False
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' help='The Credit Control Policy used on partners by default. This setting can be overridden on partners or invoices.' readonly=False string='Credit Control Policy'
Public methods (0)

No public methods.

New fields (2)
  • credit_control_tolerance Float
    readonly=False related='company_id.credit_control_tolerance'
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' help='The Credit Control Policy used on partners by default. This setting can be overridden on partners or invoices.' readonly=False related='company_id.credit_policy_id' string='Credit Control Policy'
Public methods (0)

No public methods.

New fields (9)
  • credit_control_analysis_ids One2many → credit.control.analysis
    string='Credit Control Levels' args: 'credit.control.analysis', 'partner_id'
  • credit_control_count Integer
    compute='_compute_credit_control_count' string='# of Credit Control Lines'
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' domain="[('account_ids', 'in', property_account_receivable_id)]" help='The Credit Control Policy used for this partner. This setting can be forced on the invoice. If nothing is defined, it will use the company setting.' string='Credit Control Policy'
  • manual_followup Boolean
  • payment_next_action Text
    help='This is the next action to be taken.' string='Next Action' track_visibility='onchange'
  • payment_next_action_date Date
    help='This is when the manual follow-up is needed.' string='Next Action Date' track_visibility='onchange'
  • payment_next_action_type Many2one → res.partner.payment.action.type
    comodel_name='res.partner.payment.action.type' string='Next Action Type' track_visibility='onchange'
  • payment_note Text
    help='Payment Note' string='Customer Payment Promise' track_visibility='onchange'
  • payment_responsible_id Many2one → res.users
    comodel_name='res.users' help='Optionally you can assign a user to this field, which will make him responsible for the action.' ondelete='set null' string='Follow-up Responsible' track_visibility='onchange'
Public methods (0)

No public methods.

New fields (5)
  • active Boolean
    default=True
  • company_id Many2one → res.company
    default=<expr> args: 'res.company', 'Company'
  • name Char
  • partner_ids One2many → res.partner
    comodel_name='res.partner' inverse_name='payment_next_action_type' string='Partners'
  • sequence Integer
    default=10 args: 'Sequence'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/account-financial-tools
GIT
GIThttps://github.com/OCA/account-financial-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/account-financial-tools/tree/11.0/account_credit_control
VERSION
VERSION 1.0.6
CATEGORY
CATEGORYFinance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA), Camptocamp, Okia, Access Bookings
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSPedro M. Baeza, GitHub, mreficent, Carlos Dauden, Andrea, OCA Transbot, oca-travis, Weblate, OCA-git-bot, Iryna Vyshnevska
WEBSITE
WEBSITEhttps://github.com/OCA/account-financial-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:23:57
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
    - account
    - base_setup
    - web
    - product
    - decimal_precision
    - mail
    - bus
    - web_tour
    - analytic
    - web_planner
    - portal
    - http_routing
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (21)
XML IDNameModelTypeStatus
credit_control_company_form credit.control.company.form res.company field Inherits base.view_company_form
credit_control_line_form credit.control.line.form credit.control.line form New
credit_control_line_search Credit Control Lines credit.control.line search New
credit_control_line_tree credit.control.line.tree credit.control.line tree New
credit_control_policy_changer_form credit control policy form credit.control.policy.changer form New
credit_control_policy_form credit.control.policy.form credit.control.policy form New
credit_control_policy_level_tree credit.control.policy.level.tree credit.control.policy.level tree New
credit_control_policy_tree credit.control.policy.tree credit.control.policy tree New
credit_control_run_form credit.control.run.form credit.control.run form New
credit_control_run_tree credit.control.run.tree credit.control.run tree New
credit_line_emailer_form credit.line.emailer.form credit.control.emailer form New
credit_line_marker_form credit.line.marker.form credit.control.marker form New
credit_line_printer_form credit.line.printer.form credit.control.printer form New
credit_mangement_policy_level_form credit.mangement.policy.level.form credit.control.policy.level form New
customer_followup_tree res.partner.followup.inherit.tree res.partner tree New
invoice_followup_form_view invoice.followup.form.view account.invoice notebook Inherits account.invoice_form
partner_followup_form_view partner.credit_control.form.view res.partner xpath Inherits account.view_partner_property_form
partner_view_buttons res.partner button Inherits account.partner_view_buttons
report_credit_control_summary report_credit_control_summary ir.ui.view qweb New
report_credit_control_summary_document report_credit_control_summary_document ir.ui.view qweb New
res_config_settings_view_form res.config.settings.view.form.inherit.credit.control res.config.settings xpath Inherits account.res_config_settings_view_form
Models touched (15)

New fields (1)
  • credit_control_line_ids One2many → credit.control.line
    readonly=True string='Credit Lines' args: 'credit.control.line', 'account_id'
Public methods (0)

No public methods.

New fields (2)
  • credit_control_line_ids One2many → credit.control.line
    copy=False readonly=True string='Credit Lines' args: 'credit.control.line', 'invoice_id'
  • credit_policy_id Many2one → credit.control.policy
    copy=False groups='account_credit_control.group_account_credit_control_manager,account_credit_control.group_account_credit_control_user,account_credit_control.group_account_credit_control_info' help='The Credit Control Policy used for this invoice. If nothing is defined, it will use the account setting or the partner setting.' readonly=True string='Credit Control Policy' args: 'credit.control.policy'
Public methods (1)
  • action_cancel(self)
    @api.multi
    Prevent to cancel invoice related to credit line

New fields (10)
  • company_id Many2one → res.company
    default=<expr> required=True string='Company' args: 'res.company'
  • contact_address Many2one → res.partner
    readonly=True args: 'res.partner'
  • credit_control_line_ids Many2many → credit.control.line
    rel='comm_credit_rel' string='Credit Lines' args: 'credit.control.line'
  • currency_id Many2one → res.currency
    required=True args: 'res.currency', 'Currency'
  • current_policy_level Many2one → credit.control.policy.level
    required=True args: 'credit.control.policy.level', 'Level'
  • partner_id Many2one → res.partner
    required=True args: 'res.partner', 'Partner'
  • report_date Date
    default=fields.Date.context_today
  • total_due Float
    compute='_compute_total'
  • total_invoiced Float
    compute='_compute_total'
  • user_id Many2one → res.users
    default=<expr> string='User' args: 'res.users'
Public methods (3)
  • create(self, vals)
    @api.model@api.returns('self', <expr>)
  • get_contact_address(self)
    @api.multi@api.returns('res.partner')
    Compatibility method, please use the contact_address field
  • get_email(self)
    @api.multi
    Return a valid email for customer

New fields (1)
  • line_ids Many2many → credit.control.line
    default=<expr> domain=[('state', '=', 'to_be_sent'), ('channel', '=', 'email')] string='Credit Control Lines' args: 'credit.control.line'
Public methods (1)
  • email_lines(self)
    @api.multi

New fields (22)
  • account_id Many2one → account.account
    readonly=True related='move_line_id.account_id' store=True args: 'account.account'
  • amount_due Float
    readonly=True required=True string='Due Amount Tax incl.'
  • balance_due Float
    readonly=True required=True string='Due balance'
  • channel Selection
    readonly=True required=True states={'draft': [('readonly', False)]} args: [('letter', 'Letter'), ('email', 'Email')]
  • company_id Many2one → res.company
    readonly=True related='move_line_id.company_id' store=True args: 'res.company'
  • currency_id Many2one → res.currency
    readonly=True related='move_line_id.currency_id' store=True args: 'res.currency'
  • date Date
    index=True readonly=True required=True states={'draft': [('readonly', False)]} string='Controlling date'
  • date_due Date
    readonly=True required=True states={'draft': [('readonly', False)]} string='Due date'
  • date_entry Date
    readonly=True related='move_line_id.date' store=True string='Entry date'
  • date_sent Date
    readonly=True states={'draft': [('readonly', False)]} string='Sent date'
  • invoice_id Many2one → account.invoice
    readonly=True string='Invoice' args: 'account.invoice'
  • level Integer
    readonly=True related='policy_level_id.level' store=True
  • mail_message_id Many2one → mail.mail
    readonly=True string='Sent Email' args: 'mail.mail'
  • manual_followup Boolean
  • manually_overridden Boolean
  • move_line_id Many2one → account.move.line
    readonly=True required=True string='Move line' args: 'account.move.line'
  • partner_id Many2one → res.partner
    comodel_name='res.partner' readonly=True required=True states={'draft': [('readonly', False)]} string='Partner'
  • partner_user_id Many2one → res.users
    comodel_name='res.users' compute='_compute_partner_user_id' store=True string='Salesperson'
  • policy_id Many2one → credit.control.policy
    readonly=True related='policy_level_id.policy_id' store=True args: 'credit.control.policy'
  • policy_level_id Many2one → credit.control.policy.level
    readonly=True required=True states={'draft': [('readonly', False)]} string='Overdue Level' args: 'credit.control.policy.level'
  • run_id Many2one → credit.control.run
    comodel_name='credit.control.run' string='Source'
  • state Selection
    default='draft' help='Draft lines need to be triaged.\nIgnored lines are lines for which we do not want to send something.\nDraft and ignored lines will be generated again on the next run.' readonly=True required=True args: [('draft', 'Draft'), ('ignored', 'Ignored'), ('to_be_sent', 'Ready To Send'), ('sent', 'Done'), ('error', 'Error'), ('email_error', 'Emailing Error')]
Public methods (6)
  • button_credit_control_line_form(self)
  • button_schedule_activity(self)
  • create(self, values)
    @api.model
  • create_or_update_from_mv_lines(self, lines, level, controlling_date, check_tolerance=True)
    @api.model
    Create or update line based on levels if check_tolerance is true credit line will not be created if open amount is too small. eg. we do not want to send a letter for 10 cents of open amount. :param lines: move.line id recordset :param level: credit.control.policy.level record :param controlling_date: date string of the credit controlling date. Generally it should be the same as create date :param check_tolerance: boolean if True credit line will not be generated if open amount is smaller than company defined tolerance :returns: recordset of created credit lines
  • unlink(self)
    @api.multi
  • write(self, values)
    @api.multi

New fields (2)
  • line_ids Many2many → credit.control.line
    default=<expr> domain="[('state', '!=', 'sent')]" string='Credit Control Lines' args: 'credit.control.line'
  • name Selection
    default='to_be_sent' required=True string='Mark as' args: [('ignored', 'Ignored'), ('to_be_sent', 'Ready To Send'), ('sent', 'Done')]
Public methods (1)
  • mark_lines(self)
    @api.multi
    Write state of selected credit lines to the one in entry done credit line will be ignored

New fields (6)
  • account_ids Many2many → account.account
    domain="[('internal_type', '=', 'receivable')]" help='This policy will be active only for the selected accounts' required=True string='Accounts' args: 'account.account'
  • active Boolean
    default=True
  • company_id Many2one → res.company
    string='Company' args: 'res.company'
  • do_nothing Boolean
    help='For policies which should not generate lines or are obsolete'
  • level_ids One2many → credit.control.policy.level
    string='Policy Levels' args: 'credit.control.policy.level', 'policy_id'
  • name Char
    required=True
Public methods (1)
  • check_policy_against_account(self, account)
    @api.multi
    Ensure that the policy corresponds to account relation

New fields (4)
  • do_nothing Boolean
    string='No follow policy'
  • move_line_ids Many2many → account.move.line
    default=<expr> rel='credit_changer_ml_rel' string='Move line to change' args: 'account.move.line'
  • new_policy_id Many2one → credit.control.policy
    required=True string='New Policy to Apply' args: 'credit.control.policy'
  • new_policy_level_id Many2one → credit.control.policy.level
    required=True string='New level to apply' args: 'credit.control.policy.level'
Public methods (2)
  • onchange_policy_id(self)
    @api.onchange('new_policy_level_id')
  • set_new_policy(self)
    @api.multi
    Set new policy on an invoice. This is done by creating a new credit control line related to the move line and the policy setted in the wizard form :return: ir.actions.act_windows dict

New fields (10)
  • channel Selection
    required=True args: [('letter', 'Letter'), ('email', 'Email')]
  • computation_mode Selection
    required=True string='Compute Mode' args: [('net_days', 'Due Date'), ('end_of_month', 'Due Date, End Of Month'), ('previous_date', 'Previous Reminder')]
  • custom_mail_text Html
    required=True string='Custom Mail Message' translate=True
  • custom_text Text
    required=True string='Custom Message' translate=True
  • custom_text_after_details Text
    string='Custom Message after details' translate=True
  • delay_days Integer
    required=True string='Delay (in days)'
  • email_template_id Many2one → mail.template
    required=True string='Email Template' args: 'mail.template'
  • level Integer
    required=True
  • name Char
    required=True translate=True
  • policy_id Many2one → credit.control.policy
    required=True string='Related Policy' args: 'credit.control.policy'
Public methods (1)
  • get_level_lines(self, controlling_date, lines)
    @api.multi@api.returns('account.move.line')
    get all move lines in entry lines that match the current level

New fields (2)
  • line_ids Many2many → credit.control.line
    default=<expr> string='Credit Control Lines' args: 'credit.control.line'
  • mark_as_sent Boolean
    default=True help='Only letter lines will be marked.' string='Mark letter lines as sent'
Public methods (1)
  • print_lines(self)
    @api.multi

New fields (9)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> index=True string='Company'
  • credit_control_count Integer
    compute='_compute_credit_control_count' string='# of Credit Control Lines'
  • date Date
    readonly=True required=True states={'draft': [('readonly', False)]} string='Controlling Date'
  • hide_change_state_button Boolean
  • line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='run_id' string='Generated lines'
  • manual_ids Many2many → account.move.line
    copy=False help='If a credit control line has been generatedon a policy and the policy has been changed in the meantime, it has to be handled manually' readonly=True rel='credit_runreject_rel' string='Lines to handle manually' args: 'account.move.line'
  • policy_ids Many2many → credit.control.policy
    column1='run_id' column2='policy_id' default=<expr> readonly=True relation='credit_run_policy_rel' states={'draft': [('readonly', False)]} string='Policies' args: 'credit.control.policy'
  • report Html
    copy=False readonly=True
  • state Selection
    default='draft' readonly=True required=True args: [('draft', 'Draft'), ('done', 'Done')]
Public methods (5)
  • generate_credit_lines(self)
    @api.multi
    Generate credit control lines Lock the ``credit_control_run`` Postgres table to avoid concurrent calls of this method.
  • open_credit_lines(self)
    Open the generated lines
  • run_channel_action(self)
  • set_to_ready_lines(self)
  • unlink(self)

New fields (1)
  • body_html Html
    help='Rich-text/HTML message' args: 'Rich-text Contents'
Public methods (0)

No public methods.

New fields (2)
  • credit_control_tolerance Float
    default=0.1
  • credit_policy_id Many2one → credit.control.policy
    help='The Credit Control Policy used on partners by default. This setting can be overridden on partners or invoices.' string='Credit Control Policy' args: 'credit.control.policy'
Public methods (0)

No public methods.

New fields (2)
  • credit_control_tolerance Float
    related='company_id.credit_control_tolerance'
  • credit_policy_id Many2one → credit.control.policy
    help='The Credit Control Policy used on partners by default. This setting can be overridden on partners or invoices.' related='company_id.credit_policy_id' string='Credit Control Policy' args: 'credit.control.policy'
Public methods (0)

No public methods.

New fields (7)
  • credit_control_count Integer
    compute='_compute_credit_control_count' string='# of Credit Control Lines'
  • credit_policy_id Many2one → credit.control.policy
    domain="[('account_ids', 'in', property_account_receivable_id)]" help='The Credit Control Policy used for this partner. This setting can be forced on the invoice. If nothing is defined, it will use the company setting.' string='Credit Control Policy' args: 'credit.control.policy'
  • manual_followup Boolean
  • payment_next_action Text
    help='This is the next action to be taken.' string='Next Action' track_visibility='onchange'
  • payment_next_action_date Date
    help='This is when the manual follow-up is needed.' string='Next Action Date'
  • payment_note Text
    help='Payment Note' string='Customer Payment Promise' track_visibility='onchange'
  • payment_responsible_id Many2one → res.users
    comodel_name='res.users' help='Optionally you can assign a user to this field, which will make him responsible for the action.' ondelete='set null' string='Follow-up Responsible' track_visibility='onchange'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/account-financial-tools
GIT
GIThttps://github.com/OCA/account-financial-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/account-financial-tools/tree/10.0/account_credit_control
VERSION
VERSION 1.4.6
CATEGORY
CATEGORYFinance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp, Okia
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSPedro M. Baeza, GitHub, Cédric Pigeon, Akim Juillerat, cubells, OCA Transbot, Adrien Peiffer (ACSONE), oca-travis, Weblate, OCA-git-bot, Sylvain Van Hoof, Iryna Vyshnevska
WEBSITE
WEBSITEhttps://www.camptocamp.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:19:57
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
    - account
    - base_setup
    - web_kanban
    - web
    - product
    - decimal_precision
    - mail
    - bus
    - web_tour
    - report
    - analytic
    - web_planner
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (19)
XML IDNameModelTypeStatus
credit_control_company_form credit.control.company.form res.company field Inherits base.view_company_form
credit_control_line_form credit.control.line.form credit.control.line form New
credit_control_line_search Credit Control Lines credit.control.line search New
credit_control_line_tree credit.control.line.tree credit.control.line tree New
credit_control_policy_changer_form credit control policy form credit.control.policy.changer form New
credit_control_policy_form credit.control.policy.form credit.control.policy form New
credit_control_policy_level_tree credit.control.policy.level.tree credit.control.policy.level tree New
credit_control_policy_tree credit.control.policy.tree credit.control.policy tree New
credit_control_run_form credit.control.run.form credit.control.run form New
credit_control_run_tree credit.control.run.tree credit.control.run tree New
credit_line_emailer_form credit.line.emailer.form credit.control.emailer form New
credit_line_marker_form credit.line.marker.form credit.control.marker form New
credit_line_printer_form credit.line.printer.form credit.control.printer form New
credit_mangement_policy_level_form credit.mangement.policy.level.form credit.control.policy.level form New
customer_followup_tree res.partner.followup.inherit.tree res.partner tree New
invoice_followup_form_view invoice.followup.form.view account.invoice notebook Inherits account.invoice_form
partner_followup_form_view partner.credit_control.form.view res.partner xpath Inherits account.view_partner_property_form
report_credit_control_summary report_credit_control_summary ir.ui.view qweb New
report_credit_control_summary_document report_credit_control_summary_document ir.ui.view qweb New
Models touched (14)

New fields (1)
  • credit_control_line_ids One2many → credit.control.line
    readonly=True string='Credit Lines' args: 'credit.control.line', 'account_id'
Public methods (0)

No public methods.

New fields (2)
  • credit_control_line_ids One2many → credit.control.line
    copy=False readonly=True string='Credit Lines' args: 'credit.control.line', 'invoice_id'
  • credit_policy_id Many2one → credit.control.policy
    copy=False groups='account_credit_control.group_account_credit_control_manager,account_credit_control.group_account_credit_control_user,account_credit_control.group_account_credit_control_info' help='The Credit Control Policy used for this invoice. If nothing is defined, it will use the account setting or the partner setting.' readonly=True string='Credit Control Policy' args: 'credit.control.policy'
Public methods (1)
  • action_cancel(self)
    @api.multi
    Prevent to cancel invoice related to credit line

New fields (10)
  • company_id Many2one → res.company
    default=_get_company required=True string='Company' args: 'res.company'
  • contact_address Many2one → res.partner
    readonly=True string='Contact Address' args: 'res.partner'
  • credit_control_line_ids Many2many → credit.control.line
    rel='comm_credit_rel' string='Credit Lines' args: 'credit.control.line'
  • currency_id Many2one → res.currency
    required=True args: 'res.currency', 'Currency'
  • current_policy_level Many2one → credit.control.policy.level
    required=True args: 'credit.control.policy.level', 'Level'
  • partner_id Many2one → res.partner
    required=True args: 'res.partner', 'Partner'
  • report_date Date
    default=fields.Date.context_today string='Report Date'
  • total_due Float
    compute='_compute_total' string='Total Due'
  • total_invoiced Float
    compute='_compute_total' string='Total Invoiced'
  • user_id Many2one → res.users
    default=<expr> string='User' args: 'res.users'
Public methods (3)
  • create(self, vals)
    @api.model@api.returns('self', <expr>)
  • get_contact_address(self)
    @api.multi@api.returns('res.partner')
    Compatibility method, please use the contact_address field
  • get_email(self)
    @api.multi
    Return a valid email for customer

New fields (1)
  • line_ids Many2many → credit.control.line
    default=_get_line_ids domain=[('state', '=', 'to_be_sent'), ('channel', '=', 'email')] string='Credit Control Lines' args: 'credit.control.line'
Public methods (1)
  • email_lines(self)
    @api.multi

New fields (21)
  • account_id Many2one → account.account
    readonly=True related='move_line_id.account_id' store=True args: 'account.account'
  • amount_due Float
    readonly=True required=True string='Due Amount Tax incl.'
  • balance_due Float
    readonly=True required=True string='Due balance'
  • channel Selection
    readonly=True required=True states={'draft': [('readonly', False)]} string='Channel' args: [('letter', 'Letter'), ('email', 'Email')]
  • company_id Many2one → res.company
    readonly=True related='move_line_id.company_id' store=True args: 'res.company'
  • currency_id Many2one → res.currency
    readonly=True related='move_line_id.currency_id' store=True args: 'res.currency'
  • date Date
    index=True required=True string='Controlling date'
  • date_due Date
    readonly=True required=True states={'draft': [('readonly', False)]} string='Due date'
  • date_entry Date
    readonly=True related='move_line_id.date' store=True string='Entry date'
  • date_sent Date
    readonly=True states={'draft': [('readonly', False)]} string='Sent date'
  • invoice_id Many2one → account.invoice
    readonly=True string='Invoice' args: 'account.invoice'
  • level Integer
    readonly=True related='policy_level_id.level' store=True args: 'Level'
  • mail_message_id Many2one → mail.mail
    readonly=True string='Sent Email' args: 'mail.mail'
  • manual_followup Boolean
    string='Manual Followup'
  • manually_overridden Boolean
    string='Manually overridden'
  • move_line_id Many2one → account.move.line
    readonly=True required=True string='Move line' args: 'account.move.line'
  • partner_id Many2one → res.partner
    required=True string='Partner' args: 'res.partner'
  • policy_id Many2one → credit.control.policy
    readonly=True related='policy_level_id.policy_id' store=True args: 'credit.control.policy'
  • policy_level_id Many2one → credit.control.policy.level
    readonly=True required=True states={'draft': [('readonly', False)]} string='Overdue Level' args: 'credit.control.policy.level'
  • run_id Many2one → credit.control.run
    comodel_name='credit.control.run' string='Source'
  • state Selection
    default='draft' help='Draft lines need to be triaged.\nIgnored lines are lines for which we do not want to send something.\nDraft and ignored lines will be generated again on the next run.' readonly=True required=True args: [('draft', 'Draft'), ('ignored', 'Ignored'), ('to_be_sent', 'Ready To Send'), ('sent', 'Done'), ('error', 'Error'), ('email_error', 'Emailing Error')], 'State'
Public methods (4)
  • create(self, values)
    @api.model
  • create_or_update_from_mv_lines(self, lines, level, controlling_date, check_tolerance=True)
    @api.model
    Create or update line based on levels if check_tolerance is true credit line will not be created if open amount is too small. eg. we do not want to send a letter for 10 cents of open amount. :param lines: move.line id recordset :param level: credit.control.policy.level record :param controlling_date: date string of the credit controlling date. Generally it should be the same as create date :param check_tolerance: boolean if True credit line will not be generated if open amount is smaller than company defined tolerance :returns: recordset of created credit lines
  • unlink(self)
    @api.multi
  • write(self, values)
    @api.multi

New fields (2)
  • line_ids Many2many → credit.control.line
    default=_get_line_ids domain="[('state', '!=', 'sent')]" string='Credit Control Lines' args: 'credit.control.line'
  • name Selection
    default='to_be_sent' required=True string='Mark as' args: [('ignored', 'Ignored'), ('to_be_sent', 'Ready To Send'), ('sent', 'Done')]
Public methods (1)
  • mark_lines(self)
    @api.multi
    Write state of selected credit lines to the one in entry done credit line will be ignored

New fields (6)
  • account_ids Many2many → account.account
    domain="[('internal_type', '=', 'receivable')]" help='This policy will be active only for the selected accounts' required=True string='Accounts' args: 'account.account'
  • active Boolean
    default=True args: 'Active'
  • company_id Many2one → res.company
    string='Company' args: 'res.company'
  • do_nothing Boolean
    help='For policies which should not generate lines or are obsolete' args: 'Do nothing'
  • level_ids One2many → credit.control.policy.level
    string='Policy Levels' args: 'credit.control.policy.level', 'policy_id'
  • name Char
    required=True args: 'Name'
Public methods (1)
  • check_policy_against_account(self, account)
    @api.multi
    Ensure that the policy corresponds to account relation

New fields (4)
  • do_nothing Boolean
    string='No follow policy'
  • move_line_ids Many2many → account.move.line
    default=_get_default_lines rel='credit_changer_ml_rel' string='Move line to change' args: 'account.move.line'
  • new_policy_id Many2one → credit.control.policy
    required=True string='New Policy to Apply' args: 'credit.control.policy'
  • new_policy_level_id Many2one → credit.control.policy.level
    required=True string='New level to apply' args: 'credit.control.policy.level'
Public methods (2)
  • onchange_policy_id(self)
    @api.onchange('new_policy_level_id')
  • set_new_policy(self)
    @api.multi
    Set new policy on an invoice. This is done by creating a new credit control line related to the move line and the policy setted in the wizard form :return: ir.actions.act_windows dict

New fields (10)
  • channel Selection
    required=True string='Channel' args: [('letter', 'Letter'), ('email', 'Email')]
  • computation_mode Selection
    required=True string='Compute Mode' args: [('net_days', 'Due Date'), ('end_of_month', 'Due Date, End Of Month'), ('previous_date', 'Previous Reminder')]
  • custom_mail_text Html
    required=True string='Custom Mail Message' translate=True
  • custom_text Text
    required=True string='Custom Message' translate=True
  • custom_text_after_details Text
    string='Custom Message after details' translate=True
  • delay_days Integer
    required=True string='Delay (in days)'
  • email_template_id Many2one → mail.template
    required=True string='Email Template' args: 'mail.template'
  • level Integer
    required=True string='Level'
  • name Char
    required=True string='Name' translate=True
  • policy_id Many2one → credit.control.policy
    required=True string='Related Policy' args: 'credit.control.policy'
Public methods (1)
  • get_level_lines(self, controlling_date, lines)
    @api.multi@api.returns('account.move.line')
    get all move lines in entry lines that match the current level

New fields (2)
  • line_ids Many2many → credit.control.line
    default=_get_line_ids string='Credit Control Lines' args: 'credit.control.line'
  • mark_as_sent Boolean
    default=True help='Only letter lines will be marked.' string='Mark letter lines as sent'
Public methods (1)
  • print_lines(self)
    @api.multi

New fields (6)
  • date Date
    readonly=True required=True states={'draft': [('readonly', False)]} string='Controlling Date'
  • line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='run_id' string='Generated lines'
  • manual_ids Many2many → account.move.line
    copy=False help='If a credit control line has been generatedon a policy and the policy has been changed in the meantime, it has to be handled manually' readonly=True rel='credit_runreject_rel' string='Lines to handle manually' args: 'account.move.line'
  • policy_ids Many2many → credit.control.policy
    default=_get_policies readonly=True states={'draft': [('readonly', False)]} string='Policies' args: 'credit.control.policy'
  • report Html
    copy=False readonly=True string='Report'
  • state Selection
    default='draft' readonly=True required=True string='State' args: [('draft', 'Draft'), ('done', 'Done')]
Public methods (2)
  • generate_credit_lines(self)
    @api.multi
    Generate credit control lines Lock the ``credit_control_run`` Postgres table to avoid concurrent calls of this method.
  • open_credit_lines(self)
    @api.multi
    Open the generated lines

New fields (1)
  • body_html Html
    help='Rich-text/HTML message' args: 'Rich-text Contents'
Public methods (0)

No public methods.

New fields (2)
  • credit_control_tolerance Float
    default=0.1 string='Credit Control Tolerance'
  • credit_policy_id Many2one → credit.control.policy
    help='The Credit Control Policy used on partners by default. This setting can be overridden on partners or invoices.' string='Credit Control Policy' args: 'credit.control.policy'
Public methods (0)

No public methods.

New fields (7)
  • credit_control_line_ids One2many → credit.control.line
    readonly=True string='Credit Control Lines' args: 'credit.control.line', 'invoice_id'
  • credit_policy_id Many2one → credit.control.policy
    domain="[('account_ids', 'in', property_account_receivable_id)]" help='The Credit Control Policy used for this partner. This setting can be forced on the invoice. If nothing is defined, it will use the company setting.' string='Credit Control Policy' args: 'credit.control.policy'
  • manual_followup Boolean
    string='Manual Followup'
  • payment_next_action Text
    help='This is the next action to be taken.' string='Next Action' track_visibility='onchange'
  • payment_next_action_date Date
    help='This is when the manual follow-up is needed.' string='Next Action Date'
  • payment_note Text
    help='Payment Note' string='Customer Payment Promise' track_visibility='onchange'
  • payment_responsible_id Many2one → res.users
    comodel_name='res.users' help='Optionally you can assign a user to this field, which will make him responsible for the action.' ondelete='set null' string='Follow-up Responsible' track_visibility='onchange'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/account-financial-tools
GIT
GIThttps://github.com/OCA/account-financial-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/account-financial-tools/tree/9.0/account_credit_control
VERSION
VERSION 1.0.4
CATEGORY
CATEGORYFinance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA), Camptocamp
COMMITTERS
COMMITTERSStefan Rijnhart, Holger Brunn, Pedro M. Baeza, GitHub, Stéphane Bidoul (ACSONE), cubells, OCA Transbot, oca-travis, Weblate, OCA-git-bot
WEBSITE
WEBSITEhttp://www.camptocamp.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:15:20
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
    - account
    - base_setup
    - web_kanban
    - web
    - product
    - decimal_precision
    - mail
    - bus
    - report
    - analytic
    - web_tip
    - web_planner
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (18)
XML IDNameModelTypeStatus
credit_control_company_form credit.control.company.form res.company field Inherits base.view_company_form
credit_control_line_form credit.control.line.form credit.control.line form New
credit_control_line_search Credit Control Lines credit.control.line search New
credit_control_line_tree credit.control.line.tree credit.control.line tree New
credit_control_policy_changer_form credit control policy form credit.control.policy.changer form New
credit_control_policy_form credit.control.policy.form credit.control.policy form New
credit_control_policy_level_tree credit.control.policy.level.tree credit.control.policy.level tree New
credit_control_policy_tree credit.control.policy.tree credit.control.policy tree New
credit_control_run_form credit.control.run.form credit.control.run form New
credit_control_run_tree credit.control.run.tree credit.control.run tree New
credit_line_emailer_form credit.line.emailer.form credit.control.emailer form New
credit_line_marker_form credit.line.marker.form credit.control.marker form New
credit_line_printer_form credit.line.printer.form credit.control.printer form New
credit_mangement_policy_level_form credit.mangement.policy.level.form credit.control.policy.level form New
invoice_followup_form_view invoice.followup.form.view account.invoice notebook Inherits account.invoice_form
partner_followup_form_view partner.credit_control.form.view res.partner field Inherits account.view_partner_property_form
report_credit_control_summary report_credit_control_summary ir.ui.view qweb New
report_credit_control_summary_document report_credit_control_summary_document ir.ui.view qweb New
Models touched (14)

New fields (1)
  • credit_control_line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='account_id' readonly=True string='Credit Lines'
Public methods (0)

No public methods.

New fields (2)
  • credit_control_line_ids One2many → credit.control.line
    comodel_name='credit.control.line' copy=False inverse_name='invoice_id' readonly=True string='Credit Lines'
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' copy=False groups='account_credit_control.group_account_credit_control_manager,account_credit_control.group_account_credit_control_user,account_credit_control.group_account_credit_control_info' help='The Credit Control Policy used for this invoice. If nothing is defined, it will use the account setting or the partner setting.' readonly=True string='Credit Control Policy'
Public methods (1)
  • action_cancel(self)
    @api.multi
    Prevent to cancel invoice related to credit line

New fields (10)
  • company_id Many2one → res.company
    default=_get_company required=True string='Company' args: 'res.company'
  • contact_address Many2one → res.partner
    readonly=True string='Contact Address' args: 'res.partner'
  • credit_control_line_ids Many2many → credit.control.line
    rel='comm_credit_rel' string='Credit Lines' args: 'credit.control.line'
  • currency_id Many2one → res.currency
    required=True args: 'res.currency', 'Currency'
  • current_policy_level Many2one → credit.control.policy.level
    required=True args: 'credit.control.policy.level', 'Level'
  • partner_id Many2one → res.partner
    required=True args: 'res.partner', 'Partner'
  • report_date Date
    default=fields.Date.context_today string='Report Date'
  • total_due Float
    compute='_compute_total' string='Total Due'
  • total_invoiced Float
    compute='_compute_total' string='Total Invoiced'
  • user_id Many2one → res.users
    default=<expr> string='User' args: 'res.users'
Public methods (3)
  • create(self, vals)
    @api.model@api.returns('self', <expr>)
  • get_contact_address(self)
    @api.multi@api.returns('res.partner')
    Compatibility method, please use the contact_address field
  • get_email(self)
    @api.multi
    Return a valid email for customer

New fields (1)
  • line_ids Many2many → credit.control.line
    default=_get_line_ids domain=[('state', '=', 'to_be_sent'), ('channel', '=', 'email')] string='Credit Control Lines' args: 'credit.control.line'
Public methods (1)
  • email_lines(self)
    @api.multi

New fields (20)
  • account_id Many2one → account.account
    comodel_name='account.account' readonly=True related='move_line_id.account_id' store=True
  • amount_due Float
    readonly=True required=True string='Due Amount Tax incl.'
  • balance_due Float
    readonly=True required=True string='Due balance'
  • channel Selection
    readonly=True required=True selection=[('letter', 'Letter'), ('email', 'Email')] states={'draft': [('readonly', False)]} string='Channel'
  • company_id Many2one → res.company
    comodel_name='res.company' readonly=True related='move_line_id.company_id' store=True
  • currency_id Many2one → res.currency
    comodel_name='res.currency' readonly=True related='move_line_id.currency_id' store=True
  • date Date
    index=True required=True string='Controlling date'
  • date_due Date
    readonly=True required=True states={'draft': [('readonly', False)]} string='Due date'
  • date_entry Date
    readonly=True related='move_line_id.date' store=True string='Entry date'
  • date_sent Date
    readonly=True states={'draft': [('readonly', False)]} string='Sent date'
  • invoice_id Many2one → account.invoice
    comodel_name='account.invoice' readonly=True string='Invoice'
  • level Integer
    readonly=True related='policy_level_id.level' store=True string='Level'
  • mail_message_id Many2one → mail.mail
    comodel_name='mail.mail' readonly=True string='Sent Email'
  • manually_overridden Boolean
    string='Manually overridden'
  • move_line_id Many2one → account.move.line
    comodel_name='account.move.line' readonly=True required=True string='Move line'
  • partner_id Many2one → res.partner
    comodel_name='res.partner' required=True string='Partner'
  • policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' readonly=True related='policy_level_id.policy_id' store=True
  • policy_level_id Many2one → credit.control.policy.level
    comodel_name='credit.control.policy.level' readonly=True required=True states={'draft': [('readonly', False)]} string='Overdue Level'
  • run_id Many2one → credit.control.run
    comodel_name='credit.control.run' string='Source'
  • state Selection
    default='draft' help='Draft lines need to be triaged.\nIgnored lines are lines for which we do not want to send something.\nDraft and ignored lines will be generated again on the next run.' readonly=True required=True selection=[('draft', 'Draft'), ('ignored', 'Ignored'), ('to_be_sent', 'Ready To Send'), ('sent', 'Done'), ('error', 'Error'), ('email_error', 'Emailing Error')] string='State'
Public methods (2)
  • create_or_update_from_mv_lines(self, lines, level, controlling_date, check_tolerance=True)
    @api.model
    Create or update line based on levels if check_tolerance is true credit line will not be created if open amount is too small. eg. we do not want to send a letter for 10 cents of open amount. :param lines: move.line id recordset :param level: credit.control.policy.level record :param controlling_date: date string of the credit controlling date. Generally it should be the same as create date :param check_tolerance: boolean if True credit line will not be generated if open amount is smaller than company defined tolerance :returns: recordset of created credit lines
  • unlink(self)
    @api.multi

New fields (2)
  • line_ids Many2many → credit.control.line
    default=_get_line_ids domain="[('state', '!=', 'sent')]" string='Credit Control Lines' args: 'credit.control.line'
  • name Selection
    default='to_be_sent' required=True string='Mark as' args: [('ignored', 'Ignored'), ('to_be_sent', 'Ready To Send'), ('sent', 'Done')]
Public methods (1)
  • mark_lines(self)
    @api.multi
    Write state of selected credit lines to the one in entry done credit line will be ignored

New fields (6)
  • account_ids Many2many → account.account
    comodel_name='account.account' domain="[('internal_type', '=', 'receivable')]" help='This policy will be active only for the selected accounts' required=True string='Accounts'
  • active Boolean
    default=True
  • company_id Many2one → res.company
    comodel_name='res.company' string='Company'
  • do_nothing Boolean
    help='For policies which should not generate lines or are obsolete'
  • level_ids One2many → credit.control.policy.level
    comodel_name='credit.control.policy.level' inverse_name='policy_id' string='Policy Levels'
  • name Char
    required=True
Public methods (1)
  • check_policy_against_account(self, account)
    @api.multi
    Ensure that the policy corresponds to account relation

New fields (4)
  • do_nothing Boolean
    string='No follow policy'
  • move_line_ids Many2many → account.move.line
    default=_get_default_lines rel='credit_changer_ml_rel' string='Move line to change' args: 'account.move.line'
  • new_policy_id Many2one → credit.control.policy
    required=True string='New Policy to Apply' args: 'credit.control.policy'
  • new_policy_level_id Many2one → credit.control.policy.level
    required=True string='New level to apply' args: 'credit.control.policy.level'
Public methods (2)
  • onchange_policy_id(self)
    @api.onchange('new_policy_level_id')
  • set_new_policy(self)
    @api.multi
    Set new policy on an invoice. This is done by creating a new credit control line related to the move line and the policy setted in the wizard form :return: ir.actions.act_windows dict

New fields (9)
  • channel Selection
    required=True selection=[('letter', 'Letter'), ('email', 'Email')] string='Channel'
  • computation_mode Selection
    required=True selection=[('net_days', 'Due Date'), ('end_of_month', 'Due Date, End Of Month'), ('previous_date', 'Previous Reminder')] string='Compute Mode'
  • custom_mail_text Html
    required=True string='Custom Mail Message' translate=True
  • custom_text Text
    required=True string='Custom Message' translate=True
  • delay_days Integer
    required=True string='Delay (in days)'
  • email_template_id Many2one → mail.template
    comodel_name='mail.template' required=True string='Email Template'
  • level Integer
    required=True
  • name Char
    required=True translate=True
  • policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' required=True string='Related Policy'
Public methods (1)
  • get_level_lines(self, controlling_date, lines)
    @api.multi@api.returns('account.move.line')
    get all move lines in entry lines that match the current level

New fields (2)
  • line_ids Many2many → credit.control.line
    default=_get_line_ids string='Credit Control Lines' args: 'credit.control.line'
  • mark_as_sent Boolean
    default=True help='Only letter lines will be marked.' string='Mark letter lines as sent'
Public methods (1)
  • print_lines(self)
    @api.multi

New fields (6)
  • date Date
    readonly=True required=True states={'draft': [('readonly', False)]} string='Controlling Date'
  • line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='run_id' string='Generated lines'
  • manual_ids Many2many → account.move.line
    comodel_name='account.move.line' copy=False help='If a credit control line has been generatedon a policy and the policy has been changed in the meantime, it has to be handled manually' readonly=True rel='credit_runreject_rel' string='Lines to handle manually'
  • policy_ids Many2many → credit.control.policy
    comodel_name='credit.control.policy' default=_get_policies id1='run_id' id2='policy_id' readonly=True rel='credit_run_policy_rel' states={'draft': [('readonly', False)]} string='Policies'
  • report Html
    copy=False readonly=True string='Report'
  • state Selection
    default='draft' readonly=True required=True selection=[('draft', 'Draft'), ('done', 'Done')] string='State'
Public methods (2)
  • generate_credit_lines(self)
    @api.multi
    Generate credit control lines Lock the ``credit_control_run`` Postgres table to avoid concurrent calls of this method.
  • open_credit_lines(self)
    @api.multi
    Open the generated lines

New fields (1)
  • body_html Html
    help='Rich-text/HTML message' string='Rich-text Contents'
Public methods (0)

No public methods.

New fields (2)
  • credit_control_tolerance Float
    default=0.1 string='Credit Control Tolerance'
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' help='The Credit Control Policy used on partners by default. This setting can be overridden on partners or invoices.' string='Credit Control Policy'
Public methods (0)

No public methods.

New fields (2)
  • credit_control_line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='invoice_id' readonly=True string='Credit Control Lines'
  • credit_policy_id Many2one → credit.control.policy
    comodel_name='credit.control.policy' domain="[('account_ids', 'in', property_account_receivable_id)]" help='The Credit Control Policy used for this partner. This setting can be forced on the invoice. If nothing is defined, it will use the company setting.' string='Credit Control Policy'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/account-financial-tools
GIT
GIThttps://github.com/OCA/account-financial-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/account-financial-tools/tree/8.0/account_credit_control
VERSION
VERSION 0.3.0
CATEGORY
CATEGORYFinance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSStéphane Bidoul, Alexis de Lattre, Yannick Vaucher, Guewen Baconnier, Alexandre Fayolle, Matthieu Dietrich, Joël Grand-Guillaume, Stefan Rijnhart, Pedro M. Baeza, Nicolas Bessi, Stéphane Bidoul (ACSONE), Maxime Vanderhaeghe, OCA Transbot, Adrien Peiffer (ACSONE), beau sebastien, Laurent Mignon, oca-travis, Weblate, Andrius Preimantas, fossoult
WEBSITE
WEBSITEhttp://www.camptocamp.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:11:22
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
    - account
    - base_setup
    - web_kanban
    - web
    - product
    - decimal_precision
    - mail
    - report
    - analytic
    - board
    - edi
    - email_template
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (18)
XML IDNameModelTypeStatus
credit_control_company_form credit.control.company.form res.company field Inherits base.view_company_form
credit_control_line_form credit.control.line.form credit.control.line form New
credit_control_line_search Credit Control Lines credit.control.line search New
credit_control_line_tree credit.control.line.tree credit.control.line tree New
credit_control_policy_changer_form credit control policy form credit.control.policy.changer form New
credit_control_policy_form credit.control.policy.form credit.control.policy form New
credit_control_policy_level_tree credit.control.policy.level.tree credit.control.policy.level tree New
credit_control_policy_tree credit.control.policy.tree credit.control.policy tree New
credit_control_run_form credit.control.run.form credit.control.run form New
credit_control_run_tree credit.control.run.tree credit.control.run tree New
credit_line_emailer_form credit.line.emailer.form credit.control.emailer form New
credit_line_marker_form credit.line.marker.form credit.control.marker form New
credit_line_printer_form credit.line.printer.form credit.control.printer form New
credit_mangement_policy_level_form credit.mangement.policy.level.form credit.control.policy.level form New
invoice_followup_form_view invoice.followup.form.view account.invoice notebook Inherits account.invoice_form
partner_followup_form_view partner.credit_control.form.view res.partner field Inherits account.view_partner_property_form
report_credit_control_summary report_credit_control_summary ir.ui.view qweb New
report_credit_control_summary_document report_credit_control_summary_document ir.ui.view qweb New
Models touched (14)

New fields (1)
  • credit_control_line_ids One2many → credit.control.line
    readonly=True string='Credit Lines' args: 'credit.control.line', 'account_id'
Public methods (0)

No public methods.

New fields (2)
  • credit_control_line_ids One2many → credit.control.line
    copy=False readonly=True string='Credit Lines' args: 'credit.control.line', 'invoice_id'
  • credit_policy_id Many2one → credit.control.policy
    copy=False groups='account_credit_control.group_account_credit_control_manager,account_credit_control.group_account_credit_control_user,account_credit_control.group_account_credit_control_info' help='The Credit Control Policy used for this invoice. If nothing is defined, it will use the account setting or the partner setting.' readonly=True string='Credit Control Policy' args: 'credit.control.policy'
Public methods (1)
  • action_cancel(self)
    @api.multi
    Prevent to cancel invoice related to credit line

New fields (10)
  • company_id Many2one → res.company
    default=_get_company required=True string='Company' args: 'res.company'
  • contact_address Many2one → res.partner
    readonly=True string='Contact Address' args: 'res.partner'
  • credit_control_line_ids Many2many → credit.control.line
    rel='comm_credit_rel' string='Credit Lines' args: 'credit.control.line'
  • currency_id Many2one → res.currency
    required=True args: 'res.currency', 'Currency'
  • current_policy_level Many2one → credit.control.policy.level
    required=True args: 'credit.control.policy.level', 'Level'
  • partner_id Many2one → res.partner
    required=True args: 'res.partner', 'Partner'
  • report_date Date
    default=fields.Date.context_today string='Report Date'
  • total_due Float
    compute='_compute_total' string='Total Due'
  • total_invoiced Float
    compute='_compute_total' string='Total Invoiced'
  • user_id Many2one → res.users
    default=<expr> string='User' args: 'res.users'
Public methods (3)
  • create(self, vals)
    @api.model@api.returns('self', <expr>)
  • get_contact_address(self)
    @api.multi@api.returns('res.partner')
    Compatibility method, please use the contact_address field
  • get_email(self)
    @api.multi
    Return a valid email for customer

New fields (1)
  • line_ids Many2many → credit.control.line
    default=_get_line_ids domain=[('state', '=', 'to_be_sent'), ('channel', '=', 'email')] string='Credit Control Lines' args: 'credit.control.line'
Public methods (1)
  • email_lines(self)
    @api.multi

New fields (20)
  • account_id Many2one → account.account
    readonly=True related='move_line_id.account_id' store=True args: 'account.account'
  • amount_due Float
    readonly=True required=True string='Due Amount Tax incl.'
  • balance_due Float
    readonly=True required=True string='Due balance'
  • channel Selection
    readonly=True required=True states={'draft': [('readonly', False)]} string='Channel' args: [('letter', 'Letter'), ('email', 'Email')]
  • company_id Many2one → res.company
    readonly=True related='move_line_id.company_id' store=True args: 'res.company'
  • currency_id Many2one → res.currency
    readonly=True related='move_line_id.currency_id' store=True args: 'res.currency'
  • date Date
    required=True select=True string='Controlling date'
  • date_due Date
    readonly=True required=True states={'draft': [('readonly', False)]} string='Due date'
  • date_entry Date
    readonly=True related='move_line_id.date' store=True string='Entry date'
  • date_sent Date
    readonly=True states={'draft': [('readonly', False)]} string='Sent date'
  • invoice_id Many2one → account.invoice
    readonly=True string='Invoice' args: 'account.invoice'
  • level Integer
    readonly=True related='policy_level_id.level' store=True string='Policy Level'
  • mail_message_id Many2one → mail.mail
    readonly=True string='Sent Email' args: 'mail.mail'
  • manually_overridden Boolean
    string='Manually overridden'
  • move_line_id Many2one → account.move.line
    readonly=True required=True string='Move line' args: 'account.move.line'
  • partner_id Many2one → res.partner
    required=True string='Partner' args: 'res.partner'
  • policy_id Many2one → credit.control.policy
    readonly=True related='policy_level_id.policy_id' store=True args: 'credit.control.policy'
  • policy_level_id Many2one → credit.control.policy.level
    readonly=True required=True states={'draft': [('readonly', False)]} string='Overdue Level' args: 'credit.control.policy.level'
  • run_id Many2one → credit.control.run
    comodel_name='credit.control.run' string='Source'
  • state Selection
    default='draft' help='Draft lines need to be triaged.\nIgnored lines are lines for which we do not want to send something.\nDraft and ignored lines will be generated again on the next run.' readonly=True required=True args: [('draft', 'Draft'), ('ignored', 'Ignored'), ('to_be_sent', 'Ready To Send'), ('sent', 'Done'), ('error', 'Error'), ('email_error', 'Emailing Error')], 'State'
Public methods (2)
  • create_or_update_from_mv_lines(self, lines, level, controlling_date, check_tolerance=True)
    @api.model
    Create or update line based on levels if check_tolerance is true credit line will not be created if open amount is too small. eg. we do not want to send a letter for 10 cents of open amount. :param lines: move.line id recordset :param level: credit.control.policy.level record :param controlling_date: date string of the credit controlling date. Generally it should be the same as create date :param check_tolerance: boolean if True credit line will not be generated if open amount is smaller than company defined tolerance :returns: recordset of created credit lines
  • unlink(self)
    @api.multi

New fields (2)
  • line_ids Many2many → credit.control.line
    default=_get_line_ids domain="[('state', '!=', 'sent')]" string='Credit Control Lines' args: 'credit.control.line'
  • name Selection
    default='to_be_sent' required=True string='Mark as' args: [('ignored', 'Ignored'), ('to_be_sent', 'Ready To Send'), ('sent', 'Done')]
Public methods (1)
  • mark_lines(self)
    @api.multi
    Write state of selected credit lines to the one in entry done credit line will be ignored

New fields (6)
  • account_ids Many2many → account.account
    domain="[('type', '=', 'receivable')]" help='This policy will be active only for the selected accounts' required=True string='Accounts' args: 'account.account'
  • active Boolean
    default=True args: 'Active'
  • company_id Many2one → res.company
    string='Company' args: 'res.company'
  • do_nothing Boolean
    help='For policies which should not generate lines or are obsolete' args: 'Do nothing'
  • level_ids One2many → credit.control.policy.level
    string='Policy Levels' args: 'credit.control.policy.level', 'policy_id'
  • name Char
    required=True args: 'Name'
Public methods (1)
  • check_policy_against_account(self, account)
    @api.multi
    Ensure that the policy corresponds to account relation

New fields (4)
  • do_nothing Boolean
    string='No follow policy'
  • move_line_ids Many2many → account.move.line
    default=_get_default_lines rel='credit_changer_ml_rel' string='Move line to change' args: 'account.move.line'
  • new_policy_id Many2one → credit.control.policy
    required=True string='New Policy to Apply' args: 'credit.control.policy'
  • new_policy_level_id Many2one → credit.control.policy.level
    required=True string='New level to apply' args: 'credit.control.policy.level'
Public methods (2)
  • onchange_policy_id(self)
    @api.onchange('new_policy_level_id')
  • set_new_policy(self)
    @api.multi
    Set new policy on an invoice. This is done by creating a new credit control line related to the move line and the policy setted in the wizard form :return: ir.actions.act_windows dict

New fields (10)
  • channel Selection
    required=True string='Channel' args: [('letter', 'Letter'), ('email', 'Email')]
  • computation_mode Selection
    required=True string='Compute Mode' args: [('net_days', 'Due Date'), ('end_of_month', 'Due Date, End Of Month'), ('previous_date', 'Previous Reminder')]
  • custom_mail_text Html
    required=True string='Custom Mail Message' translate=True
  • custom_text Text
    required=True string='Custom Message' translate=True
  • custom_text_after_details Text
    string='Custom Message after details' translate=True
  • delay_days Integer
    required=True string='Delay (in days)'
  • email_template_id Many2one → email.template
    required=True string='Email Template' args: 'email.template'
  • level Integer
    required=True string='Level'
  • name Char
    required=True string='Name' translate=True
  • policy_id Many2one → credit.control.policy
    ondelete='cascade' required=True string='Related Policy' args: 'credit.control.policy'
Public methods (1)
  • get_level_lines(self, controlling_date, lines)
    @api.multi@api.returns('account.move.line')
    get all move lines in entry lines that match the current level

New fields (2)
  • line_ids Many2many → credit.control.line
    default=_get_line_ids string='Credit Control Lines' args: 'credit.control.line'
  • mark_as_sent Boolean
    default=True help='Only letter lines will be marked.' string='Mark letter lines as sent'
Public methods (1)
  • print_lines(self)
    @api.multi

New fields (6)
  • date Date
    readonly=True required=True states={'draft': [('readonly', False)]} string='Controlling Date'
  • line_ids One2many → credit.control.line
    comodel_name='credit.control.line' inverse_name='run_id' string='Generated lines'
  • manual_ids Many2many → account.move.line
    copy=False help='If a credit control line has been generatedon a policy and the policy has been changed in the meantime, it has to be handled manually' readonly=True rel='credit_runreject_rel' string='Lines to handle manually' args: 'account.move.line'
  • policy_ids Many2many → credit.control.policy
    default=_get_policies id1='run_id' id2='policy_id' readonly=True rel='credit_run_policy_rel' states={'draft': [('readonly', False)]} string='Policies' args: 'credit.control.policy'
  • report Html
    copy=False readonly=True string='Report'
  • state Selection
    default='draft' readonly=True required=True string='State' args: [('draft', 'Draft'), ('done', 'Done')]
Public methods (2)
  • generate_credit_lines(self)
    @api.multi
    Generate credit control lines Lock the ``credit_control_run`` Postgres table to avoid concurrent calls of this method.
  • open_credit_lines(self)
    @api.multi
    Open the generated lines

New fields (1)
  • body_html Html
    help='Rich-text/HTML message' args: 'Rich-text Contents'
Public methods (0)

No public methods.

New fields (2)
  • credit_control_tolerance Float
    default=0.1 string='Credit Control Tolerance'
  • credit_policy_id Many2one → credit.control.policy
    help='The Credit Control Policy used on partners by default. This setting can be overridden on partners or invoices.' string='Credit Control Policy' args: 'credit.control.policy'
Public methods (0)

No public methods.

New fields (2)
  • credit_control_line_ids One2many → credit.control.line
    readonly=True string='Credit Control Lines' args: 'credit.control.line', 'partner_id'
  • credit_policy_id Many2one → credit.control.policy
    domain="[('account_ids', 'in', property_account_receivable)]" help='The Credit Control Policy used for this partner. This setting can be forced on the invoice. If nothing is defined, it will use the company setting.' string='Credit Control Policy' args: 'credit.control.policy'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/account-financial-tools
GIT
GIThttps://github.com/OCA/account-financial-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/account-financial-tools/tree/7.0/account_credit_control
VERSION
VERSION 0.2.0
CATEGORY
CATEGORYFinance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSStéphane Bidoul, Yannick Vaucher, Guewen Baconnier, Alexandre Fayolle, Matthieu Dietrich, Nicolas Bessi, Omar (Pexego), unknown, Vincent Renaville, openerp, OCA Transbot, vrenaville, Rudolf Schnapka, Adrien Peiffer (ACSONE)
WEBSITE
WEBSITEhttp://www.camptocamp.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:07:14
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
    - account
    - base_setup
    - web_kanban
    - web
    - product
    - process
    - decimal_precision
    - mail
    - analytic
    - board
    - edi
    - email_template
    - report_webkit
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Credit Control
==============

Configuration
-------------

Configure the policies and policy levels in ``Accounting  > Configuration >
Credit Control > Credit Policies``.
You can define as many policy levels as you need.

Configure a tolerance for the Credit control and a default policy
applied on all partners in each company, under the Accounting tab.

You are able to specify a particular policy for one partner or one invoice.

Usage
-----

Menu entries are located in ``Accounting > Periodical Processing > Credit
Control``.

Create a new "run" in the ``Credit Control Run`` menu
with the controlling date.

Then, use the ``Compute credit lines`` button.
All the credit control lines will be generated.
You can find them in the ``Credit Control Lines`` menu.

On each generated line, you have many choices:
 * Send a email
 * Print a letter
 * Change the state (so you can ignore or reopen lines)
 

Code Analysis

Views touched (16)
XML IDNameModelTypeStatus
credit_control_company_form credit.control.company.form res.company field Inherits base.view_company_form
credit_control_line_form credit.control.line.form credit.control.line form New
credit_control_line_search Credit Control Lines credit.control.line search New
credit_control_line_tree credit.control.line.tree credit.control.line tree New
credit_control_policy_changer_form credit control policy form credit.control.policy.changer form New
credit_control_policy_form credit.control.policy.form credit.control.policy form New
credit_control_policy_level_tree credit.control.policy.level.tree credit.control.policy.level tree New
credit_control_policy_tree credit.control.policy.tree credit.control.policy tree New
credit_control_run_form credit.control.run.form credit.control.run form New
credit_control_run_tree credit.control.run.tree credit.control.run tree New
credit_line_emailer_form credit.line.emailer.form credit.control.emailer form New
credit_line_marker_form credit.line.marker.form credit.control.marker form New
credit_line_printer_form credit.line.printer.form credit.control.printer form New
credit_mangement_policy_level_form credit.mangement.policy.level.form credit.control.policy.level form New
invoice_followup_form_view invoice.followup.form.view account.invoice notebook Inherits account.invoice_form
partner_followup_form_view partner.credit_control.form.view res.partner field Inherits base.view_partner_form
Models touched (14)

New fields (0)

No new fields.

Public methods (1)
  • copy_data(self, cr, uid, id, default=None, context=None)

New fields (0)

No new fields.

Public methods (2)
  • action_cancel(self, cr, uid, ids, context=None)
    Prevent to cancel invoice related to credit line
  • copy_data(self, cr, uid, id, default=None, context=None)
    Ensure that credit lines and policy are not copied

New fields (0)

No new fields.

Public methods (2)
  • get_contact_address(self, cr, uid, com_id, context=None)
  • get_email(self, cr, uid, com_id, context=None)
    Return a valid email for customer

New fields (0)

No new fields.

Public methods (1)
  • email_lines(self, cr, uid, wiz_id, context=None)

New fields (0)

No new fields.

Public methods (2)
  • create_or_update_from_mv_lines(self, cr, uid, ids, lines, level_id, controlling_date, check_tolerance=True, context=None)
    Create or update line based on levels if check_tolerance is true credit line will not be created if open amount is too small. eg. we do not want to send a letter for 10 cents of open amount. :param lines: move.line id list :param level_id: credit.control.policy.level id :param controlling_date: date string of the credit controlling date. Generally it should be the same as create date :param check_tolerance: boolean if True credit line will not be generated if open amount is smaller than company defined tolerance :returns: list of created credit line ids
  • unlink(self, cr, uid, ids, context=None, check=True)

New fields (0)

No new fields.

Public methods (1)
  • mark_lines(self, cr, uid, wiz_id, context=None)
    Write state of selected credit lines to the one in entry done credit line will be ignored

New fields (0)

No new fields.

Public methods (1)
  • check_policy_against_account(self, cr, uid, account_id, policy_id, context=None)
    Ensure that the policy corresponds to account relation

New fields (0)

No new fields.

Public methods (2)
  • onchange_policy_id(self, cr, uid, ids, new_policy_id, context=None)
  • set_new_policy(self, cr, uid, wizard_id, context=None)
    Set new policy on an invoice. This is done by creating a new credit control line related to the move line and the policy setted in the wizard form :return: ir.actions.act_windows dict

New fields (0)

No new fields.

Public methods (1)
  • get_level_lines(self, cr, uid, level_id, controlling_date, lines, context=None)
    get all move lines in entry lines that match the current level

New fields (0)

No new fields.

Public methods (1)
  • print_lines(self, cr, uid, wiz_id, context=None)

New fields (0)

No new fields.

Public methods (2)
  • copy_data(self, cr, uid, id, default=None, context=None)
  • generate_credit_lines(self, cr, uid, run_id, context=None)
    Generate credit control lines Lock the ``credit_control_run`` Postgres table to avoid concurrent calls of this method.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • copy_data(self, cr, uid, id, default=None, context=None)
    Remove credit lines when copying partner
REPOSITORY
REPOSITORYOCA/account-financial-tools
GIT
GIThttps://github.com/OCA/account-financial-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/account-financial-tools/tree/6.1/account_credit_control
VERSION
VERSION 0.1
CATEGORY
CATEGORYFinance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSAlexandre Fayolle, Joel Grand-Guillaume, Alexandre Fayolle @ camptocamp, Guewen Baconnier @ Camptocamp, Ondřej Kuzník
WEBSITE
WEBSITEhttp://www.camptocamp.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:04:06
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
    - account
    - base_setup
    - product
    - process
    - decimal_precision
    - analytic
    - board
    - edi
    - email_template
    - mail
    - base_tools
    - report_webkit
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Credit Control
==============

Configuration
-------------

Configure the policies and policy levels in ``Accounting  > Configuration >
Credit Control > Credit Policies``.
You can define as many policy levels as you need.

Configure a tolerance for the Credit control and a default policy
applied on all partners in each company, under the Accounting tab.

You are able to specify a particular policy for one partner or one invoice.

Usage
-----

Menu entries are located in ``Accounting > Periodical Processing > Credit
Control``.

Create a new "run" in the ``Credit Control Run`` menu with the controlling date.
Then, use the ``Compute credit lines`` button. All the credit control lines will
be generated. You can find them in the ``Credit Control Lines`` menu.

On each generated line, you have many choices:
 * Send a email
 * Print a letter
 * Change the state (so you can ignore or reopen lines)
 

Code Analysis

Views touched (15)
XML IDNameModelTypeStatus
credit_control_company_form credit.control.company.form res.company field Inherits base.view_company_form
credit_control_line_form credit.control.line.form credit.control.line form New
credit_control_line_search Credit Control Lines credit.control.lines search New
credit_control_line_tree credit.control.line.tree credit.control.line tree New
credit_control_policy_form credit.control.policy.form credit.control.policy form New
credit_control_policy_level_tree credit.control.policy.level.tree credit.control.policy.level tree New
credit_control_policy_tree credit.control.policy.tree credit.control.policy tree New
credit_control_run_form credit.control.run.form credit.control.run form New
credit_control_run_tree credit.control.run.tree credit.control.run tree New
credit_line_emailer_form credit.line.emailer.form credit.control.emailer form New
credit_line_marker_form credit.line.marker.form credit.control.marker form New
credit_line_printer_form credit.line.printer.form credit.control.printer form New
credit_mangement_policy_level_form credit.mangement.policy.level.form credit.control.policy.level form New
invoice_followup_form_view invoice.followup.form.view account.invoice notebook Inherits account.invoice_form
partner_followup_form_view partner.credit_control.form.view res.partner field Inherits base.view_partner_form
Models touched (12)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • action_move_create(self, cr, uid, ids, context=None)
    Write the id of the invoice in the generated moves.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (2)
  • get_address(self, cr, uid, com_id, context=None)
    Return a valid address for customer
  • get_email(self, cr, uid, com_id, context=None)
    Return a valid email for customer

New fields (0)

No new fields.

Public methods (1)
  • email_lines(self, cr, uid, wiz_id, context=None)

New fields (0)

No new fields.

Public methods (2)
  • create_or_update_from_mv_lines(self, cr, uid, ids, lines, level_id, controlling_date, context=None)
    Create or update line based on levels
  • unlink(self, cr, uid, ids, context=None, check=True)

New fields (0)

No new fields.

Public methods (1)
  • mark_lines(self, cr, uid, wiz_id, context=None)
    Write state of selected credit lines to the one in entry done credit line will be ignored

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • get_level_lines(self, cr, uid, level_id, controlling_date, lines, context=None)
    get all move lines in entry lines that match the current level

New fields (0)

No new fields.

Public methods (1)
  • print_lines(self, cr, uid, wiz_id, context=None)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.