Account Move Template
account_move_template · OCA/account-financial-tools
-
Security25/25No findings
-
Activity25/25Human commit this month
-
Required by5/250 modules depend on it
-
Maturity25/25In 14 Odoo series since 6.1
Heuristic over the facts below, not an audit · How it's computed
Description
The user can configure journal entries templates, useful for recurring entries. The amount of each template line can be computed (through python code) or kept as user input.
If user input, when using the template, user has to fill the amount of every input lines.
The journal entry form allows lo load, through a wizard, the template to use and the amounts to fill.
Notable features:
This module enhance the capability of module account_move_template with following features,
-
Optional account for negative amount.
When the Journal entry is created, and credit/debit is negative value, change debit/credit side and use the opt_account_id
-
Allow overwrite move line values with overwrite dict.
Normally, the journal items created by the template will require user input on wizard. This feature allow passing the overwrite values with a dictionary. This is particularly useful when the wizard is called by code.
Sample of dictionary to overwrite move lines:
{'L1': {'partner_id': 1, 'amount': 100, 'name': 'some label'}, 'L2': {'partner_id': 2, 'amount': 200, 'name': 'some label 2'}, }
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 |
|---|---|---|---|---|
account_move_template_form |
account.move.template.form | account.move.template | form | New |
account_move_template_line_form |
account.move.template.line.form | account.move.template.line | form | New |
account_move_template_line_tree |
account.move.template.line.list | account.move.template.line | list | New |
account_move_template_run_form |
account.move.template.run | form | New | |
account_move_template_search |
account.move.template.search | account.move.template | search | New |
account_move_template_tree |
account.move.template.list | account.move.template | list | New |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 4
-
activeBooleandefault=True -
company_idMany2one → res.companydefault=<expr>ondelete='cascade'required=True args: 'res.company' -
journal_idMany2one → account.journalcheck_company=Truedomain="[('company_id', '=', company_id)]"required=True args: 'account.journal' -
line_idsOne2many → account.move.template.lineinverse_name='template_id'string='Lines' args: 'account.move.template.line' -
nameCharrequired=True -
refCharcopy=Falsestring='Reference'
-
compute_lines(self, sequence2amount) -
copy(self, default=None) -
eval_computed_line(self, line, sequence2amount) -
generate_journal_entry(self)Called by the button on the form view
-
account_idMany2one → account.accountcheck_company=Truedomain="[('company_ids', 'in', company_id), ('active', '=', True)]"required=True args: 'account.account' -
company_currency_idMany2onerelated='template_id.company_id.currency_id'store=Truestring='Company Currency' -
company_idMany2onerelated='template_id.company_id'store=True -
is_refundBooleandefault=Falsestring='Is a refund?' -
move_line_typeSelectionrequired=Truestring='Direction' args: [('cr', 'Credit'), ('dr', 'Debit')] -
nameCharstring='Label' -
noteChar -
opt_account_idMany2one → account.accountcheck_company=Truedomain="[('company_ids', 'in', company_id), ('active', '=', True)]"help='When amount is negative, use this account instead'string='Account if Negative' args: 'account.account' -
partner_idMany2one → res.partnerdomain=['|', ('parent_id', '=', False), ('is_company', '=', True)] args: 'res.partner' -
payment_term_idMany2one → account.payment.termcheck_company=Truehelp='Used to compute the due date of the journal item.'string='Payment Terms' args: 'account.payment.term' -
python_codeTextstring='Formula' -
sequenceIntegerrequired=True -
tax_idsMany2many → account.taxcheck_company=Truestring='Taxes' args: 'account.tax' -
tax_line_idMany2one → account.taxcheck_company=Trueondelete='restrict'string='Originator Tax' args: 'account.tax' -
tax_repartition_line_idMany2one → account.tax.repartition.linecompute='_compute_tax_repartition_line_id'store=True args: 'account.tax.repartition.line' -
template_idMany2one → account.move.templateondelete='cascade'string='Move Template' args: 'account.move.template' -
typeSelectiondefault='input'required=True args: [('input', 'User input'), ('computed', 'Computed')]
No public methods.
-
account_idMany2one → account.accountreadonly=Truerequired=True args: 'account.account' -
amountMonetarycurrency_field='company_currency_id'required=True -
company_currency_idMany2onerelated='wizard_id.company_id.currency_id'string='Company Currency' -
company_idMany2onerelated='wizard_id.company_id' -
is_refundBooleanreadonly=Truestring='Is a refund?' -
move_line_typeSelectionreadonly=Truerequired=Truestring='Direction' args: [('cr', 'Credit'), ('dr', 'Debit')] -
nameCharreadonly=True -
noteCharreadonly=True -
partner_idMany2one → res.partnerreadonly=True args: 'res.partner' -
payment_term_idMany2one → account.payment.termreadonly=Truestring='Payment Terms' args: 'account.payment.term' -
sequenceIntegerrequired=True -
tax_idsMany2many → account.taxreadonly=Truestring='Taxes' args: 'account.tax' -
tax_line_idMany2one → account.taxondelete='restrict'readonly=Truestring='Originator Tax' args: 'account.tax' -
tax_repartition_line_idMany2one → account.tax.repartition.linereadonly=True args: 'account.tax.repartition.line' -
wizard_idMany2one → account.move.template.runondelete='cascade' args: 'account.move.template.run'
No public methods.
-
company_idMany2one → res.companydefault=<expr>readonly=Truerequired=True args: 'res.company' -
dateDatedefault=fields.Date.context_todayrequired=True -
journal_idMany2one → account.journalreadonly=True args: 'account.journal' -
line_idsOne2many → account.move.template.line.runstring='Lines' args: 'account.move.template.line.run', 'wizard_id' -
overwriteTexthelp="\nValid dictionary to overwrite template lines:\n{'L1': {'partner_id': 1, 'amount': 100, 'name': 'some label'},\n 'L2': {'partner_id': 2, 'amount': 200, 'name': 'some label 2'}, }\n " -
partner_idMany2one → res.partnerdomain=['|', ('parent_id', '=', False), ('is_company', '=', True)] args: 'res.partner', 'Override Partner' -
refCharstring='Reference' -
stateSelectiondefault='select_template'readonly=True args: [('select_template', 'Select Template'), ('set_lines', 'Set Lines')] -
template_idMany2one → account.move.templatecheck_company=Truedomain="[('company_id', '=', company_id)]"required=True args: 'account.move.template'
-
generate_move(self) -
load_lines(self)
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…