diff --git a/account_financial_report/README.rst b/account_financial_report/README.rst index 00c821ca..fc7866fa 100644 --- a/account_financial_report/README.rst +++ b/account_financial_report/README.rst @@ -14,13 +14,13 @@ Account Financial Reports :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--financial--reporting-lightgray.png?logo=github - :target: https://github.com/OCA/account-financial-reporting/tree/14.0/account_financial_report + :target: https://github.com/OCA/account-financial-reporting/tree/15.0/account_financial_report :alt: OCA/account-financial-reporting .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/account-financial-reporting-14-0/account-financial-reporting-14-0-account_financial_report + :target: https://translation.odoo-community.org/projects/account-financial-reporting-15-0/account-financial-reporting-15-0-account_financial_report :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/91/14.0 + :target: https://runbot.odoo-community.org/runbot/91/15.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -87,7 +87,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -154,6 +154,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/account-financial-reporting `_ project on GitHub. +This module is part of the `OCA/account-financial-reporting `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_financial_report/__manifest__.py b/account_financial_report/__manifest__.py index 20ae5815..b755a3ad 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": "14.0.2.0.1", + "version": "15.0.1.0.0", "category": "Reporting", "summary": "OCA Financial Reports", "author": "Camptocamp SA," @@ -34,7 +34,6 @@ "report/templates/trial_balance.xml", "report/templates/vat_report.xml", "view/account_view.xml", - "view/report_template.xml", "view/report_general_ledger.xml", "view/report_journal_ledger.xml", "view/report_trial_balance.xml", @@ -42,7 +41,18 @@ "view/report_aged_partner_balance.xml", "view/report_vat_report.xml", ], - "qweb": ["static/src/xml/report.xml"], + "assets": { + "web.assets_backend": [ + "account_financial_report/static/src/js/action_manager_report.js", + "account_financial_report/static/src/js/client_action.js", + ], + "web.report_assets_common": [ + "account_financial_report/static/src/js/report.js" + ], + "web.assets_qweb": [ + "account_financial_report/static/src/xml/**/*", + ], + }, "installable": True, "application": True, "auto_install": False, diff --git a/account_financial_report/i18n/account_financial_report.pot b/account_financial_report/i18n/account_financial_report.pot index b6b6b535..77eaddcd 100644 --- a/account_financial_report/i18n/account_financial_report.pot +++ b/account_financial_report/i18n/account_financial_report.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 14.0\n" +"Project-Id-Version: Odoo Server 15.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -615,29 +615,10 @@ msgid "Detail Taxes" msgstr "" #. module: account_financial_report -#: model:ir.model.fields,field_description:account_financial_report.field_account_account__display_name -#: model:ir.model.fields,field_description:account_financial_report.field_account_financial_report_abstract_wizard__display_name -#: model:ir.model.fields,field_description:account_financial_report.field_account_group__display_name -#: model:ir.model.fields,field_description:account_financial_report.field_account_move_line__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_ir_actions_report__display_name #: model:ir.model.fields,field_description:account_financial_report.field_journal_ledger_report_wizard__display_name #: model:ir.model.fields,field_description:account_financial_report.field_open_items_report_wizard__display_name -#: model:ir.model.fields,field_description:account_financial_report.field_report_a_f_r_report_aged_partner_balance_xlsx__display_name -#: model:ir.model.fields,field_description:account_financial_report.field_report_a_f_r_report_general_ledger_xlsx__display_name -#: model:ir.model.fields,field_description:account_financial_report.field_report_a_f_r_report_journal_ledger_xlsx__display_name -#: model:ir.model.fields,field_description:account_financial_report.field_report_a_f_r_report_open_items_xlsx__display_name -#: model:ir.model.fields,field_description:account_financial_report.field_report_a_f_r_report_trial_balance_xlsx__display_name -#: model:ir.model.fields,field_description:account_financial_report.field_report_a_f_r_report_vat_report_xlsx__display_name -#: model:ir.model.fields,field_description:account_financial_report.field_report_account_financial_report_abstract_report__display_name -#: model:ir.model.fields,field_description:account_financial_report.field_report_account_financial_report_abstract_report_xlsx__display_name -#: model:ir.model.fields,field_description:account_financial_report.field_report_account_financial_report_aged_partner_balance__display_name -#: model:ir.model.fields,field_description:account_financial_report.field_report_account_financial_report_general_ledger__display_name -#: model:ir.model.fields,field_description:account_financial_report.field_report_account_financial_report_journal_ledger__display_name -#: model:ir.model.fields,field_description:account_financial_report.field_report_account_financial_report_open_items__display_name -#: model:ir.model.fields,field_description:account_financial_report.field_report_account_financial_report_trial_balance__display_name -#: model:ir.model.fields,field_description:account_financial_report.field_report_account_financial_report_vat_report__display_name #: model:ir.model.fields,field_description:account_financial_report.field_trial_balance_report_wizard__display_name #: model:ir.model.fields,field_description:account_financial_report.field_vat_report_wizard__display_name msgid "Display Name" @@ -840,7 +821,7 @@ msgstr "" #: code:addons/account_financial_report/report/journal_ledger_xlsx.py:0 #: code:addons/account_financial_report/report/trial_balance_xlsx.py:0 #, python-format -msgid "From: %s To: %s" +msgid "From: %(date_from)s To: %(date_to)s" msgstr "" #. module: account_financial_report @@ -940,29 +921,10 @@ msgid "Hierarchy On" msgstr "" #. module: account_financial_report -#: model:ir.model.fields,field_description:account_financial_report.field_account_account__id -#: model:ir.model.fields,field_description:account_financial_report.field_account_financial_report_abstract_wizard__id -#: model:ir.model.fields,field_description:account_financial_report.field_account_group__id -#: model:ir.model.fields,field_description:account_financial_report.field_account_move_line__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_ir_actions_report__id #: model:ir.model.fields,field_description:account_financial_report.field_journal_ledger_report_wizard__id #: model:ir.model.fields,field_description:account_financial_report.field_open_items_report_wizard__id -#: model:ir.model.fields,field_description:account_financial_report.field_report_a_f_r_report_aged_partner_balance_xlsx__id -#: model:ir.model.fields,field_description:account_financial_report.field_report_a_f_r_report_general_ledger_xlsx__id -#: model:ir.model.fields,field_description:account_financial_report.field_report_a_f_r_report_journal_ledger_xlsx__id -#: model:ir.model.fields,field_description:account_financial_report.field_report_a_f_r_report_open_items_xlsx__id -#: model:ir.model.fields,field_description:account_financial_report.field_report_a_f_r_report_trial_balance_xlsx__id -#: model:ir.model.fields,field_description:account_financial_report.field_report_a_f_r_report_vat_report_xlsx__id -#: model:ir.model.fields,field_description:account_financial_report.field_report_account_financial_report_abstract_report__id -#: model:ir.model.fields,field_description:account_financial_report.field_report_account_financial_report_abstract_report_xlsx__id -#: model:ir.model.fields,field_description:account_financial_report.field_report_account_financial_report_aged_partner_balance__id -#: model:ir.model.fields,field_description:account_financial_report.field_report_account_financial_report_general_ledger__id -#: model:ir.model.fields,field_description:account_financial_report.field_report_account_financial_report_journal_ledger__id -#: model:ir.model.fields,field_description:account_financial_report.field_report_account_financial_report_open_items__id -#: model:ir.model.fields,field_description:account_financial_report.field_report_account_financial_report_trial_balance__id -#: model:ir.model.fields,field_description:account_financial_report.field_report_account_financial_report_vat_report__id #: model:ir.model.fields,field_description:account_financial_report.field_trial_balance_report_wizard__id #: model:ir.model.fields,field_description:account_financial_report.field_vat_report_wizard__id msgid "ID" @@ -1066,29 +1028,10 @@ msgid "Journals" msgstr "" #. module: account_financial_report -#: model:ir.model.fields,field_description:account_financial_report.field_account_account____last_update -#: model:ir.model.fields,field_description:account_financial_report.field_account_financial_report_abstract_wizard____last_update -#: model:ir.model.fields,field_description:account_financial_report.field_account_group____last_update -#: model:ir.model.fields,field_description:account_financial_report.field_account_move_line____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_ir_actions_report____last_update #: model:ir.model.fields,field_description:account_financial_report.field_journal_ledger_report_wizard____last_update #: model:ir.model.fields,field_description:account_financial_report.field_open_items_report_wizard____last_update -#: model:ir.model.fields,field_description:account_financial_report.field_report_a_f_r_report_aged_partner_balance_xlsx____last_update -#: model:ir.model.fields,field_description:account_financial_report.field_report_a_f_r_report_general_ledger_xlsx____last_update -#: model:ir.model.fields,field_description:account_financial_report.field_report_a_f_r_report_journal_ledger_xlsx____last_update -#: model:ir.model.fields,field_description:account_financial_report.field_report_a_f_r_report_open_items_xlsx____last_update -#: model:ir.model.fields,field_description:account_financial_report.field_report_a_f_r_report_trial_balance_xlsx____last_update -#: model:ir.model.fields,field_description:account_financial_report.field_report_a_f_r_report_vat_report_xlsx____last_update -#: model:ir.model.fields,field_description:account_financial_report.field_report_account_financial_report_abstract_report____last_update -#: model:ir.model.fields,field_description:account_financial_report.field_report_account_financial_report_abstract_report_xlsx____last_update -#: model:ir.model.fields,field_description:account_financial_report.field_report_account_financial_report_aged_partner_balance____last_update -#: model:ir.model.fields,field_description:account_financial_report.field_report_account_financial_report_general_ledger____last_update -#: model:ir.model.fields,field_description:account_financial_report.field_report_account_financial_report_journal_ledger____last_update -#: model:ir.model.fields,field_description:account_financial_report.field_report_account_financial_report_open_items____last_update -#: model:ir.model.fields,field_description:account_financial_report.field_report_account_financial_report_trial_balance____last_update -#: model:ir.model.fields,field_description:account_financial_report.field_report_account_financial_report_vat_report____last_update #: model:ir.model.fields,field_description:account_financial_report.field_trial_balance_report_wizard____last_update #: model:ir.model.fields,field_description:account_financial_report.field_vat_report_wizard____last_update msgid "Last Modified on" @@ -1190,6 +1133,12 @@ msgstr "" msgid "No limit" msgstr "" +#. module: account_financial_report +#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__not_only_one_unaffected_earnings_account +#: model:ir.model.fields,field_description:account_financial_report.field_trial_balance_report_wizard__not_only_one_unaffected_earnings_account +msgid "Not Only One Unaffected Earnings Account" +msgstr "" + #. module: account_financial_report #: code:addons/account_financial_report/wizard/journal_ledger_wizard.py:0 #, python-format @@ -1201,12 +1150,6 @@ msgstr "" msgid "Not due" msgstr "" -#. module: account_financial_report -#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__not_only_one_unaffected_earnings_account -#: model:ir.model.fields,field_description:account_financial_report.field_trial_balance_report_wizard__not_only_one_unaffected_earnings_account -msgid "Not only one unaffected earnings account" -msgstr "" - #. module: account_financial_report #: model:ir.ui.menu,name:account_financial_report.menu_oca_reports msgid "OCA accounting reports" @@ -1436,6 +1379,11 @@ msgstr "" msgid "Show Analytic Account" msgstr "" +#. module: account_financial_report +#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__show_analytic_tags +msgid "Show Analytic Tags" +msgstr "" + #. module: account_financial_report #: model:ir.model.fields,field_description:account_financial_report.field_journal_ledger_report_wizard__with_auto_sequence msgid "Show Auto Sequence" @@ -1455,7 +1403,6 @@ msgstr "" #. module: account_financial_report #: code:addons/account_financial_report/report/general_ledger_xlsx.py:0 -#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__show_analytic_tags #: model_terms:ir.ui.view,arch_db:account_financial_report.report_general_ledger_filters #, python-format msgid "Show analytic tags" @@ -1490,7 +1437,6 @@ msgstr "" #. module: account_financial_report #: model:ir.model.fields,help:account_financial_report.field_aged_partner_balance_report_wizard__account_code_from #: model:ir.model.fields,help:account_financial_report.field_general_ledger_report_wizard__account_code_from -#: model:ir.model.fields,help:account_financial_report.field_open_items_report_wizard__account_code_from #: model:ir.model.fields,help:account_financial_report.field_trial_balance_report_wizard__account_code_from msgid "Starting account in a range" msgstr "" diff --git a/account_financial_report/i18n/ar.po b/account_financial_report/i18n/ar.po index 01b68a88..450910f7 100644 --- a/account_financial_report/i18n/ar.po +++ b/account_financial_report/i18n/ar.po @@ -1136,7 +1136,7 @@ msgstr "??????????????" #: code:addons/account_financial_report/report/trial_balance_xlsx.py:0 #, fuzzy, python-format msgid "Level %s" -msgstr "??????????????" +msgstr "?????????????? %s" #. module: account_financial_report #: code:addons/account_financial_report/report/trial_balance_xlsx.py:0 diff --git a/account_financial_report/models/account.py b/account_financial_report/models/account.py index 21b812ea..7a56bc17 100644 --- a/account_financial_report/models/account.py +++ b/account_financial_report/models/account.py @@ -7,7 +7,6 @@ class AccountAccount(models.Model): _inherit = "account.account" centralized = fields.Boolean( - "Centralized", help="If flagged, no details will be displayed in " "the General Ledger report (the webkit one only), " "only centralized amounts per period.", diff --git a/account_financial_report/models/account_group.py b/account_financial_report/models/account_group.py index 36329adf..d6b1c6cf 100644 --- a/account_financial_report/models/account_group.py +++ b/account_financial_report/models/account_group.py @@ -10,7 +10,7 @@ class AccountGroup(models.Model): group_child_ids = fields.One2many( comodel_name="account.group", inverse_name="parent_id", string="Child Groups" ) - level = fields.Integer(string="Level", compute="_compute_level") + level = fields.Integer(compute="_compute_level", recursive=True) account_ids = fields.One2many( comodel_name="account.account", inverse_name="group_id", string="Accounts" ) @@ -20,8 +20,12 @@ class AccountGroup(models.Model): string="Compute accounts", store=True, ) - complete_name = fields.Char("Full Name", compute="_compute_complete_name") - complete_code = fields.Char("Full Code", compute="_compute_complete_code") + complete_name = fields.Char( + "Full Name", compute="_compute_complete_name", recursive=True + ) + complete_code = fields.Char( + "Full Code", compute="_compute_complete_code", recursive=True + ) @api.depends("name", "parent_id.complete_name") def _compute_complete_name(self): diff --git a/account_financial_report/models/ir_actions_report.py b/account_financial_report/models/ir_actions_report.py index 852f0440..c7e45b59 100644 --- a/account_financial_report/models/ir_actions_report.py +++ b/account_financial_report/models/ir_actions_report.py @@ -15,11 +15,11 @@ class IrActionsReport(models.Model): @api.model def _render_qweb_html(self, docids, data=None): context = self._prepare_account_financial_report_context(data) - obj = self.with_context(context) if context else self + obj = self.with_context(**context) if context else self return super(IrActionsReport, obj)._render_qweb_html(docids, data) @api.model def _render_xlsx(self, docids, data): context = self._prepare_account_financial_report_context(data) - obj = self.with_context(context) if context else self + obj = self.with_context(**context) if context else self return super(IrActionsReport, obj)._render_xlsx(docids, data) diff --git a/account_financial_report/report/aged_partner_balance_xlsx.py b/account_financial_report/report/aged_partner_balance_xlsx.py index 17c72938..1701eccc 100644 --- a/account_financial_report/report/aged_partner_balance_xlsx.py +++ b/account_financial_report/report/aged_partner_balance_xlsx.py @@ -40,7 +40,7 @@ class AgedPartnerBalanceXslx(models.AbstractModel): "width": 14, }, 3: { - "header": _(u"Age ??? 30 d."), + "header": _("Age ??? 30 d."), "field": "30_days", "field_footer_total": "30_days", "field_footer_percent": "percent_30_days", @@ -48,7 +48,7 @@ class AgedPartnerBalanceXslx(models.AbstractModel): "width": 14, }, 4: { - "header": _(u"Age ??? 60 d."), + "header": _("Age ??? 60 d."), "field": "60_days", "field_footer_total": "60_days", "field_footer_percent": "percent_60_days", @@ -56,7 +56,7 @@ class AgedPartnerBalanceXslx(models.AbstractModel): "width": 14, }, 5: { - "header": _(u"Age ??? 90 d."), + "header": _("Age ??? 90 d."), "field": "90_days", "field_footer_total": "90_days", "field_footer_percent": "percent_90_days", @@ -64,7 +64,7 @@ class AgedPartnerBalanceXslx(models.AbstractModel): "width": 14, }, 6: { - "header": _(u"Age ??? 120 d."), + "header": _("Age ??? 120 d."), "field": "120_days", "field_footer_total": "120_days", "field_footer_percent": "percent_120_days", @@ -106,7 +106,7 @@ class AgedPartnerBalanceXslx(models.AbstractModel): "width": 14, }, 9: { - "header": _(u"Age ??? 30 d."), + "header": _("Age ??? 30 d."), "field": "30_days", "field_footer_total": "30_days", "field_footer_percent": "percent_30_days", @@ -115,7 +115,7 @@ class AgedPartnerBalanceXslx(models.AbstractModel): "width": 14, }, 10: { - "header": _(u"Age ??? 60 d."), + "header": _("Age ??? 60 d."), "field": "60_days", "field_footer_total": "60_days", "field_footer_percent": "percent_60_days", @@ -124,7 +124,7 @@ class AgedPartnerBalanceXslx(models.AbstractModel): "width": 14, }, 11: { - "header": _(u"Age ??? 90 d."), + "header": _("Age ??? 90 d."), "field": "90_days", "field_footer_total": "90_days", "field_footer_percent": "percent_90_days", @@ -133,7 +133,7 @@ class AgedPartnerBalanceXslx(models.AbstractModel): "width": 14, }, 12: { - "header": _(u"Age ??? 120 d."), + "header": _("Age ??? 120 d."), "field": "120_days", "field_footer_total": "120_days", "field_footer_percent": "percent_120_days", @@ -282,7 +282,9 @@ class AgedPartnerBalanceXslx(models.AbstractModel): """ name = None label = _("Partner cumul aged balance") - super().write_ending_balance_from_dict(my_object, name, label, report_data) + return super().write_ending_balance_from_dict( + my_object, name, label, report_data + ) def write_account_footer_from_dict( self, diff --git a/account_financial_report/report/general_ledger_xlsx.py b/account_financial_report/report/general_ledger_xlsx.py index 3b97dc4f..cbafac98 100644 --- a/account_financial_report/report/general_ledger_xlsx.py +++ b/account_financial_report/report/general_ledger_xlsx.py @@ -97,7 +97,8 @@ class GeneralLedgerXslx(models.AbstractModel): return [ [ _("Date range filter"), - _("From: %s To: %s") % (report.date_from, report.date_to), + _("From: %(date_from)s To: %(date_to)s") + % ({"date_from": report.date_from, "date_to": report.date_to}), ], [ _("Target moves filter"), @@ -329,7 +330,7 @@ class GeneralLedgerXslx(models.AbstractModel): label = _("Partner Initial balance") elif "account" in my_object["type"]: label = _("Initial balance") - super(GeneralLedgerXslx, self).write_initial_balance_from_dict( + return super(GeneralLedgerXslx, self).write_initial_balance_from_dict( my_object, label, report_data ) @@ -341,6 +342,6 @@ class GeneralLedgerXslx(models.AbstractModel): elif "account" in my_object["type"]: name = my_object["code"] + " - " + my_object["name"] label = _("Ending balance") - super(GeneralLedgerXslx, self).write_ending_balance_from_dict( + return super(GeneralLedgerXslx, self).write_ending_balance_from_dict( my_object, name, label, report_data ) diff --git a/account_financial_report/report/journal_ledger.py b/account_financial_report/report/journal_ledger.py index e64a8c5c..a1533768 100644 --- a/account_financial_report/report/journal_ledger.py +++ b/account_financial_report/report/journal_ledger.py @@ -86,11 +86,11 @@ class JournalLedgerReport(models.AbstractModel): def _get_move_lines_order(self, move_ids, wizard, journal_ids): return "" - def _get_move_lines_data(self, ml, wizard, ml_taxes, auto_sequence): + def _get_move_lines_data(self, ml, wizard, ml_taxes, auto_sequence, exigible): base_debit = ( base_credit ) = tax_debit = tax_credit = base_balance = tax_balance = 0.0 - if ml.tax_exigible: + if exigible: base_debit = ml_taxes and ml.debit or 0.0 base_credit = ml_taxes and ml.credit or 0.0 base_balance = ml_taxes and ml.balance or 0.0 @@ -179,6 +179,10 @@ class JournalLedgerReport(models.AbstractModel): self._get_move_lines_domain(move_ids, wizard, journal_ids), order=self._get_move_lines_order(move_ids, wizard, journal_ids), ) + move_lines_exigible = self.env["account.move.line"].search( + self._get_move_lines_domain(move_ids, wizard, journal_ids) + + self.env["account.move.line"]._get_tax_exigible_domain(), + ) move_line_ids_taxes_data = {} if move_lines: # Get the taxes ids for the move lines @@ -221,8 +225,9 @@ class JournalLedgerReport(models.AbstractModel): and move_line_ids_taxes_data[ml.id] or {} ) + exigible = ml in move_lines_exigible Move_Lines[ml.move_id.id].append( - self._get_move_lines_data(ml, wizard, taxes, auto_sequence) + self._get_move_lines_data(ml, wizard, taxes, auto_sequence, exigible) ) account_ids_data = self._get_account_data(accounts) partner_ids_data = self._get_partner_data(partners) diff --git a/account_financial_report/report/journal_ledger_xlsx.py b/account_financial_report/report/journal_ledger_xlsx.py index e31d1709..83ada36f 100644 --- a/account_financial_report/report/journal_ledger_xlsx.py +++ b/account_financial_report/report/journal_ledger_xlsx.py @@ -134,7 +134,8 @@ class JournalLedgerXslx(models.AbstractModel): [_("Company"), report.company_id.name], [ _("Date range filter"), - _("From: %s To: %s") % (report.date_from, report.date_to), + _("From: %(date_from)s To: %(date_to)s") + % ({"date_from": report.date_from, "date_to": report.date_to}), ], [ _("Target moves filter"), diff --git a/account_financial_report/report/open_items_xlsx.py b/account_financial_report/report/open_items_xlsx.py index 4d99706e..271ac7ea 100644 --- a/account_financial_report/report/open_items_xlsx.py +++ b/account_financial_report/report/open_items_xlsx.py @@ -211,6 +211,6 @@ class OpenItemsXslx(models.AbstractModel): name = my_object["code"] + " - " + my_object["name"] my_object["residual"] = total_amount[account_id]["residual"] label = _("Ending balance") - super(OpenItemsXslx, self).write_ending_balance_from_dict( + return super(OpenItemsXslx, self).write_ending_balance_from_dict( my_object, name, label, report_data ) diff --git a/account_financial_report/report/templates/aged_partner_balance.xml b/account_financial_report/report/templates/aged_partner_balance.xml index 8a24c1cf..800e5bf5 100644 --- a/account_financial_report/report/templates/aged_partner_balance.xml +++ b/account_financial_report/report/templates/aged_partner_balance.xml @@ -17,9 +17,9 @@ Aged Partner Balance - - + - - +
@@ -264,7 +264,7 @@ res-model="account.move" view-type="form" > - +
@@ -274,7 +274,7 @@ res-model="account.journal" view-type="form" > - +
@@ -284,7 +284,7 @@ res-model="account.account" view-type="form" > - + @@ -294,7 +294,7 @@ res-model="res.partner" view-type="form" > - + @@ -304,7 +304,7 @@ res-model="account.move.line" view-type="form" > - + @@ -328,7 +328,7 @@ res-model="account.move.line" > @@ -347,7 +347,7 @@ res-model="account.move.line" > @@ -367,7 +367,7 @@ res-model="account.move.line" > @@ -387,7 +387,7 @@ res-model="account.move.line" > @@ -407,7 +407,7 @@ res-model="account.move.line" > @@ -427,7 +427,7 @@ res-model="account.move.line" > @@ -447,7 +447,7 @@ res-model="account.move.line" > diff --git a/account_financial_report/report/templates/layouts.xml b/account_financial_report/report/templates/layouts.xml index e2a3804e..453bac03 100644 --- a/account_financial_report/report/templates/layouts.xml +++ b/account_financial_report/report/templates/layouts.xml @@ -6,7 +6,7 @@ href="/account_financial_report/static/src/css/report.css" rel="stylesheet" /> - + diff --git a/account_financial_report/static/src/js/action_manager_report.js b/account_financial_report/static/src/js/action_manager_report.js index d01d41f9..380144f4 100644 --- a/account_financial_report/static/src/js/action_manager_report.js +++ b/account_financial_report/static/src/js/action_manager_report.js @@ -1,35 +1,37 @@ -odoo.define("account_financial_report.ReportActionManager", function (require) { - "use strict"; - - const ActionManager = require("web.ActionManager"); - require("web.ReportActionManager"); - - ActionManager.include({ - /** - * @override - */ - _executeReportClientAction: function (action, options) { - const MODULE_NAME = "account_financial_report"; - - // When 'report_action' is called from the backend, Odoo hardcodes the action tag. - // We have to make a hack to use our own report controller. - if (action.report_name.startsWith(`${MODULE_NAME}.`)) { - const urls = this._makeReportUrls(action); - const clientActionOptions = _.extend({}, options, { - context: action.context, - data: action.data, - display_name: action.display_name, - name: action.name, - report_file: action.report_file, - report_name: action.report_name, - report_url: urls.html, - }); - return this.doAction( - "account_financial_report.client_action", - clientActionOptions - ); - } - return this._super.apply(this, arguments); - }, - }); -}); +// Method is available here https://github.com/odoo/odoo/blob/15.0/addons/web/static/src/webclient/actions/action_service.js#L981 +// TO DO: Check for implement this action inherit +// odoo.define("account_financial_report.ReportActionManager", function (require) { +// "use strict"; +// +// const ActionManager = require("web.ActionManager"); +// require("web.ReportActionManager"); +// +// ActionManager.include({ +// /** +// * @override +// */ +// _executeReportClientAction: function (action, options) { +// const MODULE_NAME = "account_financial_report"; +// +// // When 'report_action' is called from the backend, Odoo hardcodes the action tag. +// // We have to make a hack to use our own report controller. +// if (action.report_name.startsWith(`${MODULE_NAME}.`)) { +// const urls = this._makeReportUrls(action); +// const clientActionOptions = _.extend({}, options, { +// context: action.context, +// data: action.data, +// display_name: action.display_name, +// name: action.name, +// report_file: action.report_file, +// report_name: action.report_name, +// report_url: urls.html, +// }); +// return this.doAction( +// "account_financial_report.client_action", +// clientActionOptions +// ); +// } +// return this._super.apply(this, arguments); +// }, +// }); +// }); diff --git a/account_financial_report/tests/test_general_ledger.py b/account_financial_report/tests/test_general_ledger.py index ee2ce3fa..b0e2f571 100644 --- a/account_financial_report/tests/test_general_ledger.py +++ b/account_financial_report/tests/test_general_ledger.py @@ -689,7 +689,7 @@ class TestGeneralLedgerReport(AccountTestInvoicingCommon): "active_model": "res.partner", } - wizard = self.env["general.ledger.report.wizard"].with_context(context) + wizard = self.env["general.ledger.report.wizard"].with_context(**context) self.assertEqual(wizard._default_partners(), expected_list) def test_validate_date(self): diff --git a/account_financial_report/tests/test_open_items.py b/account_financial_report/tests/test_open_items.py index 5d9901ad..3a3536bd 100644 --- a/account_financial_report/tests/test_open_items.py +++ b/account_financial_report/tests/test_open_items.py @@ -24,5 +24,5 @@ class TestOpenItems(AccountTestInvoicingCommon): "active_model": "res.partner", } - wizard = self.env["open.items.report.wizard"].with_context(context) + wizard = self.env["open.items.report.wizard"].with_context(**context) self.assertEqual(wizard._default_partners(), expected_list) diff --git a/account_financial_report/view/report_template.xml b/account_financial_report/view/report_template.xml deleted file mode 100644 index 0ce845a8..00000000 --- a/account_financial_report/view/report_template.xml +++ /dev/null @@ -1,31 +0,0 @@ - - -