account_budget
This page combines editorial guidance with evidence extracted from the selected official branch. Always test the flow with your own permissions and configuration.
Purpose
The Account Budget Module provides the ability to set budgets for accounts over a defined period of time. These budgets can then be used to track the total amount from relevant transactions against the budgeted amount.
The analysis found 5 Python files, 15 XML files, 13 views, 12 actions, 3 menus, and 0 reports.
Functional user guide
Who should use it
This module is relevant to people responsible for account budget processes, company configuration, and result review. Administrators should participate whenever dependencies, permissions, or sequences are introduced.
What you will be able to do
After configuration, you will be able to identify the records added by account_budget, execute actions in the correct state, and understand the information shared with other modules.
Requirements and preparation
Before activation, verify company, currency, users, and groups. Install and configure required dependencies first. When real data exists, rehearse activation and upgrades on a restored copy.
Activate dependencies first, review company configuration, and rehearse the complete workflow before production use.
Required dependencies
account— must be installed and configured before testing this module.company— must be installed and configured before testing this module.currency— must be installed and configured before testing this module.
Optional integrations
- —
Recommended initial configuration
- Activate the module and sign in again to load menus and permissions.
- Review new company configuration options and defaults.
- Assign groups to test users using least privilege.
- Create small, verifiable master data before bulk imports.
- Run one complete scenario from draft to final state and inspect related records.
Module objects and concepts
- account.budget: groups 8 model(s), including
account.budget,account.budget.context,account.budget.copy,account.budget.copy.start,account.budget.line. These records form the information users inspect or modify during the process.
Typical workflow
- Select the correct company and date before creating a document.
- Complete master data before lines or details.
- Use form buttons for state changes; saving is not the same as validating or posting.
- Review warnings, totals, related documents, and traceability.
- Verify effects on dependent modules before closing the process.
Actions, states, and wizards
copy_button— action or transition that starts copy button. Check permissions, current state, and related records before running it.create_periods— action or transition that starts create periods. Check permissions, current state, and related records before running it.update_lines— action or transition that starts update lines. Check permissions, current state, and related records before running it.account.budget.copy— wizard that collects data and performs account › budget › copy. Check permissions, current state, and related records before running it.account.budget.copy.start— wizard that collects data and performs account › budget › copy › start. Check permissions, current state, and related records before running it.
Controls before production
- Define who creates, reviews, confirms, cancels, and reads.
- Test closed periods, unauthorized users, and incomplete data.
- Verify numbering, currency, rounding, and time zone where applicable.
- Document error correction without direct database edits.
- Include its tables and files in backup and restore procedures.
Troubleshooting
- If a menu is missing, verify activation, module-list update, groups, and a new login session.
- If a field rejects a value, inspect its domain, company, state, and configured dependencies.
- If a button is hidden or disabled, check permissions and valid transitions; never change state with SQL.
- If results differ, reproduce a minimal case and compare related records before and after.
- Keep the full traceback, version, active modules, and minimal data needed to diagnose an error.
Developer guide
Architecture and extension points
The package contains 14 Python classes and declares or extends 8 models. It uses Boolean, Char, Function, Integer, Many2Many, Many2One, Numeric, One2Many, Selection. Developers should first determine whether a class creates a model or uses PoolMeta to extend one, preserve super() calls, and avoid duplicating dependency rules.
Registered or extended models
account.budgetaccount.budget.contextaccount.budget.copyaccount.budget.copy.startaccount.budget.lineaccount.budget.line.create_periodsaccount.budget.line.create_periods.startaccount.budget.line.period
Field types used
BooleanCharFunctionIntegerMany2ManyMany2OneNumericOne2ManySelection
Detected classes and public methods
Classes: AmountMixin, Budget, BudgetContext, BudgetLine, BudgetLineMixin, BudgetLinePeriod, BudgetMixin, BudgetValidationError, CopyBudget, CopyBudgetMixin, CopyBudgetStart, CopyBudgetStartMixin, CreatePeriods, CreatePeriodsStart
Methods: check_ratio(), copy(), copy_button(), create_period(), create_periods(), default_budget(), default_company(), default_factor(), default_fiscalyear(), default_left(), default_method(), default_right(), default_start(), distribute_evenly(), do_copy(), get_amount(), get_rec_name(), get_total_amount(), on_change_company(), on_change_with_company(), on_change_with_currency(), on_change_with_current_name(), on_change_with_fiscalyear(), on_change_with_parent_account_type(), search_current_name(), search_rec_name(), transition_create_periods(), update_lines(), validate_fields(), view_attributes()
Code map
Detected 5 Python files, 15 XML files, and 0 explicit access files. XML connects models to views, menus, actions, and reports; access CSV files establish initial permissions.
__init__.pyaccount.pyaccount.xmldoc/conf.pyexceptions.pymessage.xmlsetup.pyview/budget_context_form.xmlview/budget_copy_start_form.xmlview/budget_form.xmlview/budget_line_create_periods_start_form.xmlview/budget_line_form.xmlview/budget_line_form_amount.xmlview/budget_line_list.xmlview/budget_line_period_form.xmlview/budget_line_period_list.xmlview/budget_line_period_list_amount.xmlview/budget_line_tree.xmlview/budget_line_tree_amount.xmlview/budget_list.xml
Test plan
- Activation on an empty database and upgrade from the previous revision.
- Create, update, copy, and delete according to state and access rights.
- Every button, transition, and wizard with valid and invalid scenarios.
- Applicable multi-company rules, translations, time zones, and currencies.
- Combined installation with required and optional dependencies.
- Backup and restore of records, attachments, and generated reports.
Compatibility and upgrades
Keep server and modules on series 7.0. Before upgrading, compare tryton.cfg, __register__ migrations, state changes, XML IDs, and permissions. A successful build does not replace a rehearsed migration or functional data reconciliation.
Official documentation evidence
Topics found: Design · Budget · Wizards · Copy Budget · Create Periods · Account Budget Module · API Reference · Budgets · Copy Budgets · Usage · Setting budgets · Tracking budgets
-
- doc/design.rst: A Budget, in Tryton, is used to define a financial plan for a
Company <company:model-company.company>over a defined period of time.
- doc/design.rst: A Budget, in Tryton, is used to define a financial plan for a
-
- doc/index.rst: The Account Budget Module provides the ability to set budgets for accounts over a defined period of time. These budgets can then be used to track the total amount from relevant transactions against the budgeted amount.
-
- doc/reference.rst: This mixin_ makes it easy to create a
~trytond:trytond.model.Modelthat defines a budget.
- doc/reference.rst: This mixin_ makes it easy to create a
-
- doc/usage.rst: New
Budgets <model-account.budget>can easily be created, and existing budgets updated, by changing the budgets that are found in the [Financial --> Budgets --> Budgets] main menu entry.
- doc/usage.rst: New