Repository
OCA/account-invoicing · module folder · Try on Runboat
Module version
1.0.1
Category
Accounting/Accounting
Folder size
0.12 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/account-invoicing
Last tracking update
2026-08-07 09:06:23
Authors
Odoo Community Association (OCA), Moduon
Maintainers
Odoo Community Association (OCA), Moduon
Committers
Eduardo de Miguel, OCA-git-bot, oca-ci
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
None
Description
This module complements the functionality of *Automatic Entries* in
Accounting. It provides a Wizard to clear invoices by creating an
intermediate journal entry. It allows to clear any invoice with its
opposite types. *out\_* types are cleared with *in\_* types and vice
versa. The invoices to be cleared have to be not paid or partially paid.
The wizard will use the residual amount of the invoices in the clearing
process.

Code Analysis

Views touched (2)
XML IDNameModelTypeStatus
account_invoice_clearing_wizard_form_view account.invoice.clearing.wizard.form.view account.invoice.clearing.wizard form New
view_move_form account.move.form account.move form Inherits account.view_move_form
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (3)

New fields (15)
  • account_id Many2one
    readonly=True related='move_line_id.account_id'
  • amount_residual Monetary
    currency_field='company_currency_id' readonly=True related='move_line_id.amount_residual'
  • amount_to_clear Monetary
    currency_field='company_currency_id' default=0.0 readonly=True string='Clearing amount'
  • can_use_line Boolean
    compute='_compute_can_use_line' store=False
  • clearing_id Many2one → account.invoice.clearing.wizard
    comodel_name='account.invoice.clearing.wizard' string='Clearing'
  • company_currency_id Many2one
    readonly=True related='move_line_id.company_currency_id'
  • credit Monetary
    currency_field='company_currency_id' readonly=True related='move_line_id.credit'
  • date Date
    readonly=True related='move_line_id.date'
  • date_maturity Date
    readonly=True related='move_line_id.date_maturity'
  • debit Monetary
    currency_field='company_currency_id' readonly=True related='move_line_id.debit'
  • invoice_id Many2one
    readonly=True related='move_line_id.move_id'
  • move_line_id Many2one → account.move.line
    comodel_name='account.move.line' required=True string='Move Line'
  • name Char
    readonly=True related='move_line_id.name'
  • product_id Many2one
    readonly=True related='move_line_id.product_id'
  • sequence Integer
    default=10
Public methods (1)
  • action_use_all_amount_residual(self)
    Fill the amount to clear with the residual amount.

New fields (14)
  • amount_to_clear Monetary
    compute='_compute_amount_to_clear' currency_field='company_currency_id' store=False
  • commercial_partner_id Many2one → res.partner
    comodel_name='res.partner' compute='_compute_initial_data' store=True
  • company_currency_id Many2one → res.currency
    comodel_name='res.currency' compute='_compute_initial_data' store=True
  • company_id Many2one → res.company
    comodel_name='res.company' compute='_compute_initial_data' store=True
  • date Date
    default=fields.Date.context_today required=True
  • invoice_ids Many2many → account.move
    comodel_name='account.move' domain=[('move_type', '!=', 'entry'), ('state', '=', 'posted')] required=True string='Invoices/Bills'
  • journal_id Many2one → account.journal
    check_company=True comodel_name='account.journal' default=<expr> domain="[('type', '=', 'general'), ('company_id', '=', company_id)]" required=True string='Journal'
  • line_ids One2many → account.invoice.clearing.lines.wizard
    comodel_name='account.invoice.clearing.lines.wizard' inverse_name='clearing_id' string='Lines'
  • move_data Text
    compute='_compute_move_data' help='JSON value of the moves to be created'
  • move_line_ids Many2many → account.move.line
    comodel_name='account.move.line' compute='_compute_initial_data' store=True
  • move_line_prefix Char
    default='Clearing operation' help='Prefix to be used in the name of the move lines generated by this wizard' string='Prefix for move lines'
  • move_name Char
    default='Clearing operation' help='Name of the move generated by this wizard'
  • move_type Char
    compute='_compute_initial_data' store=True
  • preview_move_data Text
    compute='_compute_preview_move_data' help='JSON value of the data to be displayed in the previewer'
Public methods (7)
  • action_fill_amount_to_clear(self)
    Fill the amount to clear in all lines until amount to clear is zero.
  • action_reopen_wizard(self)
    Reopen the wizard.
  • action_reset_lines(self)
    Reset all lines.
  • action_sort_by_date_due(self, reverse=False)
    Sort lines by date due.
  • action_sort_by_residual(self)
    Sort lines by residual amount.
  • button_confirm(self)
    Create the clearing move.
  • default_get(self, fields)

New fields (0)

No new fields.

Public methods (1)
  • action_open_invoice_clearing_wizard(self)

Loading…

Loading…

Loading…