Account Move Cut-off
account_move_cutoff · OCA/account-closing
Health
54/100
fair
-
Security25/25No findings
-
Activity12/25Last human commit 20 months ago
-
Required by5/250 modules depend on it
-
Maturity12/25In 2 Odoo series since 14.0
Heuristic over the facts below, not an audit · How it's computed
Required by
0
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.21 MB
Module directory on disk
Code analysis
0 migration notes
6 models
6 views
0 HTTP endpoints
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)
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 6
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
res_config_settings_view_form |
cutoff.res.config.settings.form | res.config.settings | form | Inherits account.res_config_settings_view_form |
view_account_form |
account.account.form | account.account | form | Inherits account.view_account_form |
view_account_list |
account.account.list | account.account | list | Inherits account.view_account_list |
view_move_form |
account.move.form | account.move | form | Inherits account.view_move_form |
view_move_line_form |
account.move.line.form | account.move.line | form | Inherits account.view_move_line_form |
view_move_line_tree |
account.move.line.tree | account.move.line | tree | Inherits account.view_move_line_tree |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 6
New fields (1)
-
deferred_accrual_account_idMany2one → account.accountcomodel_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'
No public methods.
New fields (3)
-
cutoff_entry_idsOne2many → account.movecomodel_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=Truestring='Cut-off entries' -
cutoff_from_idMany2one → account.movecomodel_name='account.move'help='Source entry that generate the current deferred revenue/expense entry'string='Cut-off source entry' -
cutoff_move_countIntegercompute='_compute_cutoff_move_count'
-
action_view_deferred_entries(self) -
button_draft(self)
New fields (6)
-
cutoff_idsOne2many → account.move.linecomodel_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=Truestring='Cut-off items' -
cutoff_methodSelectiondefault='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=Truestring='Cut-off method' args: [('equal', 'Equal'), ('monthly_prorata_temporis', 'Prorata temporis (by month %)')] -
cutoff_source_idMany2one → account.move.linecomodel_name='account.move.line'help='Source journal item that generate the current deferred revenue/expense item'readonly=Truestring='Cut-off source item' -
cutoff_source_move_idMany2one → account.movecomodel_name='account.move'readonly=Truerelated='cutoff_source_id.move_id'store=Truestring='Cut-off source entry' -
deferred_accrual_account_idMany2one → account.accountcomodel_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_lineBooleancompute='_compute_is_deferrable_line'help='Field used to detect lines to cut-off'string='Is deferrable line'
-
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_idMany2one → account.journalcheck_company=Truestring='Cut-off Expense Journal' args: 'account.journal' -
revenue_cutoff_journal_idMany2one → account.journalcheck_company=Truestring='Cut-off Revenue Journal' args: 'account.journal'
No public methods.
New fields (4)
-
default_cutoff_methodSelectiondefault='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=Truestring='Default Cutoff method' args: [('equal', 'Equal'), ('monthly_prorata_temporis', 'Prorata temporis (by month %)')] -
expense_cutoff_journal_idMany2onereadonly=Falserelated='company_id.expense_cutoff_journal_id'string='Expense cut-off journal' -
link_productBooleanconfig_parameter='account_move_cutoff.link_product'help='Link product on deferred account.move.line.' args: 'Link product' -
revenue_cutoff_journal_idMany2onereadonly=Falserelated='company_id.revenue_cutoff_journal_id'string='Revenue cut-off journal'
No public methods.
Loading…