[IMP] account_financial_report: pre-commit auto fixes
This commit is contained in:
@@ -17,13 +17,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/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|
|
||||
@@ -126,7 +126,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 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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -42,8 +42,8 @@ class AccountGroup(models.Model):
|
||||
"""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
|
||||
|
||||
@@ -610,8 +610,8 @@ class AbstractReportXslx(models.AbstractModel):
|
||||
|
||||
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
|
||||
|
||||
@@ -517,9 +517,9 @@ class GeneralLedgerReport(models.AbstractModel):
|
||||
"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"]
|
||||
|
||||
@@ -93,9 +93,9 @@ class JournalLedgerReport(models.AbstractModel):
|
||||
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
|
||||
@@ -312,11 +312,9 @@ class JournalLedgerReport(models.AbstractModel):
|
||||
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]
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -198,12 +198,8 @@
|
||||
</b>
|
||||
</div>
|
||||
<t t-if="display_currency">
|
||||
<div class="act_as_cell" name="currency_name">
|
||||
|
||||
</div>
|
||||
<div class="act_as_cell amount" name="amount_currency">
|
||||
|
||||
</div>
|
||||
<div class="act_as_cell" name="currency_name" />
|
||||
<div class="act_as_cell amount" name="amount_currency" />
|
||||
</t>
|
||||
</div>
|
||||
<div style="width: 100%" />
|
||||
@@ -443,11 +439,7 @@
|
||||
<div class="act_as_table data_table" style="width: 100%;">
|
||||
10
|
||||
<div class="act_as_row labels">
|
||||
<div
|
||||
class="act_as_cell first_column"
|
||||
name="name"
|
||||
style="width: 30.97%;"
|
||||
/>
|
||||
<div class="act_as_cell first_column" name="name" style="width: 30.97%;" />
|
||||
<div class="act_as_cell" name="description" style="width: 13.27%;" />
|
||||
<div class="act_as_cell" name="base_debit" style="width: 9.29%;">
|
||||
Debit
|
||||
|
||||
@@ -98,9 +98,7 @@
|
||||
<t t-set="style" t-value="'font-size:12px;'" />
|
||||
<!-- Different style for account group -->
|
||||
<t t-if="show_hierarchy">
|
||||
<t
|
||||
t-if="balance['type'] == 'group_type'"
|
||||
>
|
||||
<t t-if="balance['type'] == 'group_type'">
|
||||
<t
|
||||
t-set="style"
|
||||
t-value="style + 'font-weight: bold; color: blue;'"
|
||||
|
||||
@@ -266,9 +266,9 @@ class TrialBalanceReport(models.AbstractModel):
|
||||
tb2 = tb["group_by_data"][gb_key]
|
||||
if "group_by_data" in total_amount[acc_id]:
|
||||
if gb_key not in total_amount[acc_id]["group_by_data"]:
|
||||
total_amount[acc_id]["group_by_data"][
|
||||
gb_key
|
||||
] = self._prepare_total_amount(tb2, foreign_currency)
|
||||
total_amount[acc_id]["group_by_data"][gb_key] = (
|
||||
self._prepare_total_amount(tb2, foreign_currency)
|
||||
)
|
||||
else:
|
||||
total_amount[acc_id]["group_by_data"][gb_key][
|
||||
"initial_balance"
|
||||
@@ -598,19 +598,19 @@ class TrialBalanceReport(models.AbstractModel):
|
||||
total_amount[unaffected_id]["ending_balance"] += pl_initial_balance
|
||||
total_amount[unaffected_id]["initial_balance"] += pl_initial_balance
|
||||
if foreign_currency:
|
||||
total_amount[unaffected_id][
|
||||
"ending_currency_balance"
|
||||
] += pl_initial_currency_balance
|
||||
total_amount[unaffected_id][
|
||||
"initial_currency_balance"
|
||||
] += pl_initial_currency_balance
|
||||
total_amount[unaffected_id]["ending_currency_balance"] += (
|
||||
pl_initial_currency_balance
|
||||
)
|
||||
total_amount[unaffected_id]["initial_currency_balance"] += (
|
||||
pl_initial_currency_balance
|
||||
)
|
||||
if grouped_by:
|
||||
total_amount[unaffected_id]["group_by_data"][0][
|
||||
"ending_balance"
|
||||
] = total_amount[unaffected_id]["ending_balance"]
|
||||
total_amount[unaffected_id]["group_by_data"][0][
|
||||
"initial_balance"
|
||||
] = total_amount[unaffected_id]["initial_balance"]
|
||||
total_amount[unaffected_id]["group_by_data"][0]["ending_balance"] = (
|
||||
total_amount[unaffected_id]["ending_balance"]
|
||||
)
|
||||
total_amount[unaffected_id]["group_by_data"][0]["initial_balance"] = (
|
||||
total_amount[unaffected_id]["initial_balance"]
|
||||
)
|
||||
if foreign_currency:
|
||||
total_amount[unaffected_id]["group_by_data"][0][
|
||||
"ending_currency_balance"
|
||||
@@ -833,12 +833,12 @@ class TrialBalanceReport(models.AbstractModel):
|
||||
"ending_balance"
|
||||
]
|
||||
if foreign_currency:
|
||||
groups_data[group_id][
|
||||
"initial_currency_balance"
|
||||
] += total_amount[acc_id]["initial_currency_balance"]
|
||||
groups_data[group_id][
|
||||
"ending_currency_balance"
|
||||
] += total_amount[acc_id]["ending_currency_balance"]
|
||||
groups_data[group_id]["initial_currency_balance"] += (
|
||||
total_amount[acc_id]["initial_currency_balance"]
|
||||
)
|
||||
groups_data[group_id]["ending_currency_balance"] += (
|
||||
total_amount[acc_id]["ending_currency_balance"]
|
||||
)
|
||||
return groups_data
|
||||
|
||||
def _get_report_values(self, docids, data):
|
||||
|
||||
@@ -369,7 +369,7 @@ ul.auto-toc {
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:4d56adc35fff26b88020bebb3cd0fcb302b7c7c7483639925cfc4f9b850d8ac4
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external image-reference" 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 image-reference" 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 image-reference" href="https://github.com/OCA/account-financial-reporting/tree/17.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 image-reference" href="https://translation.odoo-community.org/projects/account-financial-reporting-17-0/account-financial-reporting-17-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 image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/account-financial-reporting&target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p><a class="reference external image-reference" 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 image-reference" 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 image-reference" href="https://github.com/OCA/account-financial-reporting/tree/18.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 image-reference" href="https://translation.odoo-community.org/projects/account-financial-reporting-18-0/account-financial-reporting-18-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 image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/account-financial-reporting&target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-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">
|
||||
@@ -472,7 +472,7 @@ levels</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 to smash 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:%2017.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:%2018.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">
|
||||
@@ -538,7 +538,7 @@ in 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/17.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/18.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>
|
||||
|
||||
Reference in New Issue
Block a user