diff --git a/account_financial_report/README.rst b/account_financial_report/README.rst index 123f90c5..56ec234b 100644 --- a/account_financial_report/README.rst +++ b/account_financial_report/README.rst @@ -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 `__: diff --git a/account_financial_report/__manifest__.py b/account_financial_report/__manifest__.py index 128291c9..9882b4b8 100644 --- a/account_financial_report/__manifest__.py +++ b/account_financial_report/__manifest__.py @@ -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", diff --git a/account_financial_report/data/report_column_data.xml b/account_financial_report/data/report_column_data.xml new file mode 100644 index 00000000..c3f2d4ce --- /dev/null +++ b/account_financial_report/data/report_column_data.xml @@ -0,0 +1,358 @@ + + + + + general.ledger.report.wizard + 10 + Date + date + + + + general.ledger.report.wizard + 20 + Entry + entry + + + + general.ledger.report.wizard + 30 + Journal + journal + + + + general.ledger.report.wizard + 40 + Account code + account_code + + + + general.ledger.report.wizard + 50 + Taxes + taxes + + + + general.ledger.report.wizard + 60 + Partner + partner + + + + general.ledger.report.wizard + 70 + Ref - Label + ref_label + + string + 40 + + + general.ledger.report.wizard + 80 + Analytic account + cost_center + + + + general.ledger.report.wizard + 90 + Analytic tags + analytic_tags + + + + general.ledger.report.wizard + 100 + Matching number + matching_number + + + + general.ledger.report.wizard + 110 + Debit + debit + + + + general.ledger.report.wizard + 120 + Credit + credit + + + + general.ledger.report.wizard + 130 + Balance + balance + + + + general.ledger.report.wizard + 140 + Foreign currency + foreign_currency + + + + + + open.items.report.wizard + 10 + Date + date + + + + open.items.report.wizard + 20 + Entry + entry + + + + open.items.report.wizard + 30 + Journal + journal + + + + open.items.report.wizard + 40 + Account code + account_code + + + + open.items.report.wizard + 50 + Partner + partner + + + + open.items.report.wizard + 60 + Ref - Label + ref_label + + string + 40 + + + open.items.report.wizard + 70 + Date due + date_due + + + + open.items.report.wizard + 80 + Original + original + + + + open.items.report.wizard + 90 + Residual + residual + + + + open.items.report.wizard + 100 + Foreign currency + foreign_currency + + + + + + + journal.ledger.report.wizard + 5 + Sequence + sequence + + + + journal.ledger.report.wizard + 10 + Entry + entry + + + + journal.ledger.report.wizard + 20 + Date + date + + + + journal.ledger.report.wizard + 30 + Account code + account_code + + + + journal.ledger.report.wizard + 40 + Account name + account_name + + string + 20 + + + journal.ledger.report.wizard + 50 + Partner + partner + + + + journal.ledger.report.wizard + 60 + Label + label + + string + 40 + + + journal.ledger.report.wizard + 70 + Debit + debit + + + + journal.ledger.report.wizard + 80 + Credit + credit + + + + journal.ledger.report.wizard + 100 + Foreign currency + foreign_currency + + + + diff --git a/account_financial_report/i18n/account_financial_report.pot b/account_financial_report/i18n/account_financial_report.pot index bcddeff9..7f5f6b32 100644 --- a/account_financial_report/i18n/account_financial_report.pot +++ b/account_financial_report/i18n/account_financial_report.pot @@ -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 diff --git a/account_financial_report/models/__init__.py b/account_financial_report/models/__init__.py index 154d80e3..5b4f8932 100644 --- a/account_financial_report/models/__init__.py +++ b/account_financial_report/models/__init__.py @@ -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 diff --git a/account_financial_report/models/account_financial_report_column.py b/account_financial_report/models/account_financial_report_column.py new file mode 100644 index 00000000..780d3af9 --- /dev/null +++ b/account_financial_report/models/account_financial_report_column.py @@ -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() diff --git a/account_financial_report/readme/CONTRIBUTORS.rst b/account_financial_report/readme/CONTRIBUTORS.rst index f8373c58..722eee80 100644 --- a/account_financial_report/readme/CONTRIBUTORS.rst +++ b/account_financial_report/readme/CONTRIBUTORS.rst @@ -25,6 +25,7 @@ * Alexandre D. Díaz * Víctor Martínez * Carolina Fernandez + * Carlos Dauden * `Sygel `__: diff --git a/account_financial_report/readme/DESCRIPTION.rst b/account_financial_report/readme/DESCRIPTION.rst index 353fa34e..04e865e6 100644 --- a/account_financial_report/readme/DESCRIPTION.rst +++ b/account_financial_report/readme/DESCRIPTION.rst @@ -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. diff --git a/account_financial_report/readme/HISTORY.rst b/account_financial_report/readme/HISTORY.rst index 1d53d794..0c9bccd5 100644 --- a/account_financial_report/readme/HISTORY.rst +++ b/account_financial_report/readme/HISTORY.rst @@ -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) ~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/account_financial_report/readme/ROADMAP.rst b/account_financial_report/readme/ROADMAP.rst index 46ff6c43..b7ae9bb6 100644 --- a/account_financial_report/readme/ROADMAP.rst +++ b/account_financial_report/readme/ROADMAP.rst @@ -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) diff --git a/account_financial_report/report/abstract_report.py b/account_financial_report/report/abstract_report.py index c133ca86..e06d7869 100644 --- a/account_financial_report/report/abstract_report.py +++ b/account_financial_report/report/abstract_report.py @@ -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 diff --git a/account_financial_report/report/aged_partner_balance.py b/account_financial_report/report/aged_partner_balance.py index 52488b63..27f9d993 100644 --- a/account_financial_report/report/aged_partner_balance.py +++ b/account_financial_report/report/aged_partner_balance.py @@ -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,18 +479,21 @@ class AgedPartnerBalanceReport(models.AbstractModel): aged_partner_data = self.with_context( age_partner_config=aged_partner_configuration )._calculate_percent(aged_partner_data) - return { - "doc_ids": [wizard_id], - "doc_model": "open.items.report.wizard", - "docs": self.env["open.items.report.wizard"].browse(wizard_id), - "company_name": company.display_name, - "currency_name": company.currency_id.name, - "date_at": date_at, - "only_posted_moves": only_posted_moves, - "aged_partner_balance": aged_partner_data, - "show_move_lines_details": show_move_line_details, - "age_partner_config": aged_partner_configuration, - } + res.update( + { + "doc_ids": [wizard_id], + "doc_model": "open.items.report.wizard", + "docs": self.env["open.items.report.wizard"].browse(wizard_id), + "company_name": company.display_name, + "currency_name": company.currency_id.name, + "date_at": date_at, + "only_posted_moves": only_posted_moves, + "aged_partner_balance": aged_partner_data, + "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 + [ diff --git a/account_financial_report/report/general_ledger.py b/account_financial_report/report/general_ledger.py index d4cc6ef1..10e8f97d 100644 --- a/account_financial_report/report/general_ledger.py +++ b/account_financial_report/report/general_ledger.py @@ -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,30 +910,33 @@ 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 { - "doc_ids": [wizard_id], - "doc_model": "general.ledger.report.wizard", - "docs": wizard, - "foreign_currency": foreign_currency, - "company_name": company.display_name, - "company_currency": company.currency_id, - "currency_name": company.currency_id.name, - "date_from": date_from, - "date_to": date_to, - "only_posted_moves": only_posted_moves, - "hide_account_at_0": hide_account_at_0, - "show_analytic_tags": wizard.show_analytic_tags, - "show_cost_center": wizard.show_cost_center, - "general_ledger": general_ledger, - "accounts_data": accounts_data, - "journals_data": journals_data, - "full_reconcile_data": full_reconcile_data, - "taxes_data": taxes_data, - "centralize": centralize, - "tags_data": tags_data, - "filter_partner_ids": True if partner_ids else False, - "currency_model": self.env["res.currency"], - } + res.update( + { + "doc_ids": [wizard_id], + "doc_model": "general.ledger.report.wizard", + "docs": wizard, + "foreign_currency": foreign_currency, + "company_name": company.display_name, + "company_currency": company.currency_id, + "currency_name": company.currency_id.name, + "date_from": date_from, + "date_to": date_to, + "only_posted_moves": only_posted_moves, + "hide_account_at_0": hide_account_at_0, + "show_analytic_tags": wizard.show_analytic_tags, + "show_cost_center": wizard.show_cost_center, + "general_ledger": general_ledger, + "accounts_data": accounts_data, + "journals_data": journals_data, + "full_reconcile_data": full_reconcile_data, + "taxes_data": taxes_data, + "centralize": centralize, + "tags_data": tags_data, + "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 + [ diff --git a/account_financial_report/report/journal_ledger.py b/account_financial_report/report/journal_ledger.py index ef566de4..a1c05171 100644 --- a/account_financial_report/report/journal_ledger.py +++ b/account_financial_report/report/journal_ledger.py @@ -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,25 +351,28 @@ 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 { - "doc_ids": [wizard_id], - "doc_model": "journal.ledger.report.wizard", - "docs": self.env["journal.ledger.report.wizard"].browse(wizard_id), - "group_option": data["group_option"], - "foreign_currency": data["foreign_currency"], - "with_account_name": data["with_account_name"], - "company_name": company.display_name, - "currency_name": company.currency_id.name, - "date_from": data["date_from"], - "date_to": data["date_to"], - "move_target": data["move_target"], - "with_auto_sequence": data["with_auto_sequence"], - "account_ids_data": account_ids_data, - "partner_ids_data": partner_ids_data, - "currency_ids_data": currency_ids_data, - "move_ids_data": move_ids_data, - "tax_line_data": tax_line_ids_data, - "move_line_ids_taxes_data": move_line_ids_taxes_data, - "Journal_Ledgers": journal_ledgers_data, - "Moves": moves_data, - } + res.update( + { + "doc_ids": [wizard_id], + "doc_model": "journal.ledger.report.wizard", + "docs": self.env["journal.ledger.report.wizard"].browse(wizard_id), + "group_option": data["group_option"], + "foreign_currency": data["foreign_currency"], + "with_account_name": data["with_account_name"], + "company_name": company.display_name, + "currency_name": company.currency_id.name, + "date_from": data["date_from"], + "date_to": data["date_to"], + "move_target": data["move_target"], + "with_auto_sequence": data["with_auto_sequence"], + "account_ids_data": account_ids_data, + "partner_ids_data": partner_ids_data, + "currency_ids_data": currency_ids_data, + "move_ids_data": move_ids_data, + "tax_line_data": tax_line_ids_data, + "move_line_ids_taxes_data": move_line_ids_taxes_data, + "Journal_Ledgers": journal_ledgers_data, + "Moves": moves_data, + } + ) + return res diff --git a/account_financial_report/report/open_items.py b/account_financial_report/report/open_items.py index 3f951c8d..7a0c6097 100644 --- a/account_financial_report/report/open_items.py +++ b/account_financial_report/report/open_items.py @@ -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,24 +292,27 @@ class OpenItemsReport(models.AbstractModel): partners_data, accounts_data, ) - return { - "doc_ids": [wizard_id], - "doc_model": "open.items.report.wizard", - "docs": self.env["open.items.report.wizard"].browse(wizard_id), - "foreign_currency": data["foreign_currency"], - "show_partner_details": data["show_partner_details"], - "company_name": company.display_name, - "currency_name": company.currency_id.name, - "date_at": date_at_object.strftime("%d/%m/%Y"), - "hide_account_at_0": data["hide_account_at_0"], - "target_move": data["target_move"], - "journals_data": journals_data, - "partners_data": partners_data, - "accounts_data": accounts_data, - "total_amount": total_amount, - "Open_Items": open_items_move_lines_data, - "grouped_by": grouped_by, - } + res.update( + { + "doc_ids": [wizard_id], + "doc_model": "open.items.report.wizard", + "docs": self.env["open.items.report.wizard"].browse(wizard_id), + "foreign_currency": data["foreign_currency"], + "show_partner_details": data["show_partner_details"], + "company_name": company.display_name, + "currency_name": company.currency_id.name, + "date_at": date_at_object.strftime("%d/%m/%Y"), + "hide_account_at_0": data["hide_account_at_0"], + "target_move": data["target_move"], + "journals_data": journals_data, + "partners_data": partners_data, + "accounts_data": accounts_data, + "total_amount": total_amount, + "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): diff --git a/account_financial_report/report/templates/general_ledger.xml b/account_financial_report/report/templates/general_ledger.xml index e2f110a2..61d73fa1 100644 --- a/account_financial_report/report/templates/general_ledger.xml +++ b/account_financial_report/report/templates/general_ledger.xml @@ -143,45 +143,89 @@
-
+
Date
-
Entry
+
Entry
-
Journal
+
Journal
-
Account
- -
Taxes
+
Account
+ +
Taxes
-
Partner
+
Partner
-
+
Ref - Label
- +
Analytic Account
- +
Tags
-
Rec.
+
Rec.
-
Debit
+
Debit
-
Credit
+
Credit
-
+
Cumul. Bal.
- +
-
+
-
+
-
+
-
+
-
+
-
+
-
+
Initial balance Partner initial balance Tax initial balance
- +
- +
-
+
-
+
-
+
-
+
- +
-
+
-
+
-
+
-
+
-
+
-
+
-
+
- + - +
- +
- +
@@ -505,7 +553,7 @@
-
+
-
+
-
+
-
+
- + Tax ending balance
- +
- +
-
+
-
+
-
+
-
+
- +
- +
Entry
-
Date
Date
+
Account
-
+
Partner
-
+
Ref - Label
-
Taxes
-
Debit
-
+
Taxes
+
Debit
+
Credit
- +
Cur.
@@ -172,16 +204,20 @@