TIP: You can type at any time to perform a new search.
Cost-Revenue Spread
account_spread_cost_revenue · OCA/account-financial-tools
- Repository
- OCA/account-financial-tools · module folder · Try on Runboat
- Module version
- 1.0.0
- Category
- Accounting & Finance
- Folder size
- 0.78 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/account-financial-tools
- Last tracking update
- 2026-08-07 08:42:53
- Authors
- Odoo Community Association (OCA), Onestein
- Maintainers
- Odoo Community Association (OCA), Onestein
- Committers
- Weblate, OCA-git-bot, oca-ci, Anusha
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- None
- Description
Allows to spread costs or revenues over a customizable periods, to even out cost or invoice spikes.
Code Analysis ⓘ
Views touched (8)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
view_account_spread |
account.spread | form | New | |
view_account_spread_invoice_line_link_wizard |
account.spread.invoice.line.link.wizard | form | New | |
view_account_spread_search |
account.spread | search | New | |
view_account_spread_template |
account.spread.template | form | New | |
view_account_spread_template_tree |
account.spread.template | list | New | |
view_account_spread_tree |
account.spread | list | New | |
view_company_form |
res.company | form | Inherits base.view_company_form | |
view_invoice_spread |
account.move | form | Inherits account.view_move_form |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (8)
New fields (0)
No new fields.
Public methods (2)-
action_post(self)Invoked when validating the invoices. -
button_cancel(self)Cancel the spread lines and their related moves when the invoice is canceled.
New fields (2)
-
spread_checkSelectioncompute='_compute_spread_check' args: [('linked', 'Linked'), ('unlinked', 'Unlinked'), ('unavailable', 'Unavailable')] -
spread_idMany2one → account.spreadcopy=Falsestring='Spread Board' args: 'account.spread'
-
create_auto_spread(self)Create auto spread table for each invoice line, when needed -
spread_details(self)Button on the invoice lines tree view of the invoice form to show the spread form view. -
write(self, vals)
New fields (32)
-
activeBooleandefault=True -
all_postedBooleancompute='_compute_all_posted'store=True -
company_idMany2one → res.companydefault=<expr>required=True args: 'res.company' -
credit_account_idMany2one → account.accountcompute='_compute_credit_account_id'readonly=Falserequired=Truestore=True args: 'account.account' -
currency_idMany2one → res.currencydefault=<expr>required=True args: 'res.currency' -
days_calcBooleandefault=Falsehelp='Use number of days to calculate amount'string='Calculate by days' -
debit_account_idMany2one → account.accountcompute='_compute_debit_account_id'readonly=Falserequired=Truestore=True args: 'account.account' -
display_create_all_movesBooleancompute='_compute_display_create_all_moves' -
display_move_line_auto_postBooleancompute='_compute_display_move_line_auto_post'string='Display Button Auto-post lines' -
display_recompute_buttonsBooleancompute='_compute_display_recompute_buttons' -
estimated_amountFloatdigits='Account' -
invoice_idMany2onerelated='invoice_line_id.move_id'store=True -
invoice_line_idMany2one → account.move.linecompute='_compute_invoice_line'inverse='_inverse_invoice_line'store=Truestring='Invoice line' args: 'account.move.line' -
invoice_line_idsOne2many → account.move.linecopy=Falsestring='Invoice Lines' args: 'account.move.line', 'spread_id' -
invoice_typeSelectionrequired=True args: [('out_invoice', 'Customer Invoice'), ('in_invoice', 'Vendor Bill'), ('out_refund', 'Customer Credit Note'), ('in_refund', 'Vendor Credit Note')] -
is_credit_account_deprecatedBooleancompute='_compute_deprecated_accounts' -
is_debit_account_deprecatedBooleancompute='_compute_deprecated_accounts' -
journal_idMany2one → account.journalcheck_company=Truecompute='_compute_journal_id'domain="[('id', 'in', suitable_journal_ids)]"precompute=Truereadonly=Falserequired=Truestore=True args: 'account.journal' -
line_idsOne2many → account.spread.linestring='Spread Lines' args: 'account.spread.line', 'spread_id' -
move_line_auto_postBooleandefault=True args: 'Auto-post lines' -
nameCharrequired=True -
period_numberIntegerdefault=12help='Define the number of spread lines'required=Truestring='Number of Repetitions' -
period_typeSelectiondefault='month'help='Period length for the entries'required=True args: [('month', 'Month'), ('quarter', 'Quarter'), ('year', 'Year')] -
posted_amountFloatcompute='_compute_amounts'digits='Account' -
spread_dateDatedefault=time.strftime('%Y-01-01')required=Truestring='Start Date' -
spread_typeSelectioncompute='_compute_spread_type'required=True args: [('sale', 'Customer'), ('purchase', 'Supplier')] -
suitable_journal_idsMany2many → account.journalcompute='_compute_suitable_journal_ids' args: 'account.journal' -
template_idMany2one → account.spread.templatestring='Spread Template' args: 'account.spread.template' -
total_amountFloatcompute='_compute_amounts'digits='Account' -
unposted_amountFloatcompute='_compute_amounts'digits='Account' -
unspread_amountFloatcompute='_compute_amounts'digits='Account' -
use_invoice_line_accountBoolean
-
action_recalculate_spread(self)Recalculate spread -
action_undo_spread(self)Undo spreading: Remove all created moves -
action_unlink_invoice_line(self)Unlink the invoice line from the spread board -
compute_spread_board(self)Checks whether the spread lines should be calculated. In case checks pass, invoke "def _compute_spread_board()" method. -
create_all_moves(self) -
default_get(self, fields)@api.model -
default_journal(self, company_id)@api.model -
onchange_template(self)@api.onchange('template_id') -
open_posted_view(self) -
reconcile_spread_moves(self) -
unlink(self)
New fields (13)
-
company_idMany2one → res.companyrequired=True args: 'res.company' -
exp_rev_account_idMany2one → account.accounthelp='Optional account to overwrite the existing expense/revenue account'string='Expense/revenue account' args: 'account.account' -
invoice_idMany2onerelated='invoice_line_id.move_id' -
invoice_line_idMany2one → account.move.lineondelete='cascade'required=True args: 'account.move.line' -
invoice_typeSelectioncompute='_compute_invoice_type'store=True args: [('out_invoice', 'Customer Invoice'), ('in_invoice', 'Vendor Bill'), ('out_refund', 'Customer Credit Note'), ('in_refund', 'Vendor Credit Note')] -
spread_account_idMany2one → account.accountcompute='_compute_spread_account'readonly=Falsestore=Truestring='Balance sheet account / Spread account' args: 'account.account' -
spread_action_typeSelectiondefault=<expr>selection=<expr> -
spread_idMany2one → account.spreaddomain="[('id', 'in', spread_invoice_type_domain_ids)]"string='Spread Board' args: 'account.spread' -
spread_invoice_type_domain_idsOne2many → account.spreadcompute='_compute_spread_invoice_type_domain' args: 'account.spread' -
spread_journal_idMany2one → account.journalcompute='_compute_spread_journal'readonly=Falsestore=Truestring='Spread Journal' args: 'account.journal' -
spread_typeSelectioncompute='_compute_invoice_type'store=True args: [('sale', 'Customer'), ('purchase', 'Supplier')] -
template_idMany2one → account.spread.templatestring='Spread Template' args: 'account.spread.template' -
use_invoice_line_accountBooleanhelp="Use invoice line's account as Balance sheet / spread account.\nIn this case, user need to select expense/revenue account too."
-
confirm(self)
New fields (5)
-
amountFloatdigits='Account'required=True -
dateDaterequired=True -
move_idMany2one → account.movestring='Journal Entry' args: 'account.move' -
nameCharargs: 'Description' -
spread_idMany2one → account.spreadondelete='cascade' args: 'account.spread'
-
create_and_reconcile_moves(self) -
create_move(self)Button to manually create a move from a spread line entry. -
open_move(self)Used by a button to manually view a move from a spread line entry. -
unlink_move(self)Used by a button to manually unlink a move from a spread line entry.
New fields (13)
-
auto_spreadBooleanhelp='If checked, provide option to auto create spread during invoice validation, based on product/account/analytic in invoice line.'string='Auto assign template on invoice validate' -
auto_spread_idsOne2many → account.spread.template.autocomodel_name='account.spread.template.auto'inverse_name='template_id'string='Auto Spread On' -
company_idMany2one → res.companydefault=<expr>required=True args: 'res.company' -
days_calcBooleandefault=Falsehelp='Use number of days to calculate amount'string='Calculate by days' -
exp_rev_account_idMany2one → account.accounthelp='Optional account to overwrite the existing expense/revenue account'string='Expense/Revenue Account' args: 'account.account' -
nameCharrequired=True -
period_numberIntegerhelp='Define the number of spread lines'string='Number of Repetitions' -
period_typeSelectionhelp='Period length for the entries' args: [('month', 'Month'), ('quarter', 'Quarter'), ('year', 'Year')] -
spread_account_idMany2one → account.accountcompute='_compute_spread_account'readonly=Falserequired=Falsestore=Truestring='Spread Balance Sheet Account' args: 'account.account' -
spread_journal_idMany2one → account.journalcompute='_compute_spread_journal'readonly=Falserequired=Truestore=Truestring='Journal' args: 'account.journal' -
spread_typeSelectiondefault='sale'required=True args: [('sale', 'Customer'), ('purchase', 'Supplier')] -
start_dateDate -
use_invoice_line_accountBooleanhelp="Use invoice line's account as Balance sheet / spread account.\nIn this case, user need to select expense/revenue account too."string='Invoice account as spread account'
-
default_get(self, fields)@api.model
New fields (5)
-
account_idMany2one → account.accountcomodel_name='account.account'string='Account' -
company_idMany2onerelated='template_id.company_id'store=True -
nameChardefault='/'required=True -
product_idMany2one → product.productcomodel_name='product.product'string='Product' -
template_idMany2one → account.spread.templatecomodel_name='account.spread.template'index=Trueondelete='cascade'required=Truestring='Spread Template'
No public methods.
New fields (7)
-
allow_spread_planningBooleandefault=Truehelp='Disable this option if you do not want to allow the spreading before the invoice is validated.' -
auto_archive_spreadBooleanhelp='Enable this option if you want the cron job to automatically archive the spreads when all lines are posted.' args: 'Auto-archive spread' -
default_spread_expense_account_idMany2one → account.accountstring='Expense Spread Account' args: 'account.account' -
default_spread_expense_journal_idMany2one → account.journalstring='Expense Spread Journal' args: 'account.journal' -
default_spread_revenue_account_idMany2one → account.accountstring='Revenue Spread Account' args: 'account.account' -
default_spread_revenue_journal_idMany2one → account.journalstring='Revenue Spread Journal' args: 'account.journal' -
force_move_auto_postBooleanhelp='Enable this option if you want to post automatically the accounting moves of all the spreads.' args: 'Auto-post spread lines'
No public methods.
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…