[MIG] account_financial_report: Migration to 15.0

This commit is contained in:
Jasmin Solanki
2022-03-16 17:30:32 +05:30
committed by chaule97
parent dba1ed1287
commit 2b45a4c62f
27 changed files with 137 additions and 220 deletions

View File

@@ -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 <https://github.com/OCA/account-financial-reporting/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 <https://github.com/OCA/account-financial-reporting/issues/new?body=module:%20account_financial_report%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/account-financial-reporting/issues/new?body=module:%20account_financial_report%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
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 <https://github.com/OCA/account-financial-reporting/tree/14.0/account_financial_report>`_ project on GitHub.
This module is part of the `OCA/account-financial-reporting <https://github.com/OCA/account-financial-reporting/tree/15.0/account_financial_report>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@@ -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,

View File

@@ -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 ""

View File

@@ -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

View File

@@ -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.",

View File

@@ -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):

View File

@@ -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)

View File

@@ -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,

View File

@@ -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
)

View File

@@ -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)

View File

@@ -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"),

View File

@@ -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
)

View File

@@ -17,9 +17,9 @@
<!-- Defines global variables used by internal layout -->
<t t-set="title">
Aged Partner Balance -
<t t-raw="company_name" />
<t t-out="company_name" />
-
<t t-raw="currency_name" />
<t t-out="currency_name" />
</t>
<div class="page">
<div class="row">
@@ -264,7 +264,7 @@
res-model="account.move"
view-type="form"
>
<t t-raw="line['entry']" />
<t t-out="line['entry']" />
</span>
</div>
<!--## journal-->
@@ -274,7 +274,7 @@
res-model="account.journal"
view-type="form"
>
<t t-raw="line['journal']" />
<t t-out="line['journal']" />
</span>
</div>
<!--## account code-->
@@ -284,7 +284,7 @@
res-model="account.account"
view-type="form"
>
<t t-raw="line['account']" />
<t t-out="line['account']" />
</span>
</div>
<!--## partner-->
@@ -294,7 +294,7 @@
res-model="res.partner"
view-type="form"
>
<t t-raw="line['partner']" />
<t t-out="line['partner']" />
</span>
</div>
<!--## ref - label-->
@@ -304,7 +304,7 @@
res-model="account.move.line"
view-type="form"
>
<t t-raw="line['ref_label']" />
<t t-out="line['ref_label']" />
</span>
</div>
<!--## date_due-->
@@ -328,7 +328,7 @@
res-model="account.move.line"
>
<t
t-raw="line['residual']"
t-out="line['residual']"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
/>
</span>
@@ -347,7 +347,7 @@
res-model="account.move.line"
>
<t
t-raw="line['current']"
t-out="line['current']"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
/>
</span>
@@ -367,7 +367,7 @@
res-model="account.move.line"
>
<t
t-raw="line['30_days']"
t-out="line['30_days']"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
/>
</span>
@@ -387,7 +387,7 @@
res-model="account.move.line"
>
<t
t-raw="line['60_days']"
t-out="line['60_days']"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
/>
</span>
@@ -407,7 +407,7 @@
res-model="account.move.line"
>
<t
t-raw="line['90_days']"
t-out="line['90_days']"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
/>
</span>
@@ -427,7 +427,7 @@
res-model="account.move.line"
>
<t
t-raw="line['120_days']"
t-out="line['120_days']"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
/>
</span>
@@ -447,7 +447,7 @@
res-model="account.move.line"
>
<t
t-raw="line['older']"
t-out="line['older']"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
/>
</span>

View File

@@ -6,7 +6,7 @@
href="/account_financial_report/static/src/css/report.css"
rel="stylesheet"
/>
<t t-raw="0" />
<t t-out="0" />
</div>
<div class="footer">
<div class="row">

View File

@@ -106,8 +106,7 @@
t-set="domain"
t-value="[('tax_ids', 'in', tax['id']),
('date', '&gt;=', date_from),
('date', '&lt;=', date_to),
('tax_exigible', '=', True)]"
('date', '&lt;=', date_to)]+request.env['account.move.line']._get_tax_exigible_domain()"
/>
<span
t-att-domain="domain"
@@ -125,8 +124,7 @@
t-set="domain"
t-value="[('tax_line_id', '=', tax['id']),
('date', '&gt;=', date_from),
('date', '&lt;=', date_to),
('tax_exigible', '=', True)]"
('date', '&lt;=', date_to)]+request.env['account.move.line']._get_tax_exigible_domain()"
/>
<span
t-att-domain="domain"

View File

@@ -144,7 +144,8 @@ class TrialBalanceXslx(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"),
@@ -162,7 +163,7 @@ class TrialBalanceXslx(models.AbstractModel):
],
[
_("Limit hierarchy levels"),
_("Level %s" % report.show_hierarchy_level)
_("Level %s") % (report.show_hierarchy_level)
if report.limit_hierarchy_level
else _("No limit"),
],
@@ -277,7 +278,7 @@ class TrialBalanceXslx(models.AbstractModel):
line_object.currency_id = line_object.report_account_id.currency_id
elif type_object == "account":
line_object.currency_id = line_object.currency_id
super(TrialBalanceXslx, self).write_line(line_object, report_data)
return super(TrialBalanceXslx, self).write_line(line_object, report_data)
def write_account_footer(self, account, name_value, report_data):
"""Specific function to write account footer for Trial Balance"""

View File

@@ -36,8 +36,7 @@ class VATReport(models.AbstractModel):
("date", ">=", date_from),
("date", "<=", date_to),
("tax_line_id", "!=", False),
("tax_exigible", "=", True),
]
] + self.env["account.move.line"]._get_tax_exigible_domain()
if only_posted_moves:
domain += [("move_id.state", "=", "posted")]
else:
@@ -50,8 +49,7 @@ class VATReport(models.AbstractModel):
("company_id", "=", company_id),
("date", ">=", date_from),
("date", "<=", date_to),
("tax_exigible", "=", True),
]
] + self.env["account.move.line"]._get_tax_exigible_domain()
if only_posted_moves:
domain += [("move_id.state", "=", "posted")]
else:

View File

@@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/account-financial-reporting/tree/14.0/account_financial_report"><img alt="OCA/account-financial-reporting" src="https://img.shields.io/badge/github-OCA%2Faccount--financial--reporting-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/account-financial-reporting-14-0/account-financial-reporting-14-0-account_financial_report"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/91/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/account-financial-reporting/tree/15.0/account_financial_report"><img alt="OCA/account-financial-reporting" src="https://img.shields.io/badge/github-OCA%2Faccount--financial--reporting-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/account-financial-reporting-15-0/account-financial-reporting-15-0-account_financial_report"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/91/15.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module adds a set of financial reports. They are accessible under
Invoicing / Reporting / OCA accounting reports.</p>
<ul class="simple">
@@ -444,7 +444,7 @@ in ???Target Moves??? field in a wizard</li>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-financial-reporting/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/account-financial-reporting/issues/new?body=module:%20account_financial_report%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/account-financial-reporting/issues/new?body=module:%20account_financial_report%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
@@ -504,7 +504,7 @@ April 2016.</p>
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-financial-reporting/tree/14.0/account_financial_report">OCA/account-financial-reporting</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-financial-reporting/tree/15.0/account_financial_report">OCA/account-financial-reporting</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>

View File

@@ -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);
// },
// });
// });

View File

@@ -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):

View File

@@ -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)

View File

@@ -1,31 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template
id="account_financial_report_assets_backend"
name="account_financial_report assets_backend"
inherit_id="web.assets_backend"
>
<xpath expr="." position="inside">
<script
type="text/javascript"
src="/account_financial_report/static/src/js/action_manager_report.js"
/>
<script
type="text/javascript"
src="/account_financial_report/static/src/js/client_action.js"
/>
</xpath>
</template>
<template
id="account_financial_report_assets_common"
name="account_financial_report report_assets"
inherit_id="web.report_assets_common"
>
<xpath expr="." position="inside">
<script
type="text/javascript"
src="/account_financial_report/static/src/js/report.js"
/>
</xpath>
</template>
</odoo>

View File

@@ -14,7 +14,7 @@ class AgedPartnerBalanceWizard(models.TransientModel):
_inherit = "account_financial_report_abstract_wizard"
date_at = fields.Date(required=True, default=fields.Date.context_today)
date_from = fields.Date(string="Date From")
date_from = fields.Date()
target_move = fields.Selection(
[("posted", "All Posted Entries"), ("all", "All Entries")],
string="Target Moves",
@@ -34,12 +34,10 @@ class AgedPartnerBalanceWizard(models.TransientModel):
account_code_from = fields.Many2one(
comodel_name="account.account",
string="Account Code From",
help="Starting account in a range",
)
account_code_to = fields.Many2one(
comodel_name="account.account",
string="Account Code To",
help="Ending account in a range",
)

View File

@@ -43,9 +43,7 @@ class GeneralLedgerReportWizard(models.TransientModel):
"If partners are filtered, "
"debits and credits totals will not match the trial balance.",
)
show_analytic_tags = fields.Boolean(
string="Show analytic tags",
)
show_analytic_tags = fields.Boolean()
receivable_accounts_only = fields.Boolean()
payable_accounts_only = fields.Boolean()
partner_ids = fields.Many2many(
@@ -63,9 +61,7 @@ class GeneralLedgerReportWizard(models.TransientModel):
comodel_name="account.analytic.account", string="Filter cost centers"
)
not_only_one_unaffected_earnings_account = fields.Boolean(
readonly=True, string="Not only one unaffected earnings account"
)
not_only_one_unaffected_earnings_account = fields.Boolean(readonly=True)
foreign_currency = fields.Boolean(
string="Show foreign currency",
help="Display foreign currency for move lines, unless "
@@ -75,16 +71,13 @@ class GeneralLedgerReportWizard(models.TransientModel):
)
account_code_from = fields.Many2one(
comodel_name="account.account",
string="Account Code From",
help="Starting account in a range",
)
account_code_to = fields.Many2one(
comodel_name="account.account",
string="Account Code To",
help="Ending account in a range",
)
show_partner_details = fields.Boolean(
string="Show Partner Details",
default=True,
)
show_cost_center = fields.Boolean(

View File

@@ -14,7 +14,7 @@ class OpenItemsReportWizard(models.TransientModel):
_inherit = "account_financial_report_abstract_wizard"
date_at = fields.Date(required=True, default=fields.Date.context_today)
date_from = fields.Date(string="Date From")
date_from = fields.Date()
target_move = fields.Selection(
[("posted", "All Posted Entries"), ("all", "All Entries")],
string="Target Moves",
@@ -50,17 +50,13 @@ class OpenItemsReportWizard(models.TransientModel):
default=lambda self: self._default_foreign_currency(),
)
show_partner_details = fields.Boolean(
string="Show Partner Details",
default=True,
)
account_code_from = fields.Many2one(
comodel_name="account.account",
string="Account Code From",
help="Starting account in a range",
)
account_code_to = fields.Many2one(
comodel_name="account.account",
string="Account Code To",
help="Ending account in a range",
)

View File

@@ -32,7 +32,6 @@ class TrialBalanceReportWizard(models.TransientModel):
("relation", "Child Accounts"),
("none", "No hierarchy"),
],
string="Hierarchy On",
required=True,
default="none",
help="""Computed Accounts: Use when the account group have codes
@@ -62,9 +61,7 @@ class TrialBalanceReportWizard(models.TransientModel):
partner_ids = fields.Many2many(comodel_name="res.partner", string="Filter partners")
journal_ids = fields.Many2many(comodel_name="account.journal")
not_only_one_unaffected_earnings_account = fields.Boolean(
readonly=True, string="Not only one unaffected earnings account"
)
not_only_one_unaffected_earnings_account = fields.Boolean(readonly=True)
foreign_currency = fields.Boolean(
string="Show foreign currency",
@@ -74,12 +71,10 @@ class TrialBalanceReportWizard(models.TransientModel):
)
account_code_from = fields.Many2one(
comodel_name="account.account",
string="Account Code From",
help="Starting account in a range",
)
account_code_to = fields.Many2one(
comodel_name="account.account",
string="Account Code To",
help="Ending account in a range",
)

View File

@@ -15,7 +15,6 @@ class VATReportWizard(models.TransientModel):
date_to = fields.Date("End Date", required=True)
based_on = fields.Selection(
[("taxtags", "Tax Tags"), ("taxgroups", "Tax Groups")],
string="Based On",
required=True,
default="taxtags",
)