Skip to main content
Version: Tryton 8.0 (LTS)

account_invoice

Tryton 8.0 · Reference generated from the official source code

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 Invoice Module adds the concept of invoicing to Tryton. It allows the creation of customer and supplier invoices, and can handle the payment terms related to the invoices and show when they have been paid.

The analysis found 8 Python files, 54 XML files, 51 views, 46 actions, 8 menus, and 1 reports.

Functional user guide

Who should use it

This module is relevant to people responsible for account invoice 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_invoice, execute actions in the correct state, produce its reports, 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.
  • account_product — 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.
  • ir — must be installed and configured before testing this module.
  • party — must be installed and configured before testing this module.
  • product — must be installed and configured before testing this module.
  • res — must be installed and configured before testing this module.

Optional integrations

  • bank — enables an additional integration; test the combination explicitly.
  • 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.configuration: groups 3 model(s), including account.configuration, account.configuration.default_payment_term, account.configuration.payment_reference. These records form the information users inspect or modify during the process.
  • account.fiscalyear: groups 3 model(s), including account.fiscalyear, account.fiscalyear.invoice_sequence, account.fiscalyear.renew. These records form the information users inspect or modify during the process.
  • account.invoice: groups 25 model(s), including account.invoice, account.invoice.alternative_payee, account.invoice.credit, account.invoice.credit.start, account.invoice.edocument. These records form the information users inspect or modify during the process.
  • account.invoice-account: groups 1 model(s), including account.invoice-account.move.line. These records form the information users inspect or modify during the process.
  • account.invoice-additional-account: groups 1 model(s), including account.invoice-additional-account.move. These records form the information users inspect or modify during the process.
  • account.move: groups 6 model(s), including account.move, account.move.cancel, account.move.line, account.move.line.delegate, account.move.line.reschedule. These records form the information users inspect or modify during the process.
  • account.period: groups 1 model(s), including account.period. These records form the information users inspect or modify during the process.
  • company.company: groups 1 model(s), including company.company. These records form the information users inspect or modify during the process.
  • party.address: groups 1 model(s), including party.address. These records form the information users inspect or modify during the process.
  • party.contact_mechanism: groups 1 model(s), including party.contact_mechanism. These records form the information users inspect or modify during the process.
  • party.erase: groups 1 model(s), including party.erase. These records form the information users inspect or modify during the process.
  • party.party: groups 2 model(s), including party.party, party.party.payment_term. These records form the information users inspect or modify during the process.
  • party.replace: groups 1 model(s), including party.replace. These records form the information users inspect or modify during the process.

Typical workflow

  1. Select the correct company and date before creating a document.
  2. Complete master data before lines or details.
  3. Use form buttons for state changes; saving is not the same as validating or posting.
  4. Review warnings, totals, related documents, and traceability.
  5. Generate the report and compare it with the record before delivery.

Actions, states, and wizards

  • cancel — action or transition that starts cancel. Check permissions, current state, and related records before running it.
  • delegate_lines_to_pay — action or transition that starts delegate lines to pay. Check permissions, current state, and related records before running it.
  • draft — action or transition that starts draft. Check permissions, current state, and related records before running it.
  • pay — action or transition that starts pay. Check permissions, current state, and related records before running it.
  • post — action or transition that starts post. Check permissions, current state, and related records before running it.
  • process — action or transition that starts process. Check permissions, current state, and related records before running it.
  • reschedule_lines_to_pay — action or transition that starts reschedule lines to pay. Check permissions, current state, and related records before running it.
  • validate_invoice — action or transition that starts validate invoice. Check permissions, current state, and related records before running it.
  • cancelled — action or transition that starts cancelled. Check permissions, current state, and related records before running it.
  • closed — action or transition that starts closed. Check permissions, current state, and related records before running it.
  • paid — action or transition that starts paid. Check permissions, current state, and related records before running it.
  • posted — action or transition that starts posted. Check permissions, current state, and related records before running it.
  • validated — action or transition that starts validated. Check permissions, current state, and related records before running it.
  • account.invoice.credit.start — wizard that collects data and performs account › invoice › credit › start. Check permissions, current state, and related records before running it.
  • account.invoice.edocument — wizard that collects data and performs account › invoice › edocument. Check permissions, current state, and related records before running it.
  • account.invoice.lines_to_pay.delegate — wizard that collects data and performs account › invoice › lines to pay › delegate. Check permissions, current state, and related records before running it.
  • account.invoice.lines_to_pay.reschedule — wizard that collects data and performs account › invoice › lines to pay › reschedule. Check permissions, current state, and related records before running it.
  • account.invoice.pay — wizard that collects data and performs account › invoice › pay. Check permissions, current state, and related records before running it.
  • account.invoice.payment_term.test — wizard that collects data and performs account › invoice › payment term › test. Check permissions, current state, and related records before running it.
  • account.invoice.refresh_invoice_report — wizard that collects data and performs account › invoice › refresh invoice report. 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 64 Python classes and declares or extends 47 models. It uses Binary, Boolean, Char, Date, DateTime, Float, Function, Integer, Many2Many, Many2One, MultiValue, Numeric, One2Many, Reference, Selection, Text. 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.configuration
  • account.configuration.default_payment_term
  • account.configuration.payment_reference
  • account.fiscalyear
  • account.fiscalyear.invoice_sequence
  • account.fiscalyear.renew
  • account.invoice
  • account.invoice-account.move.line
  • account.invoice-additional-account.move
  • account.invoice.alternative_payee
  • account.invoice.credit
  • account.invoice.credit.start
  • account.invoice.edocument
  • account.invoice.edocument.result
  • account.invoice.edocument.start
  • account.invoice.line
  • account.invoice.line-account.tax
  • account.invoice.lines_to_pay.delegate
  • account.invoice.lines_to_pay.reschedule
  • account.invoice.pay
  • account.invoice.pay.ask
  • account.invoice.pay.start
  • account.invoice.payment.mean
  • account.invoice.payment.mean.rule
  • account.invoice.payment.method
  • account.invoice.payment_term
  • account.invoice.payment_term.line
  • account.invoice.payment_term.line.delta
  • account.invoice.payment_term.test
  • account.invoice.payment_term.test.result
  • account.invoice.refresh_invoice_report
  • account.invoice.report.revision
  • account.invoice.tax
  • account.move
  • account.move.cancel
  • account.move.line
  • account.move.line.delegate
  • account.move.line.reschedule
  • account.move.reconciliation
  • account.period
  • company.company
  • party.address
  • party.contact_mechanism
  • party.erase
  • party.party
  • party.party.payment_term
  • party.replace

Field types used

  • Binary
  • Boolean
  • Char
  • Date
  • DateTime
  • Float
  • Function
  • Integer
  • Many2Many
  • Many2One
  • MultiValue
  • Numeric
  • One2Many
  • Reference
  • Selection
  • Text

Detected classes and public methods

Classes: Address, AlternativePayee, CancelInvoiceMoveWarning, CancelMoves, Company, Configuration, ConfigurationDefaultPaymentTerm, ConfigurationPaymentReference, ContactMechanism, CreditInvoice, CreditInvoiceStart, DelegateLines, DelegateLinesToPay, Erase, FiscalYear, Invoice, InvoiceAdditionalMove, InvoiceEdocument, InvoiceEdocumentResult, InvoiceEdocumentStart, InvoiceFutureWarning, InvoiceLine, InvoiceLineTax, InvoiceLineValidationError, InvoiceNumberError, InvoicePaymentLine, InvoicePaymentTermDateWarning, InvoiceReport, InvoiceReportMixin, InvoiceReportRevision, InvoiceSequence, InvoiceSimilarWarning, InvoiceTax, InvoiceTaxValidationError, InvoiceTaxesWarning, InvoiceValidationError, Move, MoveLine, Party, PartyPaymentTerm, PayInvoice, PayInvoiceAsk, PayInvoiceError, PayInvoiceStart, PaymentMean, PaymentMeanRule, PaymentMeanRule_Bank, PaymentMean_Bank, PaymentMethod, PaymentTerm, PaymentTermComputeError, PaymentTermLine, PaymentTermLineRelativeDelta, PaymentTermValidationError, Period, Reconciliation, RefreshInvoiceReport, RenewFiscalYear, Replace, RescheduleLines, RescheduleLinesToPay, TestPaymentTerm, TestPaymentTermView, TestPaymentTermViewResult

Methods: add_payment_lines(), cancel(), chat_language(), check_erase_company(), check_modification(), check_payment_lines(), check_ratio_and_divisor(), check_remainder(), check_source(), check_supplier_payment_reference(), close(), compute(), compute_fields(), copy(), create_fiscalyear(), create_invoice_report_revision(), credit(), default_amount(), default_ask(), default_base(), default_cancel_invoice_out(), default_company(), default_currency(), default_customer_payment_reference_number(), default_customer_payment_term(), default_date(), default_days(), default_invoice_sequences(), default_invoice_state(), default_manual(), default_months(), default_purchase_taxes_expense(), default_relativedeltas(), default_result(), default_start(), default_state(), default_taxes_deductible_rate(), default_test(), default_type(), default_weeks(), delegate_lines(), delegate_lines_to_pay(), do_credit(), do_print_(), do_start(), draft(), execute(), fields_to_replace(), fiscalyear_defaults(), format_customer_payment_reference(), from_rule(), get(), get_allow_cancel(), get_amount(), get_amount_to_pay(), get_context(), get_customer_payment_reference(), get_customer_payment_references(), get_date(), get_filename(), get_has_payment_method(), get_has_report_cache(), get_instruments(), get_invoice(), get_invoice_payment(), get_invoice_states(), get_invoice_taxes(), get_invoice_types(), get_lines_to_pay(), get_move(), get_move_lines(), get_origin(), get_origin_invoices(), get_origins(), get_rec_name(), get_reconcile_lines_for_amount(), get_reconciled(), get_reconciliation_lines(), get_sequence_number(), get_tax_identifier(), get_templates(), get_type_name(), get_value(), index_set_field(), invoice_report_versioned(), invoice_sequence_fields(), is_modifiable(), multivalue_model(), on_change_account(), on_change_accounting_date(), on_change_base(), on_change_company(), on_change_divisor(), on_change_invoice(), on_change_invoice_date(), on_change_lines(), on_change_party(), on_change_product(), on_change_ratio(), on_change_tax()

Code map

Detected 8 Python files, 54 XML files, and 0 explicit access files. XML connects models to views, menus, actions, and reports; access CSV files establish initial permissions.

  • __init__.py
  • account.py
  • account.xml
  • company.py
  • company.xml
  • doc/conf.py
  • exceptions.py
  • invoice.py
  • invoice.xml
  • message.xml
  • party.py
  • party.xml
  • payment_term.py
  • payment_term.xml
  • view/address_form.xml
  • view/address_tree.xml
  • view/address_tree_sequence.xml
  • view/company_form.xml
  • view/configuration_form.xml
  • view/contact_mechanism_form.xml
  • view/contact_mechanism_tree.xml
  • view/contact_mechanism_tree_sequence.xml
  • view/credit_start_form.xml
  • view/edocument_result_form.xml
  • view/edocument_start_form.xml
  • view/fiscalyear_form.xml
  • view/invoice_form.xml
  • view/invoice_line_form.xml
  • view/invoice_line_tree.xml
  • view/invoice_line_tree_sequence.xml
  • view/invoice_payment_mean_form.xml
  • view/invoice_payment_mean_list.xml
  • view/invoice_payment_mean_rule_form.xml
  • view/invoice_payment_mean_rule_list.xml
  • view/invoice_report_revision_form.xml
  • view/invoice_report_revision_list.xml
  • view/invoice_sequence_form.xml
  • view/invoice_sequence_list.xml
  • view/invoice_sequence_list_sequence.xml
  • view/invoice_tax_form.xml
  • view/invoice_tax_tree.xml
  • view/invoice_tax_tree_sequence.xml
  • view/invoice_tree.xml
  • view/move_line_form.xml
  • view/move_line_list.xml
  • view/move_line_list_payment.xml
  • view/move_line_list_to_pay.xml
  • view/party_form.xml
  • view/pay_ask_form.xml
  • view/pay_start_form.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 8.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: Configuration · filestore · store_prefix · Design · Invoice · Wizards · Pay Invoice · Credit Invoice · Reschedule Lines to Pay · Reports · Invoice Payment Method · Fiscal Year Invoice Sequence · Payment Term · Test Payment Term · Payment Mean Rule · Account Invoice Module · Correcting invoices · Cancelling invoices · Crediting customers and suppliers · Usage · Setting a party's invoice address · Setting default accounts · Receivable and payable · Revenue and Expense · Tax · Creating payment terms · Invoicing customers · Handling supplier invoices · Paying an invoice

    • doc/configuration.rst: The Account Invoice Module uses some settings from the [account_invoice] section of the trytond:topics-configuration.
    • doc/design.rst: The Account Invoice Module adds some new concepts and extends some existing concepts.
    • doc/index.rst: The Account Invoice Module adds the concept of invoicing to Tryton. It allows the creation of customer and supplier invoices, and can handle the payment terms related to the invoices and show when they have been paid.
    • doc/usage/prepare.inc.rst: Tryton lets you mark which Addresses <party:model-party.address>, and also Contact Mechanisms <party:model-party.contact_mechanism>, should be used with Invoices <model-account.invoice>.
    • doc/usage/process.inc.rst: If your Company <company:model-company.company> has sold some things and you want to issue an invoice to the customer, then in Tryton you need to create a customer Invoice <model-account.invoice>.

View source code