Skip to content

Commit

Permalink
[IMP] account_financial_report: pre-commit auto fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
chaule97 committed Dec 4, 2024
1 parent 0e6c436 commit 409df00
Show file tree
Hide file tree
Showing 16 changed files with 260 additions and 270 deletions.
122 changes: 61 additions & 61 deletions account_financial_report/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,26 @@ 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/17.0/account_financial_report
:target: https://github.com/OCA/account-financial-reporting/tree/18.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-17-0/account-financial-reporting-17-0-account_financial_report
:target: https://translation.odoo-community.org/projects/account-financial-reporting-18-0/account-financial-reporting-18-0-account_financial_report
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-financial-reporting&target_branch=17.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-financial-reporting&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module adds a set of financial reports. They are accessible under
Invoicing / Reporting / OCA accounting reports.

- General ledger
- Trial Balance
- Open Items
- Aged Partner Balance
- VAT Report
- Journal Ledger
- General ledger
- Trial Balance
- Open Items
- Aged Partner Balance
- VAT Report
- Journal Ledger

Currently General ledger, Trial Balance and Open Items are fully
compatible with a foreign currency set up in account in order to display
Expand Down Expand Up @@ -90,43 +90,43 @@ per company in:
Known issues / Roadmap
======================

- 'VAT Report' is valid only for cases where it's met that for each Tax
defined: all the "Account tags" of all the 'Repartition for Invoices'
or 'Repartition for Credit Notes' are different.
- 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
- 'VAT Report' is valid only for cases where it's met that for each Tax
defined: all the "Account tags" of all the 'Repartition for Invoices'
or 'Repartition for Credit Notes' are different.
- 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

Changelog
=========

11.0.2.5.0 (2019-04-26)
-----------------------

- In the Trial Balance you have an option to hide parent hierarchy
levels
- In the Trial Balance you have an option to hide parent hierarchy
levels

11.0.2.4.1 (2019-01-08)
-----------------------

- Handle better multicompany behaviour
- Improve how title appears in the reports
- Improve performance in General Ledger
- Handle better multicompany behaviour
- Improve how title appears in the reports
- Improve performance in General Ledger

11.0.2.3.1 (2018-11-29)
-----------------------

- In the Trial Balance you can apply a filter by hierarchy levels
- In the General Ledger you can apply a filter by Analytic Tag
- In the Journal Ledger the field 'Journal' is now optional
- In the Trial Balance you can apply a filter by hierarchy levels
- In the General Ledger you can apply a filter by Analytic Tag
- In the Journal Ledger the field 'Journal' is now optional

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 to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/account-financial-reporting/issues/new?body=module:%20account_financial_report%0Aversion:%2017.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:%2018.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.

Expand All @@ -144,42 +144,42 @@ Authors
Contributors
------------

- Jordi Ballester <[email protected]>
- Yannick Vaucher <[email protected]>
- Simone Orsi <[email protected]>
- Leonardo Pistone <[email protected]>
- Damien Crier <[email protected]>
- Andrea Stirpe <[email protected]>
- Thomas Rehn <[email protected]>
- Andrea Gallina <[email protected]>
- Robert Rottermann <[email protected]>
- Ciro Urselli <[email protected]>
- Francesco Apruzzese <[email protected]>
- Lorenzo Battistini <https://github.com/eLBati>
- Julien Coux <[email protected]>
- Akim Juillerat <[email protected]>
- Alexis de Lattre <[email protected]>
- Mihai Fekete <[email protected]>
- Miquel Ra??ch <[email protected]>
- Joan Sisquella <[email protected]>
- `Tecnativa <https://www.tecnativa.com>`__:

- Pedro M. Baeza
- Sergio Teruel
- Ernesto Tejeda
- Jo??o Marques
- Alexandre D. D??az
- V??ctor Mart??nez
- Carolina Fernandez

- `Sygel <https://www.sygel.es>`__:

- Harald Panten
- Valentin Vinagre

- Lois Rilo <[email protected]>
- Saran Lim. <[email protected]>
- Omar Casti??eira <[email protected]>
- Jordi Ballester <[email protected]>
- Yannick Vaucher <[email protected]>
- Simone Orsi <[email protected]>
- Leonardo Pistone <[email protected]>
- Damien Crier <[email protected]>
- Andrea Stirpe <[email protected]>
- Thomas Rehn <[email protected]>
- Andrea Gallina <[email protected]>
- Robert Rottermann <[email protected]>
- Ciro Urselli <[email protected]>
- Francesco Apruzzese <[email protected]>
- Lorenzo Battistini <https://github.com/eLBati>
- Julien Coux <[email protected]>
- Akim Juillerat <[email protected]>
- Alexis de Lattre <[email protected]>
- Mihai Fekete <[email protected]>
- Miquel Ra??ch <[email protected]>
- Joan Sisquella <[email protected]>
- `Tecnativa <https://www.tecnativa.com>`__:

- Pedro M. Baeza
- Sergio Teruel
- Ernesto Tejeda
- Jo??o Marques
- Alexandre D. D??az
- V??ctor Mart??nez
- Carolina Fernandez

- `Sygel <https://www.sygel.es>`__:

- Harald Panten
- Valentin Vinagre

- Lois Rilo <[email protected]>
- Saran Lim. <[email protected]>
- Omar Casti??eira <[email protected]>

Much of the work in this module was done at a sprint in Sorrento, Italy
in April 2016.
Expand All @@ -197,6 +197,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/17.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/18.0/account_financial_report>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 2 additions & 2 deletions account_financial_report/models/account_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def _compute_complete_code(self):
"""Forms complete code of location from parent location to child location."""
for group in self:
if group.parent_id.complete_code:
group.complete_code = "{}/{}".format(
group.parent_id.complete_code, group.code_prefix_start
group.complete_code = (
f"{group.parent_id.complete_code}/{group.code_prefix_start}"
)
else:
group.complete_code = group.code_prefix_start
Expand Down
4 changes: 2 additions & 2 deletions account_financial_report/report/abstract_report_xlsx.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,8 +610,8 @@ def _generate_report_content(self, workbook, report, data, report_data):

def _get_report_complete_name(self, report, prefix, data=None):
if report.company_id:
suffix = " - {} - {}".format(
report.company_id.name, report.company_id.currency_id.name
suffix = (
f" - {report.company_id.name} - {report.company_id.currency_id.name}"
)
return prefix + suffix
return prefix
Expand Down
6 changes: 3 additions & 3 deletions account_financial_report/report/general_ledger.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,9 +517,9 @@ def _get_period_ml_data(
"balance"
]
if foreign_currency:
gen_ld_data[acc_id][item_id]["fin_bal"][
"bal_curr"
] += move_line["amount_currency"]
gen_ld_data[acc_id][item_id]["fin_bal"]["bal_curr"] += (
move_line["amount_currency"]
)
else:
gen_ld_data[acc_id][ml_id] = self._get_move_line_data(move_line)
gen_ld_data[acc_id]["fin_bal"]["credit"] += move_line["credit"]
Expand Down
14 changes: 6 additions & 8 deletions account_financial_report/report/journal_ledger.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ def _get_move_lines_order(self, move_ids, wizard, journal_ids):
return "move_id"

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
base_debit = base_credit = tax_debit = tax_credit = base_balance = (
tax_balance
) = 0.0
if exigible:
base_debit = ml_taxes and ml.debit or 0.0
base_credit = ml_taxes and ml.credit or 0.0
Expand Down Expand Up @@ -312,11 +312,9 @@ def _get_report_values(self, docids, data):
if key not in journal_moves_data.keys():
journal_moves_data[key] = []
journal_moves_data[key] += list(items)
move_lines_data = (
account_ids_data
) = (
partner_ids_data
) = currency_ids_data = tax_line_ids_data = move_line_ids_taxes_data = {}
move_lines_data = account_ids_data = partner_ids_data = currency_ids_data = (
tax_line_ids_data
) = move_line_ids_taxes_data = {}
if move_ids:
move_lines = self._get_move_lines(move_ids, wizard, journal_ids)
move_lines_data = move_lines[1]
Expand Down
56 changes: 29 additions & 27 deletions account_financial_report/report/templates/aged_partner_balance.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@
</t>
<!--## dynamic columns-->
<t t-foreach="age_partner_config.line_ids" t-as="column_dynamic">
<div class="act_as_cell"><span t-out="column_dynamic.name" /></div>
<div class="act_as_cell">
<span t-out="column_dynamic.name" />
</div>
</t>
</div>
</div>
Expand All @@ -149,9 +151,9 @@
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
/>
</div>
<!--## current-->
<!--## current-->
<div class="act_as_cell amount">
<span
<span
t-esc="partner['current']"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
/>
Expand Down Expand Up @@ -357,26 +359,26 @@
/>
</span>
</div>
<!--## current-->
<div class="act_as_cell amount">
<t t-if="line['current'] == 0">
<span
<!--## current-->
<div class="act_as_cell amount">
<t t-if="line['current'] == 0">
<span
t-esc="line['current']"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
/>
</t>
<t t-else="">
<span
</t>
<t t-else="">
<span
domain="[('id', 'in', (line['line_rec'] | line['line_rec'].matched_debit_ids.mapped('debit_move_id') | line['line_rec'].matched_credit_ids.mapped('credit_move_id')).ids)]"
res-model="account.move.line"
>
<t
<t
t-out="line['current']"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
/>
</span>
</t>
</div>
</span>
</t>
</div>
<t t-if="not age_partner_config">
<!--## age_30_days-->
<div class="act_as_cell amount">
Expand Down Expand Up @@ -522,13 +524,13 @@
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
/>
</div>
<!--## current-->
<div class="act_as_cell amount" style="width: 6.00%;">
<span
<!--## current-->
<div class="act_as_cell amount" style="width: 6.00%;">
<span
t-esc="partner_cumul_line['current']"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
/>
</div>
</div>
<t t-if="not age_partner_config">
<!--## age_30_days-->
<div class="act_as_cell amount" style="width: 6.00%;">
Expand Down Expand Up @@ -591,13 +593,13 @@
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
/>
</div>
<!--## current-->
<div class="act_as_cell amount" style="width: 9.64%;">
<span
<!--## current-->
<div class="act_as_cell amount" style="width: 9.64%;">
<span
t-esc="account['current']"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
/>
</div>
</div>
<t t-if="not age_partner_config">
<!--## age_30_days-->
<div class="act_as_cell amount" style="width: 9.64%;">
Expand Down Expand Up @@ -656,13 +658,13 @@
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
/>
</div>
<!--## current-->
<div class="act_as_cell amount" style="width: 6.00%">
<span
<!--## current-->
<div class="act_as_cell amount" style="width: 6.00%">
<span
t-esc="account['current']"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
/>
</div>
</div>
<t t-if="not age_partner_config">
<!--## age_30_days-->
<div class="act_as_cell amount" style="width: 6.00%">
Expand Down Expand Up @@ -802,7 +804,7 @@
%
</div>
</t>
</t>
</t>
</div>
</div>
</template>
Expand Down
4 changes: 2 additions & 2 deletions account_financial_report/report/templates/general_ledger.xml
Original file line number Diff line number Diff line change
Expand Up @@ -492,8 +492,8 @@
t-if="int(line['analytic_distribution'][analytic_id]) &lt; 100"
>
<t
t-out="int(line['analytic_distribution'][analytic_id])"
/>%
t-out="int(line['analytic_distribution'][analytic_id])"
/>%
</t>
</span>
</div>
Expand Down
Loading

0 comments on commit 409df00

Please sign in to comment.