Account Move Cut-off

account_move_cutoff
REPOSITORY
REPOSITORYOCA/account-closing
GIT
GIThttps://github.com/OCA/account-closing.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/account-closing/tree/17.0/account_move_cutoff
VERSION
VERSION 0.1.0
CATEGORY
CATEGORYAccounting & Finance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Pierre Verkest <pierreverkest84@gmail.com>
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Pierre Verkest <pierreverkest84@gmail.com>
COMMITTERS
COMMITTERSPierre Verkest, OCA-git-bot, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/account-closing
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:20:09
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/account-closing:
    - account_invoice_start_end_dates
odoo/odoo:
    - account
    - base_setup
    - base
    - 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
This module allows to generate cu-toff entries automatically when
posting former entries.

This module is based on account_invoice_start_end_dates which allows to
define start end end dates on invoice line (account.move.line).

Following assumption have been made before developing this module:

    - New method to compute cutoff amounts can be add by business modules

> [!NOTE]
> This module as been developed with some opinionated design do not
> depends on account_cutoff_base. Because:
>
>     - we don't want rely on user nor async task at the end of
>       each month (period)
>     - link entries to understand the history without merging amounts
>       in order to be able to keep details on deferred account
>       move line (analytics, partners, accounts and so on)

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
res_config_settings_view_form cutoff.res.config.settings.form res.config.settings xpath Inherits account.res_config_settings_view_form
view_account_form account.account.form account.account field Inherits account.view_account_form
view_account_list account.account.list account.account field Inherits account.view_account_list
view_move_form account.move.form account.move div Inherits account.view_move_form
view_move_line_form account.move.line.form account.move.line page Inherits account.view_move_line_form
view_move_line_tree account.move.line.tree account.move.line field Inherits account.view_move_line_tree
Models touched (6)

New fields (1)
  • deferred_accrual_account_id Many2one → account.account
    comodel_name='account.account' domain="[('company_id', '=', company_id),('account_type', 'in', ('asset_current', 'liability_current')),]" help="Account used to deferred Revenues/Expenses in next periods. If not set revenue won't be deferred" string='Revenue/Expense accrual account'
Public methods (0)

No public methods.

New fields (3)
  • cutoff_entry_ids One2many → account.move
    comodel_name='account.move' help='Field use to make easy to user to follow entries generated from this specific entry to deferred revenues or expenses.' inverse_name='cutoff_from_id' readonly=True string='Cut-off entries'
  • cutoff_from_id Many2one → account.move
    comodel_name='account.move' help='Source entry that generate the current deferred revenue/expense entry' string='Cut-off source entry'
  • cutoff_move_count Integer
    compute='_compute_cutoff_move_count'
Public methods (2)
  • action_view_deferred_entries(self)
  • button_draft(self)

New fields (6)
  • cutoff_ids One2many → account.move.line
    comodel_name='account.move.line' help='Field use to make easy to user to follow items generated from this specific entry to deferred revenues or expenses.' inverse_name='cutoff_source_id' readonly=True string='Cut-off items'
  • cutoff_method Selection
    default='monthly_prorata_temporis' help='Determine how to split amounts over periods:\n * Equal: same amount is splitted over periods of the service (using start and end date on the invoice line).\n * Prorata temporis by month %: amount is splitted over the rate of service days in the month.\n' required=True string='Cut-off method' args: [('equal', 'Equal'), ('monthly_prorata_temporis', 'Prorata temporis (by month %)')]
  • cutoff_source_id Many2one → account.move.line
    comodel_name='account.move.line' help='Source journal item that generate the current deferred revenue/expense item' readonly=True string='Cut-off source item'
  • cutoff_source_move_id Many2one → account.move
    comodel_name='account.move' readonly=True related='cutoff_source_id.move_id' store=True string='Cut-off source entry'
  • deferred_accrual_account_id Many2one → account.account
    comodel_name='account.account' help='Use related field to abstract the way to get deferred accrual account. This will give the possibility to overwrite the way to configure it. For instance to use the same account without any configuration while creating new account.' related='account_id.deferred_accrual_account_id' string='Revenue/Expense accrual account'
  • is_deferrable_line Boolean
    compute='_compute_is_deferrable_line' help='Field used to detect lines to cut-off' string='Is deferrable line'
Public methods (1)
  • has_deferred_dates(self)
    Compute the account move line should be split: has service in future periods

New fields (0)

No new fields.

Public methods (1)
  • group_recordset_by(self, key)
    Return a collection of pairs ``(key, recordset)`` from ``self``. The ``key`` is a function computing a key value for each element. This function is similar to ``itertools.groupby``, but aggregates all elements under the same key, not only consecutive elements. it's also similar to ``òdoo.tools.misc.groupby`` but return a recordset of account.move.line instead empty list this let write some code likes this:: my_recordset.filtered( lambda record: record.to_use ).group_recordset_by( lambda record: record.type ) # TODO: consider moving this method on odoo.models.Model

New fields (2)
  • expense_cutoff_journal_id Many2one → account.journal
    check_company=True string='Cut-off Expense Journal' args: 'account.journal'
  • revenue_cutoff_journal_id Many2one → account.journal
    check_company=True string='Cut-off Revenue Journal' args: 'account.journal'
Public methods (0)

No public methods.

New fields (4)
  • default_cutoff_method Selection
    default='monthly_prorata_temporis' default_model='account.move.line' help='Determine how to split amounts over periods:\n * Equal: same amount is splitted over periods of the service (using start and end date on the invoice line).\n * Prorata temporis by month %: amount is splitted over the rate of service days in the month.\n' required=True string='Default Cutoff method' args: [('equal', 'Equal'), ('monthly_prorata_temporis', 'Prorata temporis (by month %)')]
  • expense_cutoff_journal_id Many2one
    readonly=False related='company_id.expense_cutoff_journal_id' string='Expense cut-off journal'
  • link_product Boolean
    config_parameter='account_move_cutoff.link_product' help='Link product on deferred account.move.line.' args: 'Link product'
  • revenue_cutoff_journal_id Many2one
    readonly=False related='company_id.revenue_cutoff_journal_id' string='Revenue cut-off journal'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/account-closing
GIT
GIThttps://github.com/OCA/account-closing.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/account-closing/tree/14.0/account_move_cutoff
VERSION
VERSION 0.1.0
CATEGORY
CATEGORYAccounting & Finance
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Pierre Verkest <pierreverkest84@gmail.com>
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Pierre Verkest <pierreverkest84@gmail.com>
COMMITTERS
COMMITTERSPierre Verkest, Weblate, OCA-git-bot, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/account-closing
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:41:10
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/account-closing:
    - account_invoice_start_end_dates
odoo/odoo:
    - account
    - base_setup
    - base
    - 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 (7)
XML IDNameModelTypeStatus
res_config_settings_view_form cutoff.res.config.settings.form res.config.settings xpath Inherits account.res_config_settings_view_form
view_account_form account.account.form account.account field Inherits account.view_account_form
view_account_list account.account.list account.account field Inherits account.view_account_list
view_move_form account.move.form account.move div Inherits account.view_move_form
view_move_line_form account.move.line.form account.move.line xpath Inherits account.view_move_line_form
view_move_line_tree account.move.line.tree account.move.line field Inherits account.view_move_line_tree
view_move_line_tree_grouped account.move.line.tree.grouped account.move.line field Inherits account.view_move_line_tree_grouped
Models touched (6)

New fields (1)
  • deferred_accrual_account_id Many2one → account.account
    comodel_name='account.account' domain="[('company_id', '=', company_id),('internal_type', 'not in', ('receivable', 'payable')),('is_off_balance', '=', False)]" help="Account used to deferred Revenues/Expenses in next periods. If not set revenue won't be deferred" string='Revenue/Expense accrual account'
Public methods (0)

No public methods.

New fields (3)
  • cutoff_entry_ids One2many → account.move
    comodel_name='account.move' help='Field use to make easy to user to follow entries generated from this specific entry to deferred revenues or expenses.' inverse_name='cutoff_from_id' readonly=True string='Cut-off entries'
  • cutoff_from_id Many2one → account.move
    comodel_name='account.move' help='Source entry that generate the current deferred revenue/expense entry' string='Cut-off source entry'
  • cutoff_move_count Integer
    compute='_compute_cutoff_move_count'
Public methods (2)
  • action_view_deferred_entries(self)
  • button_draft(self)

New fields (6)
  • cutoff_ids One2many → account.move.line
    comodel_name='account.move.line' help='Field use to make easy to user to follow items generated from this specific entry to deferred revenues or expenses.' inverse_name='cutoff_source_id' readonly=True string='Cut-off items'
  • cutoff_method Selection
    default='monthly_prorata_temporis' help='Determine how to split amounts over periods:\n * Equal: same amount is splitted over periods of the service (using start and end date on the invoice line).\n * Prorata temporis by month %: amount is splitted over the rate of service days in the month.\n' required=True string='Cut-off method' args: [('equal', 'Equal'), ('monthly_prorata_temporis', 'Prorata temporis (by month %)')]
  • cutoff_source_id Many2one → account.move.line
    comodel_name='account.move.line' help='Source journal item that generate the current deferred revenue/expense item' readonly=True string='Cut-off source item'
  • cutoff_source_move_id Many2one → account.move
    comodel_name='account.move' readonly=True related='cutoff_source_id.move_id' store=True string='Cut-off source entry'
  • deferred_accrual_account_id Many2one → account.account
    comodel_name='account.account' help='Use related field to abstract the way to get deferred accrual account. This will give the possibility to overwrite the way to configure it. For instance to use the same account without any configuration while creating new account.' related='account_id.deferred_accrual_account_id' string='Revenue/Expense accrual account'
  • is_deferrable_line Boolean
    compute='_compute_is_deferrable_line' help='Field used to detect lines to cut-off' string='Is deferrable line'
Public methods (1)
  • has_deferred_dates(self)
    Compute the account move line should be split: has service in future periods

New fields (0)

No new fields.

Public methods (1)
  • group_recordset_by(self, key)
    Return a collection of pairs ``(key, recordset)`` from ``self``. The ``key`` is a function computing a key value for each element. This function is similar to ``itertools.groupby``, but aggregates all elements under the same key, not only consecutive elements. it's also similar to ``òdoo.tools.misc.groupby`` but return a recordset of account.move.line instead empty list this let write some code likes this:: my_recordset.filtered( lambda record: record.to_use ).group_recordset_by( lambda record: record.type ) # TODO: consider moving this method on odoo.models.Model

New fields (2)
  • expense_cutoff_journal_id Many2one → account.journal
    check_company=True string='Cut-off Expense Journal' args: 'account.journal'
  • revenue_cutoff_journal_id Many2one → account.journal
    check_company=True string='Cut-off Revenue Journal' args: 'account.journal'
Public methods (0)

No public methods.

New fields (4)
  • default_cutoff_method Selection
    default='monthly_prorata_temporis' default_model='account.move.line' help='Determine how to split amounts over periods:\n * Equal: same amount is splitted over periods of the service (using start and end date on the invoice line).\n * Prorata temporis by month %: amount is splitted over the rate of service days in the month.\n' required=True string='Default Cutoff method' args: [('equal', 'Equal'), ('monthly_prorata_temporis', 'Prorata temporis (by month %)')]
  • expense_cutoff_journal_id Many2one
    readonly=False related='company_id.expense_cutoff_journal_id' string='Expense cut-off journal'
  • link_product Boolean
    config_parameter='account_move_cutoff.link_product' help='Link product on deferred account.move.line.' args: 'Link product'
  • revenue_cutoff_journal_id Many2one
    readonly=False related='company_id.revenue_cutoff_journal_id' string='Revenue cut-off journal'
Public methods (0)

No public methods.