Merge PR #1281 into 15.0

Signed-off-by pedrobaeza
15.0
OCA-git-bot 2025-02-20 07:17:42 +00:00
commit cfb0419b4b
40 changed files with 1309 additions and 456 deletions

View File

@ -38,6 +38,9 @@ Invoicing / Reporting / OCA accounting reports.
- VAT Report
- Journal Ledger
It is possible to select the columns to show and limit the size of some of them from the
columns page.
Currently General ledger, Trial Balance and Open Items are fully compatible with a foreign
currency set up in account in order to display balances. Moreover, any foreign
currency used in account move lines is properly shown.
@ -94,10 +97,18 @@ Known issues / Roadmap
* It would be nice to have in reports a column indicating the
state of the entries when the option "All Entries" is selected
in "Target Moves" field in a wizard
* Adapt reports so that the order of the columns displayed is dynamic
* Remove duplicated options to show columns (it has not been made in a stable version so
as not to generate confusion in users)
Changelog
=========
15.0.3.2.3 (2025-02-17)
~~~~~~~~~~~~~~~~~~~~~~~
* Added the option to select columns to display and the ability to limit the width of the text
11.0.2.5.0 (2019-04-26)
~~~~~~~~~~~~~~~~~~~~~~~
@ -138,6 +149,7 @@ Authors
* initOS GmbH
* redCOR AG
* ForgeFlow
* Tecnativa
Contributors
~~~~~~~~~~~~
@ -169,6 +181,7 @@ Contributors
* Alexandre D. Díaz
* Víctor Martínez
* Carolina Fernandez
* Carlos Dauden
* `Sygel <https://www.sygel.es>`__:

View File

@ -3,6 +3,7 @@
# Copyright 2016 Camptocamp SA
# Copyright 2020 ForgeFlow S.L. (https://www.forgeflow.com)
# Copyright 2021 Tecnativa - João Marques
# Copyright 2025 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Account Financial Reports",
@ -13,10 +14,12 @@
"initOS GmbH,"
"redCOR AG,"
"ForgeFlow,"
"Tecnativa,"
"Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-financial-reporting",
"depends": ["account", "date_range", "report_xlsx"],
"data": [
"data/report_column_data.xml",
"security/ir.model.access.csv",
"security/security.xml",
"wizard/aged_partner_balance_wizard_view.xml",
@ -36,6 +39,7 @@
"report/templates/trial_balance.xml",
"report/templates/vat_report.xml",
"view/account_view.xml",
"view/account_financial_report_column_view.xml",
"view/report_general_ledger.xml",
"view/report_journal_ledger.xml",
"view/report_trial_balance.xml",

View File

@ -0,0 +1,358 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<!-- GENERAL LEDGER columns -->
<record
id="general_ledger_report_wizard_column_date"
model="account.financial.report.column"
>
<field name="res_model">general.ledger.report.wizard</field>
<field name="sequence">10</field>
<field name="name">Date</field>
<field name="expression_label">date</field>
<field name="is_visible" eval="True" />
</record>
<record
id="general_ledger_report_wizard_column_entry"
model="account.financial.report.column"
>
<field name="res_model">general.ledger.report.wizard</field>
<field name="sequence">20</field>
<field name="name">Entry</field>
<field name="expression_label">entry</field>
<field name="is_visible" eval="True" />
</record>
<record
id="general_ledger_report_wizard_column_journal"
model="account.financial.report.column"
>
<field name="res_model">general.ledger.report.wizard</field>
<field name="sequence">30</field>
<field name="name">Journal</field>
<field name="expression_label">journal</field>
<field name="is_visible" eval="True" />
</record>
<record
id="general_ledger_report_wizard_column_account_code"
model="account.financial.report.column"
>
<field name="res_model">general.ledger.report.wizard</field>
<field name="sequence">40</field>
<field name="name">Account code</field>
<field name="expression_label">account_code</field>
<field name="is_visible" eval="True" />
</record>
<record
id="general_ledger_report_wizard_column_taxes"
model="account.financial.report.column"
>
<field name="res_model">general.ledger.report.wizard</field>
<field name="sequence">50</field>
<field name="name">Taxes</field>
<field name="expression_label">taxes</field>
<field name="is_visible" eval="True" />
</record>
<record
id="general_ledger_report_wizard_column_partner"
model="account.financial.report.column"
>
<field name="res_model">general.ledger.report.wizard</field>
<field name="sequence">60</field>
<field name="name">Partner</field>
<field name="expression_label">partner</field>
<field name="is_visible" eval="True" />
</record>
<record
id="general_ledger_report_wizard_column_ref_label"
model="account.financial.report.column"
>
<field name="res_model">general.ledger.report.wizard</field>
<field name="sequence">70</field>
<field name="name">Ref - Label</field>
<field name="expression_label">ref_label</field>
<field name="is_visible" eval="True" />
<field name="field_type">string</field>
<field name="limit">40</field>
</record>
<record
id="general_ledger_report_wizard_column_cost_center"
model="account.financial.report.column"
>
<field name="res_model">general.ledger.report.wizard</field>
<field name="sequence">80</field>
<field name="name">Analytic account</field>
<field name="expression_label">cost_center</field>
<field name="is_visible" eval="True" />
</record>
<record
id="general_ledger_report_wizard_column_analytic_tags"
model="account.financial.report.column"
>
<field name="res_model">general.ledger.report.wizard</field>
<field name="sequence">90</field>
<field name="name">Analytic tags</field>
<field name="expression_label">analytic_tags</field>
<field name="is_visible" eval="True" />
</record>
<record
id="general_ledger_report_wizard_column_matching_number"
model="account.financial.report.column"
>
<field name="res_model">general.ledger.report.wizard</field>
<field name="sequence">100</field>
<field name="name">Matching number</field>
<field name="expression_label">matching_number</field>
<field name="is_visible" eval="True" />
</record>
<record
id="general_ledger_report_wizard_column_debit"
model="account.financial.report.column"
>
<field name="res_model">general.ledger.report.wizard</field>
<field name="sequence">110</field>
<field name="name">Debit</field>
<field name="expression_label">debit</field>
<field name="is_visible" eval="True" />
</record>
<record
id="general_ledger_report_wizard_column_credit"
model="account.financial.report.column"
>
<field name="res_model">general.ledger.report.wizard</field>
<field name="sequence">120</field>
<field name="name">Credit</field>
<field name="expression_label">credit</field>
<field name="is_visible" eval="True" />
</record>
<record
id="general_ledger_report_wizard_column_balance"
model="account.financial.report.column"
>
<field name="res_model">general.ledger.report.wizard</field>
<field name="sequence">130</field>
<field name="name">Balance</field>
<field name="expression_label">balance</field>
<field name="is_visible" eval="True" />
</record>
<record
id="general_ledger_report_wizard_column_foreign_currency"
model="account.financial.report.column"
>
<field name="res_model">general.ledger.report.wizard</field>
<field name="sequence">140</field>
<field name="name">Foreign currency</field>
<field name="expression_label">foreign_currency</field>
<field name="is_visible" eval="True" />
</record>
<!-- OPEN ITEMS columns -->
<record
id="open_items_report_wizard_column_date"
model="account.financial.report.column"
>
<field name="res_model">open.items.report.wizard</field>
<field name="sequence">10</field>
<field name="name">Date</field>
<field name="expression_label">date</field>
<field name="is_visible" eval="True" />
</record>
<record
id="open_items_report_wizard_column_entry"
model="account.financial.report.column"
>
<field name="res_model">open.items.report.wizard</field>
<field name="sequence">20</field>
<field name="name">Entry</field>
<field name="expression_label">entry</field>
<field name="is_visible" eval="True" />
</record>
<record
id="open_items_report_wizard_column_journal"
model="account.financial.report.column"
>
<field name="res_model">open.items.report.wizard</field>
<field name="sequence">30</field>
<field name="name">Journal</field>
<field name="expression_label">journal</field>
<field name="is_visible" eval="True" />
</record>
<record
id="open_items_report_wizard_column_account_code"
model="account.financial.report.column"
>
<field name="res_model">open.items.report.wizard</field>
<field name="sequence">40</field>
<field name="name">Account code</field>
<field name="expression_label">account_code</field>
<field name="is_visible" eval="True" />
</record>
<record
id="open_items_report_wizard_column_partner"
model="account.financial.report.column"
>
<field name="res_model">open.items.report.wizard</field>
<field name="sequence">50</field>
<field name="name">Partner</field>
<field name="expression_label">partner</field>
<field name="is_visible" eval="True" />
</record>
<record
id="open_items_report_wizard_column_ref_label"
model="account.financial.report.column"
>
<field name="res_model">open.items.report.wizard</field>
<field name="sequence">60</field>
<field name="name">Ref - Label</field>
<field name="expression_label">ref_label</field>
<field name="is_visible" eval="True" />
<field name="field_type">string</field>
<field name="limit">40</field>
</record>
<record
id="open_items_report_wizard_column_date_due"
model="account.financial.report.column"
>
<field name="res_model">open.items.report.wizard</field>
<field name="sequence">70</field>
<field name="name">Date due</field>
<field name="expression_label">date_due</field>
<field name="is_visible" eval="True" />
</record>
<record
id="open_items_report_wizard_column_original"
model="account.financial.report.column"
>
<field name="res_model">open.items.report.wizard</field>
<field name="sequence">80</field>
<field name="name">Original</field>
<field name="expression_label">original</field>
<field name="is_visible" eval="True" />
</record>
<record
id="open_items_report_wizard_column_residual"
model="account.financial.report.column"
>
<field name="res_model">open.items.report.wizard</field>
<field name="sequence">90</field>
<field name="name">Residual</field>
<field name="expression_label">residual</field>
<field name="is_visible" eval="True" />
</record>
<record
id="open_items_report_wizard_column_foreign_currency"
model="account.financial.report.column"
>
<field name="res_model">open.items.report.wizard</field>
<field name="sequence">100</field>
<field name="name">Foreign currency</field>
<field name="expression_label">foreign_currency</field>
<field name="is_visible" eval="True" />
</record>
<!-- JOURNAL LEDGER columns -->
<record
id="journal_ledger_report_wizard_column_sequence"
model="account.financial.report.column"
>
<field name="res_model">journal.ledger.report.wizard</field>
<field name="sequence">5</field>
<field name="name">Sequence</field>
<field name="expression_label">sequence</field>
<field name="is_visible" eval="True" />
</record>
<record
id="journal_ledger_report_wizard_column_entry"
model="account.financial.report.column"
>
<field name="res_model">journal.ledger.report.wizard</field>
<field name="sequence">10</field>
<field name="name">Entry</field>
<field name="expression_label">entry</field>
<field name="is_visible" eval="True" />
</record>
<record
id="journal_ledger_report_wizard_column_date"
model="account.financial.report.column"
>
<field name="res_model">journal.ledger.report.wizard</field>
<field name="sequence">20</field>
<field name="name">Date</field>
<field name="expression_label">date</field>
<field name="is_visible" eval="True" />
</record>
<record
id="journal_ledger_report_wizard_column_account_code"
model="account.financial.report.column"
>
<field name="res_model">journal.ledger.report.wizard</field>
<field name="sequence">30</field>
<field name="name">Account code</field>
<field name="expression_label">account_code</field>
<field name="is_visible" eval="True" />
</record>
<record
id="journal_ledger_report_wizard_column_account_name"
model="account.financial.report.column"
>
<field name="res_model">journal.ledger.report.wizard</field>
<field name="sequence">40</field>
<field name="name">Account name</field>
<field name="expression_label">account_name</field>
<field name="is_visible" eval="True" />
<field name="field_type">string</field>
<field name="limit">20</field>
</record>
<record
id="journal_ledger_report_wizard_column_partner"
model="account.financial.report.column"
>
<field name="res_model">journal.ledger.report.wizard</field>
<field name="sequence">50</field>
<field name="name">Partner</field>
<field name="expression_label">partner</field>
<field name="is_visible" eval="True" />
</record>
<record
id="journal_ledger_report_wizard_column_ref_label"
model="account.financial.report.column"
>
<field name="res_model">journal.ledger.report.wizard</field>
<field name="sequence">60</field>
<field name="name">Label</field>
<field name="expression_label">label</field>
<field name="is_visible" eval="True" />
<field name="field_type">string</field>
<field name="limit">40</field>
</record>
<record
id="journal_ledger_report_wizard_column_debit"
model="account.financial.report.column"
>
<field name="res_model">journal.ledger.report.wizard</field>
<field name="sequence">70</field>
<field name="name">Debit</field>
<field name="expression_label">debit</field>
<field name="is_visible" eval="True" />
</record>
<record
id="journal_ledger_report_wizard_column_credit"
model="account.financial.report.column"
>
<field name="res_model">journal.ledger.report.wizard</field>
<field name="sequence">80</field>
<field name="name">Credit</field>
<field name="expression_label">credit</field>
<field name="is_visible" eval="True" />
</record>
<record
id="journal_ledger_report_wizard_column_foreign_currency"
model="account.financial.report.column"
>
<field name="res_model">journal.ledger.report.wizard</field>
<field name="sequence">100</field>
<field name="name">Foreign currency</field>
<field name="expression_label">foreign_currency</field>
<field name="is_visible" eval="True" />
</record>
</odoo>

View File

@ -6,6 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-02-11 10:45+0000\n"
"PO-Revision-Date: 2025-02-11 10:45+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -141,6 +143,18 @@ msgstr ""
msgid "Account balance at 0 filter"
msgstr ""
#. module: account_financial_report
#: model:account.financial.report.column,name:account_financial_report.general_ledger_report_wizard_column_account_code
#: model:account.financial.report.column,name:account_financial_report.journal_ledger_report_wizard_column_account_code
#: model:account.financial.report.column,name:account_financial_report.open_items_report_wizard_column_account_code
msgid "Account code"
msgstr ""
#. module: account_financial_report
#: model:account.financial.report.column,name:account_financial_report.journal_ledger_report_wizard_column_account_name
msgid "Account name"
msgstr ""
#. module: account_financial_report
#: model:ir.model.fields,field_description:account_financial_report.field_account_group__account_ids
msgid "Accounts"
@ -339,6 +353,17 @@ msgid "Analytic Account"
msgstr ""
#. module: account_financial_report
#: model:account.financial.report.column,name:account_financial_report.general_ledger_report_wizard_column_cost_center
msgid "Analytic account"
msgstr ""
#. module: account_financial_report
#: model:account.financial.report.column,name:account_financial_report.general_ledger_report_wizard_column_analytic_tags
msgid "Analytic tags"
msgstr ""
#. module: account_financial_report
#: model:account.financial.report.column,name:account_financial_report.general_ledger_report_wizard_column_balance
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_journal_all_taxes
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_journal_ledger_journal_taxes
msgid "Balance"
@ -416,6 +441,24 @@ msgstr ""
msgid "Code"
msgstr ""
#. module: account_financial_report
#: model:ir.model.fields,field_description:account_financial_report.field_account_financial_report_abstract_wizard__column_ids
#: model:ir.model.fields,field_description:account_financial_report.field_aged_partner_balance_report_wizard__column_ids
#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__column_ids
#: model:ir.model.fields,field_description:account_financial_report.field_journal_ledger_report_wizard__column_ids
#: model:ir.model.fields,field_description:account_financial_report.field_open_items_report_wizard__column_ids
#: model:ir.model.fields,field_description:account_financial_report.field_trial_balance_report_wizard__column_ids
#: model:ir.model.fields,field_description:account_financial_report.field_vat_report_wizard__column_ids
msgid "Column"
msgstr ""
#. module: account_financial_report
#: model_terms:ir.ui.view,arch_db:account_financial_report.general_ledger_wizard
#: model_terms:ir.ui.view,arch_db:account_financial_report.journal_ledger_wizard
#: model_terms:ir.ui.view,arch_db:account_financial_report.open_items_wizard
msgid "Columns"
msgstr ""
#. module: account_financial_report
#: code:addons/account_financial_report/report/journal_ledger_xlsx.py:0
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration__company_id
@ -435,11 +478,6 @@ msgstr ""
msgid "Compute accounts"
msgstr ""
#. module: account_financial_report
#: model:ir.model,name:account_financial_report.model_res_config_settings
msgid "Config Settings"
msgstr ""
#. module: account_financial_report
#: model_terms:ir.ui.view,arch_db:account_financial_report.res_config_settings_view_form
msgid "Configurations"
@ -448,6 +486,7 @@ msgstr ""
#. module: account_financial_report
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration__create_uid
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration_line__create_uid
#: model:ir.model.fields,field_description:account_financial_report.field_account_financial_report_column__create_uid
#: model:ir.model.fields,field_description:account_financial_report.field_aged_partner_balance_report_wizard__create_uid
#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__create_uid
#: model:ir.model.fields,field_description:account_financial_report.field_journal_ledger_report_wizard__create_uid
@ -460,6 +499,7 @@ msgstr ""
#. module: account_financial_report
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration__create_date
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration_line__create_date
#: model:ir.model.fields,field_description:account_financial_report.field_account_financial_report_column__create_date
#: model:ir.model.fields,field_description:account_financial_report.field_aged_partner_balance_report_wizard__create_date
#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__create_date
#: model:ir.model.fields,field_description:account_financial_report.field_journal_ledger_report_wizard__create_date
@ -474,6 +514,8 @@ msgstr ""
#: code:addons/account_financial_report/report/journal_ledger_xlsx.py:0
#: code:addons/account_financial_report/report/trial_balance_xlsx.py:0
#: code:addons/account_financial_report/report/trial_balance_xlsx.py:0
#: model:account.financial.report.column,name:account_financial_report.general_ledger_report_wizard_column_credit
#: model:account.financial.report.column,name:account_financial_report.journal_ledger_report_wizard_column_credit
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_general_ledger_lines
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_journal_all_taxes
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_journal_ledger_journal_table_header
@ -539,6 +581,9 @@ msgstr ""
#: code:addons/account_financial_report/report/journal_ledger_xlsx.py:0
#: code:addons/account_financial_report/report/open_items_xlsx.py:0
#: code:addons/account_financial_report/wizard/journal_ledger_wizard.py:0
#: model:account.financial.report.column,name:account_financial_report.general_ledger_report_wizard_column_date
#: model:account.financial.report.column,name:account_financial_report.journal_ledger_report_wizard_column_date
#: model:account.financial.report.column,name:account_financial_report.open_items_report_wizard_column_date
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_aged_partner_balance_move_lines
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_general_ledger_lines
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_journal_ledger_journal_table_header
@ -578,6 +623,11 @@ msgstr ""
msgid "Date at filter"
msgstr ""
#. module: account_financial_report
#: model:account.financial.report.column,name:account_financial_report.open_items_report_wizard_column_date_due
msgid "Date due"
msgstr ""
#. module: account_financial_report
#: code:addons/account_financial_report/report/vat_report_xlsx.py:0
#, python-format
@ -613,6 +663,8 @@ msgstr ""
#: code:addons/account_financial_report/report/journal_ledger_xlsx.py:0
#: code:addons/account_financial_report/report/trial_balance_xlsx.py:0
#: code:addons/account_financial_report/report/trial_balance_xlsx.py:0
#: model:account.financial.report.column,name:account_financial_report.general_ledger_report_wizard_column_debit
#: model:account.financial.report.column,name:account_financial_report.journal_ledger_report_wizard_column_debit
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_general_ledger_lines
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_journal_all_taxes
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_journal_ledger_journal_table_header
@ -638,6 +690,7 @@ msgstr ""
#. module: account_financial_report
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration__display_name
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration_line__display_name
#: model:ir.model.fields,field_description:account_financial_report.field_account_financial_report_column__display_name
#: model:ir.model.fields,field_description:account_financial_report.field_aged_partner_balance_report_wizard__display_name
#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__display_name
#: model:ir.model.fields,field_description:account_financial_report.field_journal_ledger_report_wizard__display_name
@ -740,6 +793,9 @@ msgstr ""
#: code:addons/account_financial_report/report/general_ledger_xlsx.py:0
#: code:addons/account_financial_report/report/journal_ledger_xlsx.py:0
#: code:addons/account_financial_report/report/open_items_xlsx.py:0
#: model:account.financial.report.column,name:account_financial_report.general_ledger_report_wizard_column_entry
#: model:account.financial.report.column,name:account_financial_report.journal_ledger_report_wizard_column_entry
#: model:account.financial.report.column,name:account_financial_report.open_items_report_wizard_column_entry
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_aged_partner_balance_move_lines
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_general_ledger_lines
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_journal_ledger_journal_table_header
@ -782,6 +838,16 @@ msgstr ""
msgid "Export XLSX"
msgstr ""
#. module: account_financial_report
#: model:ir.model.fields,field_description:account_financial_report.field_account_financial_report_column__expression_label
msgid "Expression Label"
msgstr ""
#. module: account_financial_report
#: model:ir.model.fields,field_description:account_financial_report.field_account_financial_report_column__field_type
msgid "Field Type"
msgstr ""
#. module: account_financial_report
#: model:ir.model.fields,field_description:account_financial_report.field_aged_partner_balance_report_wizard__account_ids
#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__account_ids
@ -823,11 +889,24 @@ msgstr ""
msgid "Filter partners"
msgstr ""
#. module: account_financial_report
#: model_terms:ir.ui.view,arch_db:account_financial_report.journal_ledger_wizard
#: model_terms:ir.ui.view,arch_db:account_financial_report.open_items_wizard
msgid "Filters"
msgstr ""
#. module: account_financial_report
#: model:ir.model.fields,field_description:account_financial_report.field_journal_ledger_report_wizard__foreign_currency
msgid "Foreign Currency"
msgstr ""
#. module: account_financial_report
#: model:account.financial.report.column,name:account_financial_report.general_ledger_report_wizard_column_foreign_currency
#: model:account.financial.report.column,name:account_financial_report.journal_ledger_report_wizard_column_foreign_currency
#: model:account.financial.report.column,name:account_financial_report.open_items_report_wizard_column_foreign_currency
msgid "Foreign currency"
msgstr ""
#. module: account_financial_report
#: model_terms:ir.ui.view,arch_db:account_financial_report.aged_partner_balance_wizard
#: model_terms:ir.ui.view,arch_db:account_financial_report.general_ledger_wizard
@ -957,6 +1036,7 @@ msgstr ""
#. module: account_financial_report
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration__id
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration_line__id
#: model:ir.model.fields,field_description:account_financial_report.field_account_financial_report_column__id
#: model:ir.model.fields,field_description:account_financial_report.field_aged_partner_balance_report_wizard__id
#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__id
#: model:ir.model.fields,field_description:account_financial_report.field_journal_ledger_report_wizard__id
@ -1020,6 +1100,8 @@ msgstr ""
#: code:addons/account_financial_report/report/general_ledger_xlsx.py:0
#: code:addons/account_financial_report/report/open_items_xlsx.py:0
#: code:addons/account_financial_report/wizard/journal_ledger_wizard.py:0
#: model:account.financial.report.column,name:account_financial_report.general_ledger_report_wizard_column_journal
#: model:account.financial.report.column,name:account_financial_report.open_items_report_wizard_column_journal
#: model:ir.model.fields,field_description:account_financial_report.field_trial_balance_report_wizard__journal_ids
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_aged_partner_balance_move_lines
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_general_ledger_lines
@ -1080,9 +1162,15 @@ msgstr ""
msgid "Journals"
msgstr ""
#. module: account_financial_report
#: model:account.financial.report.column,name:account_financial_report.journal_ledger_report_wizard_column_ref_label
msgid "Label"
msgstr ""
#. module: account_financial_report
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration____last_update
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration_line____last_update
#: model:ir.model.fields,field_description:account_financial_report.field_account_financial_report_column____last_update
#: model:ir.model.fields,field_description:account_financial_report.field_aged_partner_balance_report_wizard____last_update
#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard____last_update
#: model:ir.model.fields,field_description:account_financial_report.field_journal_ledger_report_wizard____last_update
@ -1095,6 +1183,7 @@ msgstr ""
#. module: account_financial_report
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration__write_uid
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration_line__write_uid
#: model:ir.model.fields,field_description:account_financial_report.field_account_financial_report_column__write_uid
#: model:ir.model.fields,field_description:account_financial_report.field_aged_partner_balance_report_wizard__write_uid
#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__write_uid
#: model:ir.model.fields,field_description:account_financial_report.field_journal_ledger_report_wizard__write_uid
@ -1107,6 +1196,7 @@ msgstr ""
#. module: account_financial_report
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration__write_date
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration_line__write_date
#: model:ir.model.fields,field_description:account_financial_report.field_account_financial_report_column__write_date
#: model:ir.model.fields,field_description:account_financial_report.field_aged_partner_balance_report_wizard__write_date
#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__write_date
#: model:ir.model.fields,field_description:account_financial_report.field_journal_ledger_report_wizard__write_date
@ -1128,6 +1218,11 @@ msgstr ""
msgid "Level %s"
msgstr ""
#. module: account_financial_report
#: model:ir.model.fields,field_description:account_financial_report.field_account_financial_report_column__limit
msgid "Limit"
msgstr ""
#. module: account_financial_report
#: code:addons/account_financial_report/report/trial_balance_xlsx.py:0
#: model:ir.model.fields,field_description:account_financial_report.field_trial_balance_report_wizard__limit_hierarchy_level
@ -1141,6 +1236,16 @@ msgstr ""
msgid "Line"
msgstr ""
#. module: account_financial_report
#: model:ir.model,name:account_financial_report.model_account_financial_report_column
msgid "Manage column options in financial reports"
msgstr ""
#. module: account_financial_report
#: model:account.financial.report.column,name:account_financial_report.general_ledger_report_wizard_column_matching_number
msgid "Matching number"
msgstr ""
#. module: account_financial_report
#: code:addons/account_financial_report/report/general_ledger.py:0
#: code:addons/account_financial_report/report/general_ledger.py:0
@ -1190,6 +1295,7 @@ msgstr ""
#: code:addons/account_financial_report/report/vat_report_xlsx.py:0
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration__name
#: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration_line__name
#: model:ir.model.fields,field_description:account_financial_report.field_account_financial_report_column__name
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_journal_all_taxes
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_journal_ledger_journal_taxes
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_vat_report_base
@ -1333,6 +1439,7 @@ msgstr ""
#. module: account_financial_report
#: code:addons/account_financial_report/report/open_items_xlsx.py:0
#: model:account.financial.report.column,name:account_financial_report.open_items_report_wizard_column_original
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_open_items_lines_header
#, python-format
msgid "Original"
@ -1345,6 +1452,9 @@ msgstr ""
#: code:addons/account_financial_report/report/journal_ledger_xlsx.py:0
#: code:addons/account_financial_report/report/open_items_xlsx.py:0
#: code:addons/account_financial_report/report/trial_balance_xlsx.py:0
#: model:account.financial.report.column,name:account_financial_report.general_ledger_report_wizard_column_partner
#: model:account.financial.report.column,name:account_financial_report.journal_ledger_report_wizard_column_partner
#: model:account.financial.report.column,name:account_financial_report.open_items_report_wizard_column_partner
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_aged_partner_balance_lines_header
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_aged_partner_balance_move_lines
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_general_ledger_lines
@ -1439,6 +1549,11 @@ msgstr ""
msgid "Print"
msgstr ""
#. module: account_financial_report
#: model:ir.model,name:account_financial_report.model_res_config_settings
msgid "Procurement purchase grouping settings"
msgstr ""
#. module: account_financial_report
#: code:addons/account_financial_report/report/general_ledger_xlsx.py:0
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_general_ledger_lines
@ -1474,6 +1589,8 @@ msgstr ""
#: code:addons/account_financial_report/report/general_ledger_xlsx.py:0
#: code:addons/account_financial_report/report/journal_ledger_xlsx.py:0
#: code:addons/account_financial_report/report/open_items_xlsx.py:0
#: model:account.financial.report.column,name:account_financial_report.general_ledger_report_wizard_column_ref_label
#: model:account.financial.report.column,name:account_financial_report.open_items_report_wizard_column_ref_label
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_journal_ledger_journal_table_header
#, python-format
msgid "Ref - Label"
@ -1484,10 +1601,16 @@ msgstr ""
msgid "Report Action"
msgstr ""
#. module: account_financial_report
#: model:ir.model.fields,field_description:account_financial_report.field_account_financial_report_column__res_model
msgid "Res Model"
msgstr ""
#. module: account_financial_report
#: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0
#: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0
#: code:addons/account_financial_report/report/open_items_xlsx.py:0
#: model:account.financial.report.column,name:account_financial_report.open_items_report_wizard_column_residual
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_aged_partner_balance_lines_header
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_aged_partner_balance_move_lines
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_open_items_lines_header
@ -1497,6 +1620,8 @@ msgstr ""
#. module: account_financial_report
#: code:addons/account_financial_report/report/journal_ledger_xlsx.py:0
#: model:account.financial.report.column,name:account_financial_report.journal_ledger_report_wizard_column_sequence
#: model:ir.model.fields,field_description:account_financial_report.field_account_financial_report_column__sequence
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_journal_ledger_journal_table_header
#, python-format
msgid "Sequence"
@ -1506,6 +1631,7 @@ msgstr ""
#: code:addons/account_financial_report/report/general_ledger_xlsx.py:0
#: code:addons/account_financial_report/report/open_items_xlsx.py:0
#: code:addons/account_financial_report/report/trial_balance_xlsx.py:0
#: model:ir.model.fields,field_description:account_financial_report.field_account_financial_report_column__is_visible
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_general_ledger_filters
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_open_items_filters
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_trial_balance_filters
@ -1687,6 +1813,7 @@ msgstr ""
#. module: account_financial_report
#: code:addons/account_financial_report/report/general_ledger_xlsx.py:0
#: code:addons/account_financial_report/report/journal_ledger_xlsx.py:0
#: model:account.financial.report.column,name:account_financial_report.general_ledger_report_wizard_column_taxes
#: model:ir.model.fields.selection,name:account_financial_report.selection__general_ledger_report_wizard__grouped_by__taxes
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_general_ledger_lines
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_journal_ledger_journal_table_header

View File

@ -1,4 +1,5 @@
from . import account_age_report_configuration
from . import account_financial_report_column
from . import account_group
from . import account
from . import account_move_line

View File

@ -0,0 +1,17 @@
# Copyright 2025 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class AccountFinancialReportColumn(models.Model):
_name = "account.financial.report.column"
_description = "Manage column options in financial reports"
_order = "sequence, id"
res_model = fields.Char()
sequence = fields.Integer()
name = fields.Char(required=True, translate=True)
expression_label = fields.Char(required=True)
is_visible = fields.Boolean(string="Show", default=True)
field_type = fields.Char()
limit = fields.Integer()

View File

@ -25,6 +25,7 @@
* Alexandre D. Díaz
* Víctor Martínez
* Carolina Fernandez
* Carlos Dauden
* `Sygel <https://www.sygel.es>`__:

View File

@ -8,6 +8,9 @@ Invoicing / Reporting / OCA accounting reports.
- VAT Report
- Journal Ledger
It is possible to select the columns to show and limit the size of some of them from the
columns page.
Currently General ledger, Trial Balance and Open Items are fully compatible with a foreign
currency set up in account in order to display balances. Moreover, any foreign
currency used in account move lines is properly shown.

View File

@ -1,3 +1,8 @@
15.0.3.2.3 (2025-02-17)
~~~~~~~~~~~~~~~~~~~~~~~
* Added the option to select columns to display and the ability to limit the width of the text
11.0.2.5.0 (2019-04-26)
~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -5,3 +5,6 @@
* It would be nice to have in reports a column indicating the
state of the entries when the option "All Entries" is selected
in "Target Moves" field in a wizard
* Adapt reports so that the order of the columns displayed is dynamic
* Remove duplicated options to show columns (it has not been made in a stable version so
as not to generate confusion in users)

View File

@ -1,4 +1,5 @@
# Copyright 2020 ForgeFlow S.L. (https://www.forgeflow.com)
# Copyright 2025 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, models
@ -160,3 +161,17 @@ class AgedPartnerBalanceReport(models.AbstractModel):
"debit",
"amount_currency",
]
def _get_report_values(self, docids, data):
wizard = self.env[data["wizard_name"]].browse(data["wizard_id"])
res = {f"{c.expression_label}_visible": c.is_visible for c in wizard.column_ids}
res.update(
{
f"{c.expression_label}_limit": c.limit
for c in wizard.column_ids
if c.field_type == "string"
}
)
# Pass function to be called in report
res["limit_text"] = wizard._limit_text
return res

View File

@ -437,6 +437,7 @@ class AgedPartnerBalanceReport(models.AbstractModel):
return aged_partner_data
def _get_report_values(self, docids, data):
res = super()._get_report_values(docids, data)
wizard_id = data["wizard_id"]
company = self.env["res.company"].browse(data["company_id"])
company_id = data["company_id"]
@ -478,7 +479,8 @@ class AgedPartnerBalanceReport(models.AbstractModel):
aged_partner_data = self.with_context(
age_partner_config=aged_partner_configuration
)._calculate_percent(aged_partner_data)
return {
res.update(
{
"doc_ids": [wizard_id],
"doc_model": "open.items.report.wizard",
"docs": self.env["open.items.report.wizard"].browse(wizard_id),
@ -490,6 +492,8 @@ class AgedPartnerBalanceReport(models.AbstractModel):
"show_move_lines_details": show_move_line_details,
"age_partner_config": aged_partner_configuration,
}
)
return res
def _get_ml_fields(self):
return self.COMMON_ML_FIELDS + [

View File

@ -776,6 +776,7 @@ class GeneralLedgerReport(models.AbstractModel):
# flake8: noqa: C901
def _get_report_values(self, docids, data):
res = super()._get_report_values(docids, data)
wizard_id = data["wizard_id"]
wizard = self.env["general.ledger.report.wizard"].browse(wizard_id)
company = wizard.company_id
@ -909,7 +910,8 @@ class GeneralLedgerReport(models.AbstractModel):
if not gl_item["currency_id"] and len(fin_bal_currency_ids) == 1:
fin_bal_currency_id = fin_bal_currency_ids[0]
gl_item["fin_bal_currency_id"] = fin_bal_currency_id
return {
res.update(
{
"doc_ids": [wizard_id],
"doc_model": "general.ledger.report.wizard",
"docs": wizard,
@ -933,6 +935,8 @@ class GeneralLedgerReport(models.AbstractModel):
"filter_partner_ids": True if partner_ids else False,
"currency_model": self.env["res.currency"],
}
)
return res
def _get_ml_fields(self):
return self.COMMON_ML_FIELDS + [

View File

@ -8,6 +8,7 @@ from odoo import models
class JournalLedgerReport(models.AbstractModel):
_inherit = "report.account_financial_report.abstract_report"
_name = "report.account_financial_report.journal_ledger"
_description = "Journal Ledger Report"
@ -296,6 +297,7 @@ class JournalLedgerReport(models.AbstractModel):
return journals_taxes_data_2
def _get_report_values(self, docids, data):
res = super()._get_report_values(docids, data)
wizard_id = data["wizard_id"]
wizard = self.env["journal.ledger.report.wizard"].browse(wizard_id)
company = self.env["res.company"].browse(data["company_id"])
@ -349,7 +351,8 @@ class JournalLedgerReport(models.AbstractModel):
if journal_id in journal_totals.keys():
for item in ["debit", "credit"]:
journal_ledger_data[item] += journal_totals[journal_id][item]
return {
res.update(
{
"doc_ids": [wizard_id],
"doc_model": "journal.ledger.report.wizard",
"docs": self.env["journal.ledger.report.wizard"].browse(wizard_id),
@ -371,3 +374,5 @@ class JournalLedgerReport(models.AbstractModel):
"Journal_Ledgers": journal_ledgers_data,
"Moves": moves_data,
}
)
return res

View File

@ -167,7 +167,7 @@ class OpenItemsReport(models.AbstractModel):
"partner_name": partner.name or "",
"ref_label": ref_label,
"journal_id": move_line["journal_id"][0],
"move_name": move_line["move_id"][1],
"move_name": move_line["move_name"],
"entry_id": move_line["move_id"][0],
"currency_id": move_line["currency_id"][0]
if move_line["currency_id"]
@ -252,6 +252,7 @@ class OpenItemsReport(models.AbstractModel):
return new_open_items
def _get_report_values(self, docids, data):
res = super()._get_report_values(docids, data)
wizard_id = data["wizard_id"]
company = self.env["res.company"].browse(data["company_id"])
company_id = data["company_id"]
@ -291,7 +292,8 @@ class OpenItemsReport(models.AbstractModel):
partners_data,
accounts_data,
)
return {
res.update(
{
"doc_ids": [wizard_id],
"doc_model": "open.items.report.wizard",
"docs": self.env["open.items.report.wizard"].browse(wizard_id),
@ -309,6 +311,8 @@ class OpenItemsReport(models.AbstractModel):
"Open_Items": open_items_move_lines_data,
"grouped_by": grouped_by,
}
)
return res
def _get_ml_fields(self):
return self.COMMON_ML_FIELDS + [
@ -321,6 +325,7 @@ class OpenItemsReport(models.AbstractModel):
"amount_residual_currency",
"debit",
"amount_currency",
"move_name",
]
def get_analytic_domain(self, domain, analytic_account_ids, no_analytic):

View File

@ -143,45 +143,89 @@
<div class="act_as_thead">
<div class="act_as_row labels">
<!--## date-->
<div class="act_as_cell first_column" style="width: 3.51%;">
<div
t-if="date_visible"
class="act_as_cell first_column"
style="width: 3.51%;"
>
Date
</div>
<!--## move-->
<div class="act_as_cell" style="width: 8.03%">Entry</div>
<div
t-if="entry_visible"
class="act_as_cell"
style="width: 8.03%"
>Entry</div>
<!--## journal-->
<div class="act_as_cell" style="width: 4.13%;">Journal</div>
<div
t-if="journal_visible"
class="act_as_cell"
style="width: 4.13%;"
>Journal</div>
<!--## account code-->
<div class="act_as_cell" style="width: 4.75%;">Account</div>
<!--## account code-->
<div class="act_as_cell" style="width: 8.89%;">Taxes</div>
<div
t-if="account_code_visible"
class="act_as_cell"
style="width: 4.75%;"
>Account</div>
<!--## taxes-->
<div
t-if="taxes_visible"
class="act_as_cell"
style="width: 8.89%;"
>Taxes</div>
<!--## partner-->
<div class="act_as_cell" style="width: 12.01%;">Partner</div>
<div
t-if="partner_visible"
class="act_as_cell"
style="width: 12.01%;"
>Partner</div>
<!--## ref - label-->
<div class="act_as_cell" style="width: 16.9%;">
<div
t-if="ref_label_visible"
class="act_as_cell"
style="width: 16.9%;"
>
Ref -
Label
</div>
<t t-if="show_cost_center">
<t t-if="show_cost_center and cost_center_visible">
<!--## cost_center-->
<div class="act_as_cell" style="width: 8.03%;">
Analytic Account
</div>
</t>
<t t-if="show_analytic_tags">
<t t-if="show_analytic_tags and analytic_tags_visible">
<!--## analytic tags-->
<div class="act_as_cell" style="width: 4.75%;">Tags</div>
</t>
<!--## matching_number-->
<div class="act_as_cell" style="width: 2.41%;">Rec.</div>
<div
t-if="matching_number_visible"
class="act_as_cell"
style="width: 2.41%;"
>Rec.</div>
<!--## debit-->
<div class="act_as_cell amount" style="width: 8.02%;">Debit</div>
<div
t-if="debit_visible"
class="act_as_cell amount"
style="width: 8.02%;"
>Debit</div>
<!--## credit-->
<div class="act_as_cell amount" style="width: 8.02%;">Credit</div>
<div
t-if="credit_visible"
class="act_as_cell amount"
style="width: 8.02%;"
>Credit</div>
<!--## balance cumulated-->
<div class="act_as_cell amount" style="width: 8.02%;">
<div
t-if="balance_visible"
class="act_as_cell amount"
style="width: 8.02%;"
>
Cumul. Bal.
</div>
<t t-if="foreign_currency">
<t t-if="foreign_currency and foreign_currency_visible">
<!--## amount_currency-->
<div
class="act_as_cell amount"
@ -198,35 +242,35 @@
<!-- Display first line with initial balance -->
<div class="act_as_row lines">
<!--## date-->
<div class="act_as_cell" />
<div t-if="date_visible" class="act_as_cell" />
<!--## move-->
<div class="act_as_cell" />
<div t-if="entry_visible" class="act_as_cell" />
<!--## journal-->
<div class="act_as_cell" />
<div t-if="journal_visible" class="act_as_cell" />
<!--## account code-->
<div class="act_as_cell" />
<div t-if="account_code_visible" class="act_as_cell" />
<!--## taxes-->
<div class="act_as_cell" />
<div t-if="taxes_visible" class="act_as_cell" />
<!--## partner-->
<div class="act_as_cell" />
<div t-if="partner_visible" class="act_as_cell" />
<!--## ref - label-->
<div class="act_as_cell amount">
<div t-if="ref_label_visible" class="act_as_cell amount">
<t t-if='type == "account_type"'>Initial balance</t>
<t t-if='type == "grouped_type"'>
<t t-if="'partners' in account">Partner initial balance</t>
<t t-if="'taxes' in account">Tax initial balance</t>
</t>
</div>
<t t-if="show_cost_center">
<t t-if="show_cost_center and cost_center_visible">
<!--## cost_center-->
<div class="act_as_cell" />
</t>
<t t-if="show_analytic_tags">
<t t-if="show_analytic_tags and analytic_tags_visible">
<!--## analytic tags-->
<div class="act_as_cell" />
</t>
<!--## matching_number-->
<div class="act_as_cell" />
<div t-if="matching_number_visible" class="act_as_cell" />
<t
t-set="misc_domain"
t-value="[('account_id', '=', account['id']),('date', '&lt;', date_from)]"
@ -238,7 +282,7 @@
/>
<t t-set="misc_grouped_domain" t-value="[]" t-else="" />
<!--## debit-->
<div class="act_as_cell amount">
<div t-if="debit_visible" class="act_as_cell amount">
<t t-set="debit_domain" t-value="[('debit', '&lt;&gt;', 0)]" />
<t t-if="type == 'account_type'">
<span
@ -264,7 +308,7 @@
</t>
</div>
<!--## credit-->
<div class="act_as_cell amount">
<div t-if="credit_visible" class="act_as_cell amount">
<t t-set="credit_domain" t-value="[('credit', '&lt;&gt;', 0)]" />
<t t-if="type == 'account_type'">
<span
@ -290,7 +334,7 @@
</t>
</div>
<!--## balance cumulated-->
<div class="act_as_cell amount">
<div t-if="balance_visible" class="act_as_cell amount">
<t t-if="type == 'account_type'">
<span t-att-domain="misc_domain" res-model="account.move.line">
<t
@ -311,7 +355,7 @@
</span>
</t>
</div>
<t t-if="foreign_currency">
<t t-if="foreign_currency and foreign_currency_visible">
<t t-if="account['currency_id']">
<t
t-set="account_currency"
@ -378,7 +422,7 @@
<!-- # lines or centralized lines -->
<div class="act_as_row lines">
<!--## date-->
<div class="act_as_cell left">
<div t-if="date_visible" class="act_as_cell left">
<t t-if="line['id']">
<!--## We don't use t-field because it throws an error on click -->
<span
@ -403,7 +447,7 @@
</t>
</div>
<!--## move-->
<div class="act_as_cell left">
<div t-if="entry_visible" class="act_as_cell left">
<t t-if="line['entry_id']">
<span
t-att-res-id="line['entry_id']"
@ -415,7 +459,7 @@
</t>
</div>
<!--## journal-->
<div class="act_as_cell left">
<div t-if="journal_visible" class="act_as_cell left">
<span
t-att-res-id="line['journal_id']"
res-model="account.journal"
@ -427,7 +471,7 @@
</span>
</div>
<!--## account code-->
<div class="act_as_cell left">
<div t-if="account_code_visible" class="act_as_cell left">
<span
t-att-res-id="account['id']"
res-model="account.account"
@ -437,7 +481,7 @@
</span>
</div>
<!--## taxes-->
<div class="act_as_cell left">
<div t-if="taxes_visible" class="act_as_cell left">
<t t-if="taxes_data and line['tax_ids']">
<t t-foreach="line['tax_ids']" t-as="tax_id">
<span
@ -450,7 +494,7 @@
</t>
</div>
<!--## partner-->
<div class="act_as_cell left">
<div t-if="partner_visible" class="act_as_cell left">
<t t-if="line['partner_id']">
<span
t-att-res-id="line['partner_id']"
@ -462,24 +506,28 @@
</t>
</div>
<!--## ref - label-->
<div class="act_as_cell left">
<div t-if="ref_label_visible" class="act_as_cell left">
<t t-if="line['id']">
<span
t-att-res-id="line['id']"
res-model="account.move.line"
view-type="form"
>
<t t-out="line['ref_label']" />
<t
t-out="limit_text(line['ref_label'], ref_label_limit)"
/>
</span>
</t>
<t t-else="">
<span>
<t t-out="line['ref_label']" />
<t
t-out="limit_text(line['ref_label'], ref_label_limit)"
/>
</span>
</t>
</div>
<!--## cost_center-->
<t t-if="show_cost_center">
<t t-if="show_cost_center and cost_center_visible">
<div class="act_as_cell left">
<t t-if="line['analytic_account_id']">
<span
@ -492,7 +540,7 @@
</t>
</div>
</t>
<t t-if="show_analytic_tags">
<t t-if="show_analytic_tags and analytic_tags_visible">
<!--## analytic tags-->
<div class="act_as_cell left">
<t t-if="line['tag_ids']">
@ -505,7 +553,7 @@
</div>
</t>
<!--## matching_number-->
<div class="act_as_cell">
<div t-if="matching_number_visible" class="act_as_cell">
<t t-if="line['rec_id']">
<span
t-att-res-id="line['rec_id']"
@ -517,7 +565,7 @@
</t>
</div>
<!--## debit-->
<div class="act_as_cell amount">
<div t-if="debit_visible" class="act_as_cell amount">
<t t-if="line['id']">
<span
t-att-res-id="line['id']"
@ -540,7 +588,7 @@
</t>
</div>
<!--## credit-->
<div class="act_as_cell amount">
<div t-if="credit_visible" class="act_as_cell amount">
<t t-if="line['id']">
<span
t-att-res-id="line['id']"
@ -563,7 +611,7 @@
</t>
</div>
<!--## balance cumulated-->
<div class="act_as_cell amount">
<div t-if="balance_visible" class="act_as_cell amount">
<t t-if="line['id']">
<span
t-att-res-id="line['id']"
@ -585,7 +633,7 @@
</span>
</t>
</div>
<t t-if="foreign_currency">
<t t-if="foreign_currency and foreign_currency_visible">
<t t-if="line['currency_id']">
<t
t-set="line_currency"
@ -653,32 +701,48 @@
<t t-if="'taxes' in account">Tax ending balance</t>
</div>
</t>
<t t-if="show_cost_center">
<t t-if="show_cost_center and cost_center_visible">
<!--## cost_center-->
<div class="act_as_cell" style="width: 8.03%" />
</t>
<t t-if="show_analytic_tags">
<t t-if="show_analytic_tags and analytic_tags_visible">
<!--## analytic tags-->
<div class="act_as_cell" style="width: 4.75%;" />
</t>
<!--## matching_number-->
<div class="act_as_cell" style="width: 2.41%;" />
<div
t-if="matching_number_visible"
class="act_as_cell"
style="width: 2.41%;"
/>
<!--## debit-->
<div class="act_as_cell amount" style="width: 8.02%;">
<div
t-if="debit_visible"
class="act_as_cell amount"
style="width: 8.02%;"
>
<span
t-out="account_or_group_item_object['fin_bal']['debit']"
t-options="{'widget': 'monetary', 'display_currency': company_currency}"
/>
</div>
<!--## credit-->
<div class="act_as_cell amount" style="width: 8.02%;">
<div
t-if="credit_visible"
class="act_as_cell amount"
style="width: 8.02%;"
>
<span
t-out="account_or_group_item_object['fin_bal']['credit']"
t-options="{'widget': 'monetary', 'display_currency': company_currency}"
/>
</div>
<!--## balance cumulated-->
<div class="act_as_cell amount" style="width: 8.02%;">
<div
t-if="balance_visible"
class="act_as_cell amount"
style="width: 8.02%;"
>
<span
t-out="account_or_group_item_object['fin_bal']['balance']"
t-options="{'widget': 'monetary', 'display_currency': company_currency}"
@ -695,7 +759,7 @@
t-if="'partners' in account"
/>
<t t-set="misc_grouped_domain" t-value="[]" t-else="" />
<t t-if="foreign_currency">
<t t-if="foreign_currency and foreign_currency_visible">
<t t-if="account['fin_bal_currency_id']">
<t
t-set="account_currency"

View File

@ -119,7 +119,7 @@
</t>
<div class="act_as_thead">
<div class="act_as_row labels">
<t t-if="with_auto_sequence">
<t t-if="with_auto_sequence and sequence_visible">
<div
class="act_as_cell first_column"
name="entry"
@ -129,6 +129,7 @@
</div>
</t>
<div
t-if="entry_visible"
t-att-class="'act_as_cell' if with_auto_sequence else 'act_as_cell first_column'"
class="act_as_cell"
name="entry"
@ -136,26 +137,57 @@
>
Entry
</div>
<div class="act_as_cell" name="date" style="width: 5.41%;">Date</div>
<div
t-if="date_visible"
class="act_as_cell"
name="date"
style="width: 5.41%;"
>Date</div>
<div
t-if="account_code_visible or account_name_visible"
class="act_as_cell"
name="account"
t-att-style="account_column_style"
>
Account
</div>
<div class="act_as_cell" name="partner" style="width: 15.14%;">
<div
t-if="partner_visible"
class="act_as_cell"
name="partner"
style="width: 15.14%;"
>
Partner
</div>
<div class="act_as_cell" name="label" t-att-style="label_column_style">
<div
t-if="label_visible"
class="act_as_cell"
name="label"
t-att-style="label_column_style"
>
Ref - Label
</div>
<div class="act_as_cell" name="taxes" style="width: 7.57%;">Taxes</div>
<div class="act_as_cell" name="debit" style="width: 8.65%;">Debit</div>
<div class="act_as_cell" name="credit" style="width: 8.65%;">
<div
t-if="taxes_visible"
class="act_as_cell"
name="taxes"
style="width: 7.57%;"
>Taxes</div>
<div
t-if="debit_visible"
class="act_as_cell"
name="debit"
style="width: 8.65%;"
>Debit</div>
<div
t-if="credit_visible"
class="act_as_cell"
name="credit"
style="width: 8.65%;"
>
Credit
</div>
<t t-if="display_currency">
<t t-if="display_currency and foreing_currency_visible">
<div class="act_as_cell" name="currency_name" style="width: 2.16%;">
Cur.
</div>
@ -172,16 +204,20 @@
</template>
<template id="account_financial_report.report_journal_ledger_journal_first_line">
<div class="act_as_row lines">
<t t-if="with_auto_sequence">
<t t-if="with_auto_sequence and sequence_visible">
<div class="act_as_cell" name="Sequence" />
</t>
<div class="act_as_cell" name="entry" />
<div class="act_as_cell" name="date" />
<div class="act_as_cell" name="account" />
<div class="act_as_cell" name="partner" />
<div class="act_as_cell" name="label" />
<div class="act_as_cell" name="taxes" />
<div class="act_as_cell amount" name="debit">
<div t-if="entry_visible" class="act_as_cell" name="entry" />
<div t-if="date_visible" class="act_as_cell" name="date" />
<div
t-if="account_code_visible or account_name_visible"
class="act_as_cell"
name="account"
/>
<div t-if="partner_visible" class="act_as_cell" name="partner" />
<div t-if="label_visible" class="act_as_cell" name="label" />
<div t-if="taxes_visible" class="act_as_cell" name="taxes" />
<div t-if="debit_visible" class="act_as_cell amount" name="debit">
<b>
<span
t-esc="journal['debit']"
@ -189,7 +225,7 @@
/>
</b>
</div>
<div class="act_as_cell amount" name="credit">
<div t-if="credit_visible" class="act_as_cell amount" name="credit">
<b>
<span
t-esc="journal['credit']"
@ -197,7 +233,7 @@
/>
</b>
</div>
<t t-if="display_currency">
<t t-if="display_currency and foreign_currency_visible">
<div class="act_as_cell" name="currency_name">
</div>
@ -226,10 +262,14 @@
</t>
</template>
<template id="account_financial_report.report_journal_move_line">
<div class="act_as_cell left" name="auto_sequence" t-if="with_auto_sequence">
<div
class="act_as_cell left"
name="auto_sequence"
t-if="with_auto_sequence and sequence_visible"
>
<span t-if="display_move_info" t-esc="move_line['auto_sequence']" />
</div>
<div class="act_as_cell left" name="entry">
<div t-if="entry_visible" class="act_as_cell left" name="entry">
<t t-if="display_move_info">
<span
t-att-res-id="move_line['move_id']"
@ -242,35 +282,43 @@
</span>
</t>
</div>
<div class="act_as_cell left" name="date">
<div t-if="date_visible" class="act_as_cell left" name="date">
<span
t-if="display_move_info"
t-esc="move_line['date']"
t-options="{'widget': 'date'}"
/>
</div>
<div class="act_as_cell left" name="account">
<div
t-if="account_code_visible or account_name_visible"
class="act_as_cell left"
name="account"
>
<span
t-if="account_code_visible"
t-esc="o._get_atr_from_dict(move_line['account_id'], account_ids_data, 'code')"
/>
<span t-if="display_account_name">
<span t-if="display_account_name and account_name_visible">
-
<span
t-esc="o._get_atr_from_dict(move_line['account_id'], account_ids_data, 'name')"
t-esc="limit_text(o._get_atr_from_dict(move_line['account_id'], account_ids_data, 'name'), account_name_limit)"
/>
</span>
</div>
<div class="act_as_cell left" name="partner">
<div t-if="partner_visible" class="act_as_cell left" name="partner">
<span
t-if="display_partner"
t-esc="o._get_partner_name(move_line['partner_id'], partner_ids_data)"
/>
</div>
<div class="act_as_cell left" name="label">
<span t-if="move_line['label']" t-esc="move_line['label']" />
<div t-if="label_visible" class="act_as_cell left" name="label">
<span
t-if="move_line['label']"
t-esc="limit_text(move_line['label'], label_limit)"
/>
<span t-if="not move_line['label']">/</span>
</div>
<div class="act_as_cell left" name="taxes">
<div t-if="taxes_visible" class="act_as_cell left" name="taxes">
<t
t-set="tax_line_dat"
t-value="o._get_data_from_dict(move_line['tax_line_id'], tax_line_data)"
@ -283,7 +331,7 @@
t-esc="o._get_ml_tax_description(move_line, tax_line_dat, move_line_ids_taxes_dat)"
/>
</div>
<div class="act_as_cell amount" name="debit">
<div t-if="debit_visible" class="act_as_cell amount" name="debit">
<t t-if="move_line['debit']">
<span
t-esc="move_line['debit']"
@ -291,7 +339,7 @@
/>
</t>
</div>
<div class="act_as_cell amount" name="credit">
<div t-if="credit_visible" class="act_as_cell amount" name="credit">
<t t-if="move_line['credit']">
<span
t-esc="move_line['credit']"
@ -299,7 +347,7 @@
/>
</t>
</div>
<t t-if="display_currency">
<t t-if="display_currency and foreign_currency_visible">
<div class="act_as_cell" name="currency_name">
<t t-if="move_line['currency_id']">
<span t-esc="currency_ids_data.get(move_line['currency_id'], '')" />

View File

@ -238,47 +238,88 @@
<div class="act_as_thead">
<div class="act_as_row labels">
<!--## date-->
<div class="act_as_cell first_column" style="width: 5.51%;">Date</div>
<div
t-if="date_visible"
class="act_as_cell first_column"
style="width: 5.51%;"
>Date</div>
<!--## move-->
<div class="act_as_cell" style="width: 9.76%;">Entry</div>
<div
t-if="entry_visible"
class="act_as_cell"
style="width: 9.76%;"
>Entry</div>
<!--## journal-->
<div class="act_as_cell" style="width: 4.78%;">Journal</div>
<div
t-if="journal_visible"
class="act_as_cell"
style="width: 4.78%;"
>Journal</div>
<!--## account code-->
<div class="act_as_cell" style="width: 5.38%;">Account</div>
<div
t-if="account_code_visible"
class="act_as_cell"
style="width: 5.38%;"
>Account</div>
<t t-if="analytic_account_ids">
<!--## partner-->
<div class="act_as_cell" style="width: 13.19%;">Partner</div>
<div
t-if="partner_visible"
class="act_as_cell"
style="width: 13.19%;"
>Partner</div>
<!--## analytic_account-->
<div
t-if="analytic_account_visible"
class="act_as_cell"
style="width: 13.19%;"
>Analytic Account</div>
<!--## ref - label-->
<div class="act_as_cell" style="width: 13.19%;">
<div
t-if="ref_label_visible"
class="act_as_cell"
style="width: 13.19%;"
>
Ref -
Label
</div>
</t>
<t t-else="">
<!--## partner-->
<div class="act_as_cell" style="width: 15.07%;">Partner</div>
<div
t-if="partner_visible"
class="act_as_cell"
style="width: 15.07%;"
>Partner</div>
<!--## ref - label-->
<div class="act_as_cell" style="width: 24.5%;">
<div
t-if="ref_label_visible"
class="act_as_cell"
style="width: 24.5%;"
>
Ref -
Label
</div>
</t>
<!--## date_due-->
<div class="act_as_cell" style="width: 6.47%;">
<div t-if="date_due_visible" class="act_as_cell" style="width: 6.47%;">
Due
date
</div>
<!--## amount_total_due-->
<div class="act_as_cell" style="width: 6.57%;">Original</div>
<div
t-if="original_visible"
class="act_as_cell"
style="width: 6.57%;"
>Original</div>
<!--## amount_residual-->
<div class="act_as_cell" style="width: 6.57%;">Residual</div>
<t t-if="foreign_currency">
<div
t-if="residual_visible"
class="act_as_cell"
style="width: 6.57%;"
>Residual</div>
<t t-if="foreign_currency and foreign_currency_visible">
<!--## currency_name-->
<div class="act_as_cell" style="width: 2.25%;">Cur.</div>
<!--## amount_total_due_currency-->
@ -297,11 +338,11 @@
<!-- # lines or centralized lines -->
<div class="act_as_row lines">
<!--## date-->
<div class="act_as_cell left">
<div t-if="date_visible" class="act_as_cell left">
<span t-raw="line['date'].strftime('%d/%m/%Y')" />
</div>
<!--## move-->
<div class="act_as_cell left">
<div t-if="entry_visible" class="act_as_cell left">
<span
t-att-res-id="line['entry_id']"
res-model="account.move"
@ -311,7 +352,7 @@
</span>
</div>
<!--## journal-->
<div class="act_as_cell left">
<div t-if="journal_visible" class="act_as_cell left">
<span
t-att-res-id="journals_data[line['journal_id']]['id']"
res-model="account.journal"
@ -321,7 +362,7 @@
</span>
</div>
<!--## account code-->
<div class="act_as_cell left">
<div t-if="account_code_visible" class="act_as_cell left">
<span
t-att-res-id="accounts_data[account_id]['id']"
res-model="account.account"
@ -331,7 +372,7 @@
</span>
</div>
<!--## partner-->
<div class="act_as_cell left">
<div t-if="partner_visible" class="act_as_cell left">
<span
t-if="line.get('partner_id', False)"
t-att-res-id="line['partner_id']"
@ -356,15 +397,15 @@
</div>
</t>
<!--## ref - label-->
<div class="act_as_cell left">
<span t-esc="line['ref_label']" />
<div t-if="ref_label_visible" class="act_as_cell left">
<span t-esc="limit_text(line['ref_label'], ref_label_limit)" />
</div>
<!--## date_due-->
<div class="act_as_cell left">
<div t-if="date_due_visible" class="act_as_cell left">
<span t-esc="line['date_maturity']" />
</div>
<!--## amount_total_due-->
<div class="act_as_cell amount">
<div t-if="original_visible" class="act_as_cell amount">
<span
t-if="line.get('original', False)"
t-esc="line['original']"
@ -372,13 +413,13 @@
/>
</div>
<!--## amount_residual-->
<div class="act_as_cell amount">
<div t-if="residual_visible" class="act_as_cell amount">
<span
t-esc="line['amount_residual']"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
/>
</div>
<t t-if="foreign_currency">
<t t-if="foreign_currency and foreign_currency_visible">
<t t-if="line['currency_id']">
<!--## currency_name-->
<div class="act_as_cell amount">
@ -472,7 +513,7 @@
</t>
</div>
<!--## amount_total_due_currency + amount_residual_currency -->
<t t-if="foreign_currency">
<t t-if="foreign_currency and foreign_currency_visible">
<!--## currency_name-->
<div class="act_as_cell" />
<!--## amount_total_due_currency-->

View File

@ -808,6 +808,7 @@ class TrialBalanceReport(models.AbstractModel):
return groups_data
def _get_report_values(self, docids, data):
res = super()._get_report_values(docids, data)
show_partner_details = data["show_partner_details"]
wizard_id = data["wizard_id"]
company = self.env["res.company"].browse(data["company_id"])
@ -902,7 +903,8 @@ class TrialBalanceReport(models.AbstractModel):
total_amount[account_id]["currency_name"] = accounts_data[
account_id
]["currency_name"]
return {
res.update(
{
"doc_ids": [wizard_id],
"doc_model": "trial.balance.report.wizard",
"docs": self.env["trial.balance.report.wizard"].browse(wizard_id),
@ -927,3 +929,5 @@ class TrialBalanceReport(models.AbstractModel):
"show_hierarchy_level": show_hierarchy_level,
"grouped_by": grouped_by,
}
)
return res

View File

@ -8,6 +8,7 @@ from odoo import api, models
class VATReport(models.AbstractModel):
_inherit = "report.account_financial_report.abstract_report"
_name = "report.account_financial_report.vat_report"
_description = "Vat Report Report"
@ -197,6 +198,7 @@ class VATReport(models.AbstractModel):
return vat_report_list
def _get_report_values(self, docids, data):
res = super()._get_report_values(docids, data)
wizard_id = data["wizard_id"]
company = self.env["res.company"].browse(data["company_id"])
company_id = data["company_id"]
@ -216,7 +218,8 @@ class VATReport(models.AbstractModel):
vat_report = self._get_vat_report_tag_data(
vat_report_data, tax_data, tax_detail
)
return {
res.update(
{
"doc_ids": [wizard_id],
"doc_model": "open.items.report.wizard",
"docs": self.env["open.items.report.wizard"].browse(wizard_id),
@ -228,6 +231,8 @@ class VATReport(models.AbstractModel):
"tax_detail": data["tax_detail"],
"vat_report": vat_report,
}
)
return res
def _get_ml_fields_vat_report(self):
return [

View File

@ -7,3 +7,4 @@ access_trial_balance_report_wizard,access_trial_balance_report_wizard,model_tria
access_vat_report_wizard,access_vat_report_wizard,model_vat_report_wizard,base.group_user,1,1,1,1
access_account_age_report_configuration,access_account_age_report_configuration,model_account_age_report_configuration,base.group_user,1,1,1,1
access_account_age_report_configuration_line,access_account_age_report_configuration_line,model_account_age_report_configuration_line,base.group_user,1,1,1,1
account_financial_report.access_account_financial_report_column,access_account_financial_report_column,account_financial_report.model_account_financial_report_column,base.group_user,1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
7 access_vat_report_wizard access_vat_report_wizard model_vat_report_wizard base.group_user 1 1 1 1
8 access_account_age_report_configuration access_account_age_report_configuration model_account_age_report_configuration base.group_user 1 1 1 1
9 access_account_age_report_configuration_line access_account_age_report_configuration_line model_account_age_report_configuration_line base.group_user 1 1 1 1
10 account_financial_report.access_account_financial_report_column access_account_financial_report_column account_financial_report.model_account_financial_report_column base.group_user 1 1 1 1

View File

@ -380,6 +380,8 @@ Invoicing / Reporting / OCA accounting reports.</p>
<li>VAT Report</li>
<li>Journal Ledger</li>
</ul>
<p>It is possible to select the columns to show and limit the size of some of them from the
columns page.</p>
<p>Currently General ledger, Trial Balance and Open Items are fully compatible with a foreign
currency set up in account in order to display balances. Moreover, any foreign
currency used in account move lines is properly shown.</p>
@ -394,16 +396,17 @@ For further information, check CONFIGURE.rst</p>
<li><a class="reference internal" href="#configuration" id="toc-entry-1">Configuration</a></li>
<li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-2">Known issues / Roadmap</a></li>
<li><a class="reference internal" href="#changelog" id="toc-entry-3">Changelog</a><ul>
<li><a class="reference internal" href="#section-1" id="toc-entry-4">11.0.2.5.0 (2019-04-26)</a></li>
<li><a class="reference internal" href="#section-2" id="toc-entry-5">11.0.2.4.1 (2019-01-08)</a></li>
<li><a class="reference internal" href="#section-3" id="toc-entry-6">11.0.2.3.1 (2018-11-29)</a></li>
<li><a class="reference internal" href="#section-1" id="toc-entry-4">15.0.3.2.3 (2025-02-17)</a></li>
<li><a class="reference internal" href="#section-2" id="toc-entry-5">11.0.2.5.0 (2019-04-26)</a></li>
<li><a class="reference internal" href="#section-3" id="toc-entry-6">11.0.2.4.1 (2019-01-08)</a></li>
<li><a class="reference internal" href="#section-4" id="toc-entry-7">11.0.2.3.1 (2018-11-29)</a></li>
</ul>
</li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-7">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-8">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-9">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-10">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-11">Maintainers</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-8">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-9">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-10">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-11">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-12">Maintainers</a></li>
</ul>
</li>
</ul>
@ -437,26 +440,35 @@ are different.</li>
<li>It would be nice to have in reports a column indicating the
state of the entries when the option “All Entries” is selected
in “Target Moves” field in a wizard</li>
<li>Adapt reports so that the order of the columns displayed is dynamic</li>
<li>Remove duplicated options to show columns (it has not been made in a stable version so
as not to generate confusion in users)</li>
</ul>
</div>
<div class="section" id="changelog">
<h1><a class="toc-backref" href="#toc-entry-3">Changelog</a></h1>
<div class="section" id="section-1">
<h2><a class="toc-backref" href="#toc-entry-4">11.0.2.5.0 (2019-04-26)</a></h2>
<h2><a class="toc-backref" href="#toc-entry-4">15.0.3.2.3 (2025-02-17)</a></h2>
<ul class="simple">
<li>Added the option to select columns to display and the ability to limit the width of the text</li>
</ul>
</div>
<div class="section" id="section-2">
<h2><a class="toc-backref" href="#toc-entry-5">11.0.2.5.0 (2019-04-26)</a></h2>
<ul class="simple">
<li>In the Trial Balance you have an option to hide parent hierarchy levels</li>
</ul>
</div>
<div class="section" id="section-2">
<h2><a class="toc-backref" href="#toc-entry-5">11.0.2.4.1 (2019-01-08)</a></h2>
<div class="section" id="section-3">
<h2><a class="toc-backref" href="#toc-entry-6">11.0.2.4.1 (2019-01-08)</a></h2>
<ul class="simple">
<li>Handle better multicompany behaviour</li>
<li>Improve how title appears in the reports</li>
<li>Improve performance in General Ledger</li>
</ul>
</div>
<div class="section" id="section-3">
<h2><a class="toc-backref" href="#toc-entry-6">11.0.2.3.1 (2018-11-29)</a></h2>
<div class="section" id="section-4">
<h2><a class="toc-backref" href="#toc-entry-7">11.0.2.3.1 (2018-11-29)</a></h2>
<ul class="simple">
<li>In the Trial Balance you can apply a filter by hierarchy levels</li>
<li>In the General Ledger you can apply a filter by Analytic Tag</li>
@ -465,7 +477,7 @@ in “Target Moves” field in a wizard</li>
</div>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-7">Bug Tracker</a></h1>
<h1><a class="toc-backref" href="#toc-entry-8">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-financial-reporting/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
@ -473,18 +485,19 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#toc-entry-8">Credits</a></h1>
<h1><a class="toc-backref" href="#toc-entry-9">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-9">Authors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-10">Authors</a></h2>
<ul class="simple">
<li>Camptocamp</li>
<li>initOS GmbH</li>
<li>redCOR AG</li>
<li>ForgeFlow</li>
<li>Tecnativa</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-10">Contributors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-11">Contributors</a></h2>
<ul class="simple">
<li>Jordi Ballester &lt;<a class="reference external" href="mailto:jordi.ballester&#64;forgeflow.com">jordi.ballester&#64;forgeflow.com</a>&gt;</li>
<li>Yannick Vaucher &lt;<a class="reference external" href="mailto:yannick.vaucher&#64;camptocamp.com">yannick.vaucher&#64;camptocamp.com</a>&gt;</li>
@ -512,6 +525,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
<li>Alexandre D. Díaz</li>
<li>Víctor Martínez</li>
<li>Carolina Fernandez</li>
<li>Carlos Dauden</li>
</ul>
</li>
<li><a class="reference external" href="https://www.sygel.es">Sygel</a>:<ul>
@ -527,7 +541,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
April 2016.</p>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-11">Maintainers</a></h2>
<h2><a class="toc-backref" href="#toc-entry-12">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />

View File

@ -67,7 +67,7 @@ class TestAgedPartnerBalance(TransactionCase):
wizard = self.wizard_with_line_details
wizard.onchange_type_accounts_only()
data = wizard._prepare_report_aged_partner_balance()
data = wizard._prepare_report_data()
# Simulate web client behavior:
# default value is a datetime.date but web client sends back strings
@ -83,7 +83,7 @@ class TestAgedPartnerBalance(TransactionCase):
second_wizard = self.wizard_without_line_details
second_wizard.onchange_type_accounts_only()
data = second_wizard._prepare_report_aged_partner_balance()
data = second_wizard._prepare_report_data()
# Simulate web client behavior:
# default value is a datetime.date but web client sends back strings
@ -129,7 +129,7 @@ class TestAgedPartnerBalance(TransactionCase):
wizard.age_partner_config_id = self.account_age_report_config.id
wizard.onchange_type_accounts_only()
data = wizard._prepare_report_aged_partner_balance()
data = wizard._prepare_report_data()
# Simulate web client behavior:
# default value is a datetime.date but web client sends back strings
@ -147,7 +147,7 @@ class TestAgedPartnerBalance(TransactionCase):
second_wizard.age_partner_config_id = self.account_age_report_config.id
second_wizard.onchange_type_accounts_only()
data = second_wizard._prepare_report_aged_partner_balance()
data = second_wizard._prepare_report_data()
# Simulate web client behavior:
# default value is a datetime.date but web client sends back strings

View File

@ -128,7 +128,7 @@ class TestGeneralLedgerReport(AccountTestInvoicingCommon):
"centralize": centralize,
}
)
data = general_ledger._prepare_report_general_ledger()
data = general_ledger._prepare_report_data()
res_data = self.env[
"report.account_financial_report.general_ledger"
]._get_report_values(general_ledger, data)

View File

@ -177,7 +177,7 @@ class TestJournalReport(AccountTestInvoicingCommon):
"move_target": "all",
}
)
data = wiz._prepare_report_journal_ledger()
data = wiz._prepare_report_data()
res_data = self.JournalLedgerReport._get_report_values(wiz, data)
self.check_report_journal_debit_credit(res_data, 100, 100)
@ -186,7 +186,7 @@ class TestJournalReport(AccountTestInvoicingCommon):
res_data = self.JournalLedgerReport._get_report_values(wiz, data)
self.check_report_journal_debit_credit(res_data, 200, 200)
wiz.move_target = "posted"
data = wiz._prepare_report_journal_ledger()
data = wiz._prepare_report_data()
res_data = self.JournalLedgerReport._get_report_values(wiz, data)
self.check_report_journal_debit_credit(res_data, 0, 0)
@ -203,7 +203,7 @@ class TestJournalReport(AccountTestInvoicingCommon):
self.check_report_journal_debit_credit(res_data, 200, 200)
wiz.date_from = self.previous_fy_date_start
data = wiz._prepare_report_journal_ledger()
data = wiz._prepare_report_data()
res_data = self.JournalLedgerReport._get_report_values(wiz, data)
self.check_report_journal_debit_credit(res_data, 300, 300)
@ -238,7 +238,7 @@ class TestJournalReport(AccountTestInvoicingCommon):
"move_target": "all",
}
)
data = wiz._prepare_report_journal_ledger()
data = wiz._prepare_report_data()
res_data = self.JournalLedgerReport._get_report_values(wiz, data)
self.check_report_journal_debit_credit(res_data, 250, 250)
self.check_report_journal_debit_credit_taxes(res_data, 0, 300, 0, 50)
@ -276,7 +276,7 @@ class TestJournalReport(AccountTestInvoicingCommon):
"move_target": "all",
}
)
data = wiz._prepare_report_journal_ledger()
data = wiz._prepare_report_data()
res_data = self.JournalLedgerReport._get_report_values(wiz, data)
self.check_report_journal_debit_credit(res_data, 250, 250)

View File

@ -91,5 +91,5 @@ class TestOpenItems(AccountTestInvoicingCommon):
}
)
wizard.on_change_account_range()
res = wizard._prepare_report_open_items()
res = wizard._prepare_report_data()
self.assertEqual(res["grouped_by"], wizard.grouped_by)

View File

@ -199,7 +199,7 @@ class TestTrialBalanceReport(AccountTestInvoicingCommon):
"show_partner_details": with_partners,
}
)
data = trial_balance._prepare_report_trial_balance()
data = trial_balance._prepare_report_data()
res_data = self.env[
"report.account_financial_report.trial_balance"
]._get_report_values(trial_balance, data)
@ -554,7 +554,7 @@ class TestTrialBalanceReport(AccountTestInvoicingCommon):
"fy_start_date": self.fy_date_start,
}
)
data = trial_balance._prepare_report_trial_balance()
data = trial_balance._prepare_report_data()
res_data = self.env[
"report.account_financial_report.trial_balance"
]._get_report_values(trial_balance, data)
@ -607,7 +607,7 @@ class TestTrialBalanceReport(AccountTestInvoicingCommon):
"fy_start_date": self.fy_date_start,
}
)
data = trial_balance._prepare_report_trial_balance()
data = trial_balance._prepare_report_data()
res_data = self.env[
"report.account_financial_report.trial_balance"
]._get_report_values(trial_balance, data)
@ -661,7 +661,7 @@ class TestTrialBalanceReport(AccountTestInvoicingCommon):
"fy_start_date": self.fy_date_start,
}
)
data = trial_balance._prepare_report_trial_balance()
data = trial_balance._prepare_report_data()
res_data = self.env[
"report.account_financial_report.trial_balance"
]._get_report_values(trial_balance, data)

View File

@ -219,7 +219,7 @@ class TestVATReport(AccountTestInvoicingCommon):
"tax_detail": True,
}
)
data = vat_report._prepare_vat_report()
data = vat_report._prepare_report_data()
res_data = self.env[
"report.account_financial_report.vat_report"
]._get_report_values(vat_report, data)

View File

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record model="ir.ui.view" id="view_account_financial_report_column_form">
<field name="name">account.financial.report.column.form.inherit</field>
<field name="model">account.financial.report.column</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form>
<sheet>
<group>
<field name="name" />
<field
name="limit"
attrs="{'invisible': [('field_type', '!=', 'string')]}"
/>
<field name="is_visible" widget="boolean_toggle" />
</group>
<group>
<field name="expression_label" />
<field name="sequence" />
<field name="field_type" />
</group>
</sheet>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_account_financial_report_column_tree">
<field name="name">account.financial.report.column.tree</field>
<field name="model">account.financial.report.column</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree editable="bottom" create="false" delete="false">
<field name="sequence" widget="handle" />
<field name="name" readonly="1" />
<field name="expression_label" readonly="1" optional="hide" />
<field name="is_visible" widget="boolean_toggle" />
<field name="field_type" optional="hide" />
<field
name="limit"
attrs="{'invisible': [('field_type', '!=', 'string')]}"
optional="show"
/>
</tree>
</field>
</record>
</odoo>

View File

@ -1,7 +1,8 @@
# Copyright 2019 Lorenzo Battistini @ TAKOBI
# Copyright 2025 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
from odoo import api, fields, models
class AbstractWizard(models.AbstractModel):
@ -34,6 +35,19 @@ class AbstractWizard(models.AbstractModel):
required=False,
string="Company",
)
# Hack inverse to force save columns options
column_ids = fields.Many2many(
comodel_name="account.financial.report.column",
compute="_compute_column_ids",
inverse=lambda self: self,
)
@api.depends("company_id")
def _compute_column_ids(self):
for wiz in self:
wiz.column_ids = self.env["account.financial.report.column"].search(
[("res_model", "=", wiz._name)]
)
def button_export_html(self):
self.ensure_one()
@ -49,3 +63,12 @@ class AbstractWizard(models.AbstractModel):
self.ensure_one()
report_type = "xlsx"
return self._export(report_type)
def _limit_text(self, value, limit=0):
if value and limit and len(value) > limit:
value = value[:limit] + "..."
return value
def _prepare_report_data(self):
self.ensure_one()
return {"wizard_name": self._name, "wizard_id": self.id}

View File

@ -139,7 +139,7 @@ class AgedPartnerBalanceWizard(models.TransientModel):
def _print_report(self, report_type):
self.ensure_one()
data = self._prepare_report_aged_partner_balance()
data = self._prepare_report_data()
if report_type == "xlsx":
report_name = "a_f_r.report_aged_partner_balance_xlsx"
else:
@ -153,10 +153,10 @@ class AgedPartnerBalanceWizard(models.TransientModel):
.report_action(self, data=data)
)
def _prepare_report_aged_partner_balance(self):
self.ensure_one()
return {
"wizard_id": self.id,
def _prepare_report_data(self):
res = super()._prepare_report_data()
res.update(
{
"date_at": self.date_at,
"date_from": self.date_from or False,
"only_posted_moves": self.target_move == "posted",
@ -169,6 +169,8 @@ class AgedPartnerBalanceWizard(models.TransientModel):
"analytic_account_ids": self.analytic_account_ids.ids or [],
"no_analytic": self.no_analytic,
}
)
return res
def _export(self, report_type):
"""Default export is PDF."""

View File

@ -272,7 +272,7 @@ class GeneralLedgerReportWizard(models.TransientModel):
def _print_report(self, report_type):
self.ensure_one()
data = self._prepare_report_general_ledger()
data = self._prepare_report_data()
if report_type == "xlsx":
report_name = "a_f_r.report_general_ledger_xlsx"
else:
@ -286,10 +286,6 @@ class GeneralLedgerReportWizard(models.TransientModel):
.report_action(self, data=data)
)
def _prepare_report_general_ledger(self):
self.ensure_one()
return {"wizard_id": self.id}
def _export(self, report_type):
"""Default export is PDF."""
return self._print_report(report_type)

View File

@ -102,6 +102,13 @@
context="{'skip_search_count': 1}"
/>
</page>
<page name="columns" string="Columns">
<field
name="column_ids"
context="{'default_res_name': 'general.ledger.report.wizard'}"
widget="one2many"
/>
</page>
</notebook>
</div>
<div

View File

@ -75,7 +75,7 @@ class JournalLedgerReportWizard(models.TransientModel):
def _print_report(self, report_type):
self.ensure_one()
data = self._prepare_report_journal_ledger()
data = self._prepare_report_data()
if report_type == "xlsx":
report_name = "a_f_r.report_journal_ledger_xlsx"
else:
@ -89,16 +89,16 @@ class JournalLedgerReportWizard(models.TransientModel):
.report_action(self, data=data)
)
def _prepare_report_journal_ledger(self):
self.ensure_one()
def _prepare_report_data(self):
res = super()._prepare_report_data()
journals = self.journal_ids
if not journals:
# Not selecting a journal means that we'll display all journals
journals = self.env["account.journal"].search(
[("company_id", "=", self.company_id.id)]
)
return {
"wizard_id": self.id,
res.update(
{
"date_from": self.date_from,
"date_to": self.date_to,
"move_target": self.move_target,
@ -111,6 +111,8 @@ class JournalLedgerReportWizard(models.TransientModel):
"account_financial_report_lang": self.env.lang,
"with_auto_sequence": self.with_auto_sequence,
}
)
return res
def _export(self, report_type):
"""Default export is PDF."""

View File

@ -7,8 +7,14 @@
<field name="model">journal.ledger.report.wizard</field>
<field name="arch" type="xml">
<form>
<sheet>
<notebook>
<page string="Filters">
<group>
<field name="company_id" groups="base.group_multi_company" />
<field
name="company_id"
groups="base.group_multi_company"
/>
</group>
<separator string="Periods" />
<group>
@ -39,6 +45,16 @@
<group>
<field name="journal_ids" widget="many2many_tags" />
</group>
</page>
<page string="Columns">
<field
name="column_ids"
context="{'default_res_name': 'journal.ledger.report.wizard'}"
widget="one2many"
/>
</page>
</notebook>
</sheet>
<footer>
<button
name="button_export_html"

View File

@ -171,7 +171,7 @@ class OpenItemsReportWizard(models.TransientModel):
def _print_report(self, report_type):
self.ensure_one()
data = self._prepare_report_open_items()
data = self._prepare_report_data()
if report_type == "xlsx":
report_name = "a_f_r.report_open_items_xlsx"
else:
@ -185,10 +185,10 @@ class OpenItemsReportWizard(models.TransientModel):
.report_action(self, data=data)
)
def _prepare_report_open_items(self):
self.ensure_one()
return {
"wizard_id": self.id,
def _prepare_report_data(self):
res = super()._prepare_report_data()
res.update(
{
"date_at": fields.Date.to_string(self.date_at),
"date_from": self.date_from or False,
"only_posted_moves": self.target_move == "posted",
@ -204,6 +204,8 @@ class OpenItemsReportWizard(models.TransientModel):
"grouped_by": self.grouped_by,
"no_analytic": self.no_analytic,
}
)
return res
def _export(self, report_type):
return self._print_report(report_type)

View File

@ -6,6 +6,9 @@
<field name="model">open.items.report.wizard</field>
<field name="arch" type="xml">
<form>
<sheet>
<notebook>
<page string="Filters">
<group name="main_info">
<field
name="company_id"
@ -74,6 +77,16 @@
<field name="no_analytic" />
<field name="all_analytic" />
</group>
</page>
<page string="Columns">
<field
name="column_ids"
context="{'default_res_name': 'open.items.report.wizard'}"
widget="one2many"
/>
</page>
</notebook>
</sheet>
<footer>
<button
name="button_export_html"

View File

@ -233,7 +233,7 @@ class TrialBalanceReportWizard(models.TransientModel):
def _print_report(self, report_type):
self.ensure_one()
data = self._prepare_report_trial_balance()
data = self._prepare_report_data()
if report_type == "xlsx":
report_name = "a_f_r.report_trial_balance_xlsx"
else:
@ -247,10 +247,10 @@ class TrialBalanceReportWizard(models.TransientModel):
.report_action(self, data=data)
)
def _prepare_report_trial_balance(self):
self.ensure_one()
return {
"wizard_id": self.id,
def _prepare_report_data(self):
res = super()._prepare_report_data()
res.update(
{
"date_from": self.date_from,
"date_to": self.date_to,
"only_posted_moves": self.target_move == "posted",
@ -270,6 +270,8 @@ class TrialBalanceReportWizard(models.TransientModel):
"account_financial_report_lang": self.env.lang,
"grouped_by": self.grouped_by,
}
)
return res
def _export(self, report_type):
"""Default export is PDF."""

View File

@ -68,7 +68,7 @@ class VATReportWizard(models.TransientModel):
def _print_report(self, report_type):
self.ensure_one()
data = self._prepare_vat_report()
data = self._prepare_report_data()
if report_type == "xlsx":
report_name = "a_f_r.report_vat_report_xlsx"
else:
@ -82,10 +82,10 @@ class VATReportWizard(models.TransientModel):
.report_action(self, data=data)
)
def _prepare_vat_report(self):
self.ensure_one()
return {
"wizard_id": self.id,
def _prepare_report_data(self):
res = super()._prepare_report_data()
res.update(
{
"company_id": self.company_id.id,
"date_from": self.date_from,
"date_to": self.date_to,
@ -94,6 +94,8 @@ class VATReportWizard(models.TransientModel):
"tax_detail": self.tax_detail,
"account_financial_report_lang": self.env.lang,
}
)
return res
def _export(self, report_type):
"""Default export is PDF."""

View File

@ -50,5 +50,5 @@ class TestOpenItems(AccountTestInvoicingCommon):
}
)
wizard.on_change_account_range()
res = wizard._prepare_report_open_items()
res = wizard._prepare_report_data()
self.assertEqual(res["grouped_by"], wizard.grouped_by)