[IMP] account_financial_report: Completes the functionality of hide_parent_hierarchy_level field and fix the level of accounts for trial balance
parent
43fa9cae82
commit
3577ef4900
|
@ -138,6 +138,8 @@ Contributors
|
|||
* Valentin Vinagre
|
||||
|
||||
* Lois Rilo <lois.rilo@forgeflow.com>
|
||||
* Saran Lim. <saranl@ecosoft.co.th>
|
||||
* Omar Castiñeira <omar@comunitea.com>
|
||||
|
||||
Much of the work in this module was done at a sprint in Sorrento, Italy in
|
||||
April 2016.
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
{
|
||||
"name": "Account Financial Reports",
|
||||
"version": "15.0.2.2.0",
|
||||
"version": "15.0.2.3.0",
|
||||
"category": "Reporting",
|
||||
"summary": "OCA Financial Reports",
|
||||
"author": "Camptocamp SA,"
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
* Valentin Vinagre
|
||||
|
||||
* Lois Rilo <lois.rilo@forgeflow.com>
|
||||
* Saran Lim. <saranl@ecosoft.co.th>
|
||||
* Omar Castiñeira <omar@comunitea.com>
|
||||
|
||||
Much of the work in this module was done at a sprint in Sorrento, Italy in
|
||||
April 2016.
|
||||
|
|
|
@ -46,15 +46,13 @@
|
|||
<t t-foreach="trial_balance" t-as="balance">
|
||||
<!-- Adapt -->
|
||||
<t t-set="style" t-value="'font-size:12px;'" />
|
||||
<t t-if="show_hierarchy">
|
||||
<t t-if="limit_hierarchy_level">
|
||||
<t t-if="show_hierarchy and limit_hierarchy_level">
|
||||
<t
|
||||
t-if="show_hierarchy_level > balance['level'] and (not hide_parent_hierarchy_level or (show_hierarchy_level - 1) == balance['level'])"
|
||||
>
|
||||
<t
|
||||
t-if="show_hierarchy_level > balance['level'] and (not hide_parent_hierarchy_level or (show_hierarchy_level - 1) == balance['level'])"
|
||||
>
|
||||
<t
|
||||
t-call="account_financial_report.report_trial_balance_line"
|
||||
/>
|
||||
</t>
|
||||
t-call="account_financial_report.report_trial_balance_line"
|
||||
/>
|
||||
</t>
|
||||
</t>
|
||||
<t t-else="">
|
||||
|
|
|
@ -544,7 +544,9 @@ class TrialBalanceReport(models.AbstractModel):
|
|||
account_group_relation = {}
|
||||
for account in accounts:
|
||||
accounts_data[account.id]["complete_code"] = (
|
||||
account.group_id.complete_code if account.group_id.id else ""
|
||||
account.group_id.complete_code + " / " + account.code
|
||||
if account.group_id.id
|
||||
else ""
|
||||
)
|
||||
if account.group_id.id:
|
||||
if account.group_id.id not in account_group_relation.keys():
|
||||
|
|
|
@ -188,6 +188,7 @@ class TrialBalanceXslx(models.AbstractModel):
|
|||
show_hierarchy_level = res_data["show_hierarchy_level"]
|
||||
foreign_currency = res_data["foreign_currency"]
|
||||
limit_hierarchy_level = res_data["limit_hierarchy_level"]
|
||||
hide_parent_hierarchy_level = res_data["hide_parent_hierarchy_level"]
|
||||
if not show_partner_details:
|
||||
# Display array header for account lines
|
||||
self.write_array_header(report_data)
|
||||
|
@ -195,12 +196,12 @@ class TrialBalanceXslx(models.AbstractModel):
|
|||
# For each account
|
||||
if not show_partner_details:
|
||||
for balance in trial_balance:
|
||||
if show_hierarchy:
|
||||
if limit_hierarchy_level:
|
||||
if show_hierarchy_level > balance["level"]:
|
||||
# Display account lines
|
||||
self.write_line_from_dict(balance, report_data)
|
||||
else:
|
||||
if show_hierarchy and limit_hierarchy_level:
|
||||
if show_hierarchy_level > balance["level"] and (
|
||||
not hide_parent_hierarchy_level
|
||||
or (show_hierarchy_level - 1) == balance["level"]
|
||||
):
|
||||
# Display account lines
|
||||
self.write_line_from_dict(balance, report_data)
|
||||
else:
|
||||
self.write_line_from_dict(balance, report_data)
|
||||
|
|
|
@ -494,6 +494,8 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
|||
</ul>
|
||||
</li>
|
||||
<li>Lois Rilo <<a class="reference external" href="mailto:lois.rilo@forgeflow.com">lois.rilo@forgeflow.com</a>></li>
|
||||
<li>Saran Lim. <<a class="reference external" href="mailto:saranl@ecosoft.co.th">saranl@ecosoft.co.th</a>></li>
|
||||
<li>Omar Castiñeira <<a class="reference external" href="mailto:omar@comunitea.com">omar@comunitea.com</a>></li>
|
||||
</ul>
|
||||
<p>Much of the work in this module was done at a sprint in Sorrento, Italy in
|
||||
April 2016.</p>
|
||||
|
|
Loading…
Reference in New Issue