diff --git a/README.md b/README.md index 37dde22..b9ca587 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Available addons addon | version | summary --- | --- | --- -[account_financial_report](account_financial_report/) | 3.0.1.2.3| OCA Financial Reports +[account_financial_report](account_financial_report/) | 3.0.1.4.0| OCA Financial Reports [account_tax_balance](account_tax_balance/) | 3.0.1.0.0| Compute tax balances based on date range [mis_builder_cash_flow](mis_builder_cash_flow/) | 3.0.1.0.0| MIS Builder Cash Flow [partner_statement](partner_statement/) | 3.0.1.0.0| OCA Financial Reports diff --git a/account_financial_report/README.rst b/account_financial_report/README.rst index 105d706..3de17fb 100644 --- a/account_financial_report/README.rst +++ b/account_financial_report/README.rst @@ -7,7 +7,7 @@ Account Financial Reports !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:31d7d26b863b281d8b3b14da074f1370a85a46bcd649265be5eea5b4cff114e9 + !! source digest: sha256:4dd0964e1e5bccd75c7c56d0b89bd21f35a0f176bd7b9b69aaebb7db4f3bd729 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/account_financial_report/__manifest__.py b/account_financial_report/__manifest__.py index 06c2a27..96e2864 100644 --- a/account_financial_report/__manifest__.py +++ b/account_financial_report/__manifest__.py @@ -6,7 +6,7 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Account Financial Reports", - "version": "3.0.1.2.3", + "version": "3.0.1.4.0", "category": "Reporting", "summary": "OCA Financial Reports", "author": "Camptocamp," diff --git a/account_financial_report/i18n/account_financial_report.pot b/account_financial_report/i18n/account_financial_report.pot index 5b2c4e3..01d6f4d 100644 --- a/account_financial_report/i18n/account_financial_report.pot +++ b/account_financial_report/i18n/account_financial_report.pot @@ -1171,6 +1171,7 @@ msgstr "" #: code:addons/account_financial_report/report/open_items.py:0 #: code:addons/account_financial_report/report/trial_balance.py:0 #: code:addons/account_financial_report/report/trial_balance.py:0 +#: code:addons/account_financial_report/report/trial_balance.py:0 #, python-format msgid "Missing Partner" msgstr "" diff --git a/account_financial_report/i18n/hr.po b/account_financial_report/i18n/hr.po index 4b1004a..ba30b65 100644 --- a/account_financial_report/i18n/hr.po +++ b/account_financial_report/i18n/hr.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" -"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 4.14.1\n" #. module: account_financial_report diff --git a/account_financial_report/i18n/hr_HR.po b/account_financial_report/i18n/hr_HR.po index 2b69d9c..2aa93d2 100644 --- a/account_financial_report/i18n/hr_HR.po +++ b/account_financial_report/i18n/hr_HR.po @@ -17,8 +17,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" -"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" #. module: account_financial_report #: model_terms:ir.ui.view,arch_db:account_financial_report.report_aged_partner_balance_lines_header diff --git a/account_financial_report/i18n/it.po b/account_financial_report/i18n/it.po index da16b50..086920b 100644 --- a/account_financial_report/i18n/it.po +++ b/account_financial_report/i18n/it.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-06-03 12:07+0000\n" -"PO-Revision-Date: 2024-08-30 10:06+0000\n" +"PO-Revision-Date: 2024-10-22 10:06+0000\n" "Last-Translator: mymage \n" "Language-Team: \n" "Language: it\n" @@ -1195,7 +1195,8 @@ msgstr "Partner mancante" #. module: account_financial_report #: model:ir.model,name:account_financial_report.model_account_age_report_configuration_line msgid "Model to set interval lines for Age partner balance report" -msgstr "Modello per impostare righe intervalli per il resoconto partner storici" +msgstr "" +"Modello per impostare righe intervalli per il resoconto partner storici" #. module: account_financial_report #: model:ir.model,name:account_financial_report.model_account_age_report_configuration @@ -1615,7 +1616,7 @@ msgstr "Etichette" #: model:ir.model.fields,field_description:account_financial_report.field_trial_balance_report_wizard__target_move #: model:ir.model.fields,field_description:account_financial_report.field_vat_report_wizard__target_move msgid "Target Moves" -msgstr "Obiettivo" +msgstr "Movimenti obiettivo" #. module: account_financial_report #. odoo-python diff --git a/account_financial_report/i18n/sv.po b/account_financial_report/i18n/sv.po index 0cef41d..df97f0e 100644 --- a/account_financial_report/i18n/sv.po +++ b/account_financial_report/i18n/sv.po @@ -1014,8 +1014,8 @@ msgid "" "If flagged, no details will be displayed in the General Ledger report (the " "webkit one only), only centralized amounts per period." msgstr "" -"Om den är flaggad kommer inga detaljer att visas i huvudboksrapporten (" -"endast webkit), endast centraliserade belopp per period." +"Om den är flaggad kommer inga detaljer att visas i huvudboksrapporten " +"(endast webkit), endast centraliserade belopp per period." #. module: account_financial_report #: model:ir.model.fields,field_description:account_financial_report.field_account_age_report_configuration_line__inferior_limit @@ -1740,7 +1740,8 @@ msgstr "" #, python-format msgid "" "The Company in the Vat Report Wizard and in Date Range must be the same." -msgstr "Företaget i momsrapportsguiden och i datumintervallet måste vara samma." +msgstr "" +"Företaget i momsrapportsguiden och i datumintervallet måste vara samma." #. module: account_financial_report #. odoo-python diff --git a/account_financial_report/report/abstract_report_xlsx.py b/account_financial_report/report/abstract_report_xlsx.py index 8903365..f17bd6e 100644 --- a/account_financial_report/report/abstract_report_xlsx.py +++ b/account_financial_report/report/abstract_report_xlsx.py @@ -496,7 +496,7 @@ class AbstractReportXslx(models.AbstractModel): report_data["formats"]["format_header_amount"], ) elif cell_type == "amount_currency": - if my_object["currency_id"] and value: + if my_object["currency_id"]: format_amt = self._get_currency_amt_format_dict( my_object, report_data ) @@ -597,9 +597,8 @@ class AbstractReportXslx(models.AbstractModel): {"bold": True, "border": True, "bg_color": "#FFFFCC"} ) report_data["field_name"] = format_amt - format_amount = "#,##0." + ( - "0" * line_object["currency_id"].decimal_places - ) + currency = self.env["res.currency"].browse(line_object["currency_id"]) + format_amount = "#,##0." + ("0" * currency.decimal_places) format_amt.set_num_format(format_amount) return format_amt diff --git a/account_financial_report/report/aged_partner_balance.py b/account_financial_report/report/aged_partner_balance.py index b11365a..bb27bd4 100644 --- a/account_financial_report/report/aged_partner_balance.py +++ b/account_financial_report/report/aged_partner_balance.py @@ -457,8 +457,8 @@ class AgedPartnerBalanceReport(models.AbstractModel): )._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), + "doc_model": "aged.partner.balance.report.wizard", + "docs": self.env["aged.partner.balance.report.wizard"].browse(wizard_id), "company_name": company.display_name, "currency_name": company.currency_id.name, "date_at": date_at, diff --git a/account_financial_report/report/general_ledger_xlsx.py b/account_financial_report/report/general_ledger_xlsx.py index b99facf..198350e 100644 --- a/account_financial_report/report/general_ledger_xlsx.py +++ b/account_financial_report/report/general_ledger_xlsx.py @@ -142,10 +142,11 @@ class GeneralLedgerXslx(models.AbstractModel): analytic_data = res_data["analytic_data"] filter_partner_ids = res_data["filter_partner_ids"] foreign_currency = res_data["foreign_currency"] + company_currency = res_data["company_currency"] # For each account for account in general_ledger: # Write account title - total_bal_curr = account["init_bal"].get("bal_curr", 0) + total_bal_curr = 0 self.write_array_title( account["code"] + " - " + accounts_data[account["id"]]["name"], report_data, @@ -163,7 +164,7 @@ class GeneralLedgerXslx(models.AbstractModel): "initial_balance": account["init_bal"]["balance"], } ) - if foreign_currency: + if foreign_currency and account["currency_id"]: account.update( {"initial_bal_curr": account["init_bal"]["bal_curr"]} ) @@ -177,7 +178,10 @@ class GeneralLedgerXslx(models.AbstractModel): "journal": journals_data[line["journal_id"]]["code"], } ) - if line["currency_id"]: + line_currency_id = ( + line["currency_id"][0] if line["currency_id"] else False + ) + if line_currency_id and line_currency_id != company_currency.id: line.update( { "currency_name": line["currency_id"][1], @@ -207,7 +211,11 @@ class GeneralLedgerXslx(models.AbstractModel): "analytic_distribution": analytic_distribution, } ) - if foreign_currency: + if ( + foreign_currency + and line_currency_id + and line_currency_id != company_currency.id + ): total_bal_curr += line["bal_curr"] line.update({"total_bal_curr": total_bal_curr}) self.write_line_from_dict(line, report_data) @@ -219,7 +227,7 @@ class GeneralLedgerXslx(models.AbstractModel): "final_balance": account["fin_bal"]["balance"], } ) - if foreign_currency: + if foreign_currency and account["currency_id"]: account.update( { "final_bal_curr": account["fin_bal"]["bal_curr"], @@ -262,7 +270,7 @@ class GeneralLedgerXslx(models.AbstractModel): ], } ) - if foreign_currency: + if foreign_currency and account["currency_id"]: group_item.update( { "initial_bal_curr": group_item["init_bal"]["bal_curr"], @@ -278,7 +286,10 @@ class GeneralLedgerXslx(models.AbstractModel): "journal": journals_data[line["journal_id"]]["code"], } ) - if line["currency_id"]: + line_currency_id = ( + line["currency_id"][0] if line["currency_id"] else False + ) + if line_currency_id and line_currency_id != company_currency.id: line.update( { "currency_name": line["currency_id"][1], @@ -310,7 +321,11 @@ class GeneralLedgerXslx(models.AbstractModel): "analytic_distribution": analytic_distribution, } ) - if foreign_currency: + if ( + foreign_currency + and line_currency_id + and line_currency_id != company_currency.id + ): total_bal_curr += line["bal_curr"] line.update({"total_bal_curr": total_bal_curr}) self.write_line_from_dict(line, report_data) diff --git a/account_financial_report/report/open_items.py b/account_financial_report/report/open_items.py index 0401ecb..dc4b237 100644 --- a/account_financial_report/report/open_items.py +++ b/account_financial_report/report/open_items.py @@ -206,11 +206,18 @@ class OpenItemsReport(models.AbstractModel): @api.model def _order_open_items_by_date( - self, open_items_move_lines_data, show_partner_details, partners_data + self, + open_items_move_lines_data, + show_partner_details, + partners_data, + accounts_data, ): + # We need to order by account code, partner_name and date + accounts_data_sorted = sorted(accounts_data.items(), key=lambda x: x[1]["code"]) + account_ids_sorted = [account[0] for account in accounts_data_sorted] new_open_items = {} if not show_partner_details: - for acc_id in open_items_move_lines_data.keys(): + for acc_id in account_ids_sorted: new_open_items[acc_id] = {} move_lines = [] for prt_id in open_items_move_lines_data[acc_id]: @@ -219,7 +226,7 @@ class OpenItemsReport(models.AbstractModel): move_lines = sorted(move_lines, key=lambda k: (k["date"])) new_open_items[acc_id] = move_lines else: - for acc_id in open_items_move_lines_data.keys(): + for acc_id in account_ids_sorted: new_open_items[acc_id] = {} for prt_id in sorted( open_items_move_lines_data[acc_id], @@ -262,7 +269,10 @@ class OpenItemsReport(models.AbstractModel): total_amount = self._calculate_amounts(open_items_move_lines_data) open_items_move_lines_data = self._order_open_items_by_date( - open_items_move_lines_data, show_partner_details, partners_data + open_items_move_lines_data, + show_partner_details, + partners_data, + accounts_data, ) return { "doc_ids": [wizard_id], diff --git a/account_financial_report/report/templates/general_ledger.xml b/account_financial_report/report/templates/general_ledger.xml index 4a3f9e8..241b674 100644 --- a/account_financial_report/report/templates/general_ledger.xml +++ b/account_financial_report/report/templates/general_ledger.xml @@ -367,10 +367,7 @@ - +
diff --git a/account_financial_report/report/trial_balance.py b/account_financial_report/report/trial_balance.py index 52fd174..98fa007 100644 --- a/account_financial_report/report/trial_balance.py +++ b/account_financial_report/report/trial_balance.py @@ -270,6 +270,9 @@ class TrialBalanceReport(models.AbstractModel): total_amount[acc_id][prt_id]["ending_currency_balance"] += round( tb["amount_currency"], 2 ) + total_amount[acc_id][prt_id]["partner_name"] = ( + tb["partner_id"][1] if tb["partner_id"] else _("Missing Partner") + ) return total_amount @api.model @@ -293,6 +296,7 @@ class TrialBalanceReport(models.AbstractModel): total_amount[acc_id][prt_id]["debit"] = tb["debit"] total_amount[acc_id][prt_id]["balance"] = tb["balance"] total_amount[acc_id][prt_id]["initial_balance"] = 0.0 + total_amount[acc_id][prt_id]["partner_name"] = partners_data[prt_id]["name"] partners_ids.add(prt_id) for tb in tb_initial_prt: acc_id = tb["account_id"][0] @@ -305,6 +309,18 @@ class TrialBalanceReport(models.AbstractModel): total_amount = self._compute_acc_prt_amount( total_amount, tb, acc_id, prt_id, foreign_currency ) + # sort on partner_name + for acc_id, total_data in total_amount.items(): + tmp_list = sorted( + total_data.items(), + key=lambda x: isinstance(x[0], int) + and isinstance(x[1], dict) + and x[1]["partner_name"] + or x[0], + ) + total_amount[acc_id] = {} + for key, value in tmp_list: + total_amount[acc_id][key] = value return total_amount, partners_data def _remove_accounts_at_cero(self, total_amount, show_partner_details, company): diff --git a/account_financial_report/report/vat_report.py b/account_financial_report/report/vat_report.py index 11ac0e5..aded4d9 100644 --- a/account_financial_report/report/vat_report.py +++ b/account_financial_report/report/vat_report.py @@ -218,8 +218,8 @@ class VATReport(models.AbstractModel): ) return { "doc_ids": [wizard_id], - "doc_model": "open.items.report.wizard", - "docs": self.env["open.items.report.wizard"].browse(wizard_id), + "doc_model": "vat.report.wizard", + "docs": self.env["vat.report.wizard"].browse(wizard_id), "company_name": company.display_name, "currency_name": company.currency_id.name, "date_to": data["date_to"], diff --git a/account_financial_report/static/description/index.html b/account_financial_report/static/description/index.html index 2e20a23..0021d8b 100644 --- a/account_financial_report/static/description/index.html +++ b/account_financial_report/static/description/index.html @@ -367,7 +367,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:31d7d26b863b281d8b3b14da074f1370a85a46bcd649265be5eea5b4cff114e9 +!! source digest: sha256:4dd0964e1e5bccd75c7c56d0b89bd21f35a0f176bd7b9b69aaebb7db4f3bd729 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/account-financial-reporting Translate me on Weblate Try me on Runboat

This module adds a set of financial reports. They are accessible under diff --git a/mis_builder_cash_flow/i18n/es_AR.po b/mis_builder_cash_flow/i18n/es_AR.po index 55a36a2..bbad885 100644 --- a/mis_builder_cash_flow/i18n/es_AR.po +++ b/mis_builder_cash_flow/i18n/es_AR.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2021-07-09 21:49+0000\n" +"PO-Revision-Date: 2024-10-05 19:06+0000\n" "Last-Translator: Ignacio Buioli \n" "Language-Team: none\n" "Language: es_AR\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.3.2\n" +"X-Generator: Weblate 5.6.2\n" #. module: mis_builder_cash_flow #: model:mis.report.instance.period,name:mis_builder_cash_flow.mis_period_plus_1w @@ -72,6 +72,9 @@ msgid "" "legal reports, and set the rules to close a fiscal year and generate opening " "entries." msgstr "" +"El Tipo de Cuenta se utiliza con fines informativos, para generar informes " +"legales específicos de cada país y establecer las reglas para cerrar el año " +"fiscal y generar asientos de apertura." #. module: mis_builder_cash_flow #: model:mis.report.kpi,description:mis_builder_cash_flow.mis_kpi_balance diff --git a/partner_statement/i18n/it.po b/partner_statement/i18n/it.po index 03e8a02..0cbda30 100644 --- a/partner_statement/i18n/it.po +++ b/partner_statement/i18n/it.po @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-12-22 23:13+0000\n" -"PO-Revision-Date: 2024-07-30 08:58+0000\n" +"PO-Revision-Date: 2024-11-04 16:06+0000\n" "Last-Translator: mymage \n" "Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n" "Language: it\n" @@ -601,7 +601,7 @@ msgstr "Più vecchio" #: model_terms:ir.ui.view,arch_db:partner_statement.outstanding_balance #, python-format msgid "Open Amount" -msgstr "Importo aperto" +msgstr "Valore scoperto" #. module: partner_statement #. odoo-python