[FIX] account_financial_report: Account group styling in qweb and xlsx
parent
d8db0fd5b3
commit
c8f0b24a4e
|
@ -238,10 +238,7 @@ class AbstractReportXslx(models.AbstractModel):
|
||||||
value = line_dict.get(column["field"], False)
|
value = line_dict.get(column["field"], False)
|
||||||
cell_type = column.get("type", "string")
|
cell_type = column.get("type", "string")
|
||||||
if cell_type == "string":
|
if cell_type == "string":
|
||||||
if (
|
if line_dict.get("type", "") == "group_type":
|
||||||
line_dict.get("account_group_id", False)
|
|
||||||
and line_dict["account_group_id"]
|
|
||||||
):
|
|
||||||
report_data["sheet"].write_string(
|
report_data["sheet"].write_string(
|
||||||
report_data["row_pos"],
|
report_data["row_pos"],
|
||||||
col_pos,
|
col_pos,
|
||||||
|
|
|
@ -46,6 +46,17 @@
|
||||||
<t t-foreach="trial_balance" t-as="balance">
|
<t t-foreach="trial_balance" t-as="balance">
|
||||||
<!-- Adapt -->
|
<!-- Adapt -->
|
||||||
<t t-set="style" t-value="'font-size:12px;'" />
|
<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-set="style"
|
||||||
|
t-value="style + 'font-weight: bold; color: blue;'"
|
||||||
|
/>
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
<t t-if="show_hierarchy and limit_hierarchy_level">
|
<t t-if="show_hierarchy and limit_hierarchy_level">
|
||||||
<t
|
<t
|
||||||
t-if="show_hierarchy_level > balance['level'] and (not hide_parent_hierarchy_level or (show_hierarchy_level - 1) == balance['level'])"
|
t-if="show_hierarchy_level > balance['level'] and (not hide_parent_hierarchy_level or (show_hierarchy_level - 1) == balance['level'])"
|
||||||
|
@ -203,66 +214,63 @@
|
||||||
<t t-if="not show_partner_details">
|
<t t-if="not show_partner_details">
|
||||||
<!--## Code-->
|
<!--## Code-->
|
||||||
<t t-if="balance['type'] == 'account_type'">
|
<t t-if="balance['type'] == 'account_type'">
|
||||||
<div class="act_as_cell left">
|
<div class="act_as_cell left" t-att-style="style">
|
||||||
<span
|
<span
|
||||||
t-att-res-id="balance['id']"
|
t-att-res-id="balance['id']"
|
||||||
res-model="account.account"
|
res-model="account.account"
|
||||||
view-type="form"
|
view-type="form"
|
||||||
>
|
>
|
||||||
<t t-att-style="style" t-esc="balance['code']" />
|
<t t-esc="balance['code']" />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- ## Account/Partner-->
|
<!-- ## Account/Partner-->
|
||||||
<div class="act_as_cell left">
|
<div class="act_as_cell left" t-att-style="style">
|
||||||
<span
|
<span
|
||||||
t-att-res-id="balance['id']"
|
t-att-res-id="balance['id']"
|
||||||
res-model="account.account"
|
res-model="account.account"
|
||||||
view-type="form"
|
view-type="form"
|
||||||
>
|
>
|
||||||
<t t-att-style="style" t-esc="balance['name']" />
|
<t t-esc="balance['name']" />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
<t t-if="balance['type'] == 'group_type'">
|
<t t-if="balance['type'] == 'group_type'">
|
||||||
<div class="act_as_cell left">
|
<div class="act_as_cell left" t-att-style="style">
|
||||||
<t t-set="res_model" t-value="'account.group'" />
|
<t t-set="res_model" t-value="'account.group'" />
|
||||||
<span
|
<span
|
||||||
t-att-res-id="balance['id']"
|
t-att-res-id="balance['id']"
|
||||||
res-model="account.group"
|
res-model="account.group"
|
||||||
view-type="form"
|
view-type="form"
|
||||||
>
|
>
|
||||||
<t t-att-style="style" t-raw="balance['code']" />
|
<t t-raw="balance['code']" />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="act_as_cell left">
|
<div class="act_as_cell left" t-att-style="style">
|
||||||
<t t-set="res_model" t-value="'account.group'" />
|
<t t-set="res_model" t-value="'account.group'" />
|
||||||
<span
|
<span
|
||||||
t-att-res-id="balance['id']"
|
t-att-res-id="balance['id']"
|
||||||
res-model="account.group"
|
res-model="account.group"
|
||||||
view-type="form"
|
view-type="form"
|
||||||
>
|
>
|
||||||
<t t-att-style="style" t-esc="balance['name']" />
|
<t t-esc="balance['name']" />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
</t>
|
</t>
|
||||||
<t t-if="show_partner_details">
|
<t t-if="show_partner_details">
|
||||||
<div class="act_as_cell left">
|
<div class="act_as_cell left" t-att-style="style">
|
||||||
<t t-set="res_model" t-value="'res.partner'" />
|
<t t-set="res_model" t-value="'res.partner'" />
|
||||||
<span
|
<span
|
||||||
t-att-res-id="partner_id"
|
t-att-res-id="partner_id"
|
||||||
res-model="res.partner"
|
res-model="res.partner"
|
||||||
view-type="form"
|
view-type="form"
|
||||||
>
|
>
|
||||||
<t
|
<t t-esc="partners_data[partner_id]['name']" />
|
||||||
t-att-style="style"
|
|
||||||
t-esc="partners_data[partner_id]['name']"
|
|
||||||
/>
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
<!--## Initial balance-->
|
<!--## Initial balance-->
|
||||||
<div class="act_as_cell amount">
|
<div class="act_as_cell amount" t-att-style="style">
|
||||||
<t t-if="not show_partner_details">
|
<t t-if="not show_partner_details">
|
||||||
<t t-if="balance['type'] == 'account_type'">
|
<t t-if="balance['type'] == 'account_type'">
|
||||||
<t
|
<t
|
||||||
|
@ -275,7 +283,6 @@
|
||||||
res-model="account.move.line"
|
res-model="account.move.line"
|
||||||
>
|
>
|
||||||
<t
|
<t
|
||||||
t-att-style="style"
|
|
||||||
t-esc="balance['initial_balance']"
|
t-esc="balance['initial_balance']"
|
||||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||||
/>
|
/>
|
||||||
|
@ -292,7 +299,6 @@
|
||||||
res-model="account.move.line"
|
res-model="account.move.line"
|
||||||
>
|
>
|
||||||
<t
|
<t
|
||||||
t-att-style="style"
|
|
||||||
t-raw="balance['initial_balance']"
|
t-raw="balance['initial_balance']"
|
||||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||||
/>
|
/>
|
||||||
|
@ -311,7 +317,6 @@
|
||||||
res-model="account.move.line"
|
res-model="account.move.line"
|
||||||
>
|
>
|
||||||
<t
|
<t
|
||||||
t-att-style="style"
|
|
||||||
t-raw="total_amount[account_id][partner_id]['initial_balance']"
|
t-raw="total_amount[account_id][partner_id]['initial_balance']"
|
||||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||||
/>
|
/>
|
||||||
|
@ -319,7 +324,7 @@
|
||||||
</t>
|
</t>
|
||||||
</div>
|
</div>
|
||||||
<!--## Debit-->
|
<!--## Debit-->
|
||||||
<div class="act_as_cell amount">
|
<div class="act_as_cell amount" t-att-style="style">
|
||||||
<t t-if="not show_partner_details">
|
<t t-if="not show_partner_details">
|
||||||
<t t-if="balance['type'] == 'account_type'">
|
<t t-if="balance['type'] == 'account_type'">
|
||||||
<t
|
<t
|
||||||
|
@ -334,7 +339,6 @@
|
||||||
res-model="account.move.line"
|
res-model="account.move.line"
|
||||||
>
|
>
|
||||||
<t
|
<t
|
||||||
t-att-style="style"
|
|
||||||
t-esc="balance['debit']"
|
t-esc="balance['debit']"
|
||||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||||
/>
|
/>
|
||||||
|
@ -353,7 +357,6 @@
|
||||||
res-model="account.move.line"
|
res-model="account.move.line"
|
||||||
>
|
>
|
||||||
<t
|
<t
|
||||||
t-att-style="style"
|
|
||||||
t-raw="balance['debit']"
|
t-raw="balance['debit']"
|
||||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||||
/>
|
/>
|
||||||
|
@ -374,7 +377,6 @@
|
||||||
res-model="account.move.line"
|
res-model="account.move.line"
|
||||||
>
|
>
|
||||||
<t
|
<t
|
||||||
t-att-style="style"
|
|
||||||
t-raw="total_amount[account_id][partner_id]['debit']"
|
t-raw="total_amount[account_id][partner_id]['debit']"
|
||||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||||
/>
|
/>
|
||||||
|
@ -382,7 +384,7 @@
|
||||||
</t>
|
</t>
|
||||||
</div>
|
</div>
|
||||||
<!-- <!–## Credit–>-->
|
<!-- <!–## Credit–>-->
|
||||||
<div class="act_as_cell amount">
|
<div class="act_as_cell amount" t-att-style="style">
|
||||||
<t t-if="not show_partner_details">
|
<t t-if="not show_partner_details">
|
||||||
<t t-if="balance['type'] == 'account_type'">
|
<t t-if="balance['type'] == 'account_type'">
|
||||||
<t
|
<t
|
||||||
|
@ -397,7 +399,6 @@
|
||||||
res-model="account.move.line"
|
res-model="account.move.line"
|
||||||
>
|
>
|
||||||
<t
|
<t
|
||||||
t-att-style="style"
|
|
||||||
t-esc="balance['credit']"
|
t-esc="balance['credit']"
|
||||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||||
/>
|
/>
|
||||||
|
@ -416,7 +417,6 @@
|
||||||
res-model="account.move.line"
|
res-model="account.move.line"
|
||||||
>
|
>
|
||||||
<t
|
<t
|
||||||
t-att-style="style"
|
|
||||||
t-raw="balance['credit']"
|
t-raw="balance['credit']"
|
||||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||||
/>
|
/>
|
||||||
|
@ -437,7 +437,6 @@
|
||||||
res-model="account.move.line"
|
res-model="account.move.line"
|
||||||
>
|
>
|
||||||
<t
|
<t
|
||||||
t-att-style="style"
|
|
||||||
t-raw="total_amount[account_id][partner_id]['credit']"
|
t-raw="total_amount[account_id][partner_id]['credit']"
|
||||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||||
/>
|
/>
|
||||||
|
@ -445,7 +444,7 @@
|
||||||
</t>
|
</t>
|
||||||
</div>
|
</div>
|
||||||
<!-- <!–## Period balance–>-->
|
<!-- <!–## Period balance–>-->
|
||||||
<div class="act_as_cell amount">
|
<div class="act_as_cell amount" t-att-style="style">
|
||||||
<t t-if="not show_partner_details">
|
<t t-if="not show_partner_details">
|
||||||
<t t-if="balance['type'] == 'account_type'">
|
<t t-if="balance['type'] == 'account_type'">
|
||||||
<t
|
<t
|
||||||
|
@ -460,7 +459,6 @@
|
||||||
res-model="account.move.line"
|
res-model="account.move.line"
|
||||||
>
|
>
|
||||||
<t
|
<t
|
||||||
t-att-style="style"
|
|
||||||
t-esc="balance['balance']"
|
t-esc="balance['balance']"
|
||||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||||
/>
|
/>
|
||||||
|
@ -478,7 +476,6 @@
|
||||||
res-model="account.move.line"
|
res-model="account.move.line"
|
||||||
>
|
>
|
||||||
<t
|
<t
|
||||||
t-att-style="style"
|
|
||||||
t-raw="balance['balance']"
|
t-raw="balance['balance']"
|
||||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||||
/>
|
/>
|
||||||
|
@ -499,7 +496,6 @@
|
||||||
res-model="account.move.line"
|
res-model="account.move.line"
|
||||||
>
|
>
|
||||||
<t
|
<t
|
||||||
t-att-style="style"
|
|
||||||
t-raw="total_amount[account_id][partner_id]['balance']"
|
t-raw="total_amount[account_id][partner_id]['balance']"
|
||||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||||
/>
|
/>
|
||||||
|
@ -507,7 +503,7 @@
|
||||||
</t>
|
</t>
|
||||||
</div>
|
</div>
|
||||||
<!-- <!–## Ending balance–>-->
|
<!-- <!–## Ending balance–>-->
|
||||||
<div class="act_as_cell amount">
|
<div class="act_as_cell amount" t-att-style="style">
|
||||||
<t t-if="not show_partner_details">
|
<t t-if="not show_partner_details">
|
||||||
<t t-if="balance['type'] == 'account_type'">
|
<t t-if="balance['type'] == 'account_type'">
|
||||||
<t
|
<t
|
||||||
|
@ -520,7 +516,6 @@
|
||||||
res-model="account.move.line"
|
res-model="account.move.line"
|
||||||
>
|
>
|
||||||
<t
|
<t
|
||||||
t-att-style="style"
|
|
||||||
t-esc="balance['ending_balance']"
|
t-esc="balance['ending_balance']"
|
||||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||||
/>
|
/>
|
||||||
|
@ -536,7 +531,6 @@
|
||||||
res-model="account.move.line"
|
res-model="account.move.line"
|
||||||
>
|
>
|
||||||
<t
|
<t
|
||||||
t-att-style="style"
|
|
||||||
t-raw="balance['ending_balance']"
|
t-raw="balance['ending_balance']"
|
||||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||||
/>
|
/>
|
||||||
|
@ -555,7 +549,6 @@
|
||||||
res-model="account.move.line"
|
res-model="account.move.line"
|
||||||
>
|
>
|
||||||
<t
|
<t
|
||||||
t-att-style="style"
|
|
||||||
t-esc="total_amount[account_id][partner_id]['ending_balance']"
|
t-esc="total_amount[account_id][partner_id]['ending_balance']"
|
||||||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
|
||||||
/>
|
/>
|
||||||
|
@ -567,7 +560,7 @@
|
||||||
<t t-if="balance['type'] == 'account_type'">
|
<t t-if="balance['type'] == 'account_type'">
|
||||||
<t t-if="balance['currency_id']">
|
<t t-if="balance['currency_id']">
|
||||||
<!--## Initial balance cur.-->
|
<!--## Initial balance cur.-->
|
||||||
<div class="act_as_cell amount">
|
<div class="act_as_cell amount" t-att-style="style">
|
||||||
<t
|
<t
|
||||||
t-set="domain"
|
t-set="domain"
|
||||||
t-value="[('account_id', '=', balance['id'])]"
|
t-value="[('account_id', '=', balance['id'])]"
|
||||||
|
@ -577,7 +570,6 @@
|
||||||
res-model="account.move.line"
|
res-model="account.move.line"
|
||||||
>
|
>
|
||||||
<t
|
<t
|
||||||
t-att-style="style"
|
|
||||||
t-esc="balance['initial_currency_balance']"
|
t-esc="balance['initial_currency_balance']"
|
||||||
t-options="{'widget': 'monetary', 'display_currency': balance['currency_id']}"
|
t-options="{'widget': 'monetary', 'display_currency': balance['currency_id']}"
|
||||||
/>
|
/>
|
||||||
|
@ -600,7 +592,7 @@
|
||||||
<t t-if="show_partner_details">
|
<t t-if="show_partner_details">
|
||||||
<t t-if="total_amount[account_id]['currency_id']">
|
<t t-if="total_amount[account_id]['currency_id']">
|
||||||
<t t-if="type == 'partner_type'">
|
<t t-if="type == 'partner_type'">
|
||||||
<div class="act_as_cell amount">
|
<div class="act_as_cell amount" t-att-style="style">
|
||||||
<t
|
<t
|
||||||
t-set="domain"
|
t-set="domain"
|
||||||
t-value="[('account_id', '=', account_id),
|
t-value="[('account_id', '=', account_id),
|
||||||
|
@ -611,7 +603,6 @@
|
||||||
res-model="account.move.line"
|
res-model="account.move.line"
|
||||||
>
|
>
|
||||||
<t
|
<t
|
||||||
t-att-style="style"
|
|
||||||
t-raw="total_amount[account_id][partner_id]['initial_currency_balance']"
|
t-raw="total_amount[account_id][partner_id]['initial_currency_balance']"
|
||||||
t-options="{'widget': 'monetary', 'display_currency': total_amount[account_id]['currency_id']}"
|
t-options="{'widget': 'monetary', 'display_currency': total_amount[account_id]['currency_id']}"
|
||||||
/>
|
/>
|
||||||
|
@ -624,7 +615,7 @@
|
||||||
<t t-if="not show_partner_details">
|
<t t-if="not show_partner_details">
|
||||||
<t t-if="balance['type'] == 'account_type'">
|
<t t-if="balance['type'] == 'account_type'">
|
||||||
<t t-if="balance['currency_id']">
|
<t t-if="balance['currency_id']">
|
||||||
<div class="act_as_cell amount">
|
<div class="act_as_cell amount" t-att-style="style">
|
||||||
<t
|
<t
|
||||||
t-set="domain"
|
t-set="domain"
|
||||||
t-value="[('account_id', '=', balance['id'])]"
|
t-value="[('account_id', '=', balance['id'])]"
|
||||||
|
@ -634,7 +625,6 @@
|
||||||
res-model="account.move.line"
|
res-model="account.move.line"
|
||||||
>
|
>
|
||||||
<t
|
<t
|
||||||
t-att-style="style"
|
|
||||||
t-raw="balance['ending_currency_balance']"
|
t-raw="balance['ending_currency_balance']"
|
||||||
t-options="{'widget': 'monetary', 'display_currency': balance['currency_id']}"
|
t-options="{'widget': 'monetary', 'display_currency': balance['currency_id']}"
|
||||||
/>
|
/>
|
||||||
|
@ -656,7 +646,7 @@
|
||||||
</t>
|
</t>
|
||||||
<t t-if="show_partner_details">
|
<t t-if="show_partner_details">
|
||||||
<t t-if="total_amount[account_id]['currency_id']">
|
<t t-if="total_amount[account_id]['currency_id']">
|
||||||
<div class="act_as_cell amount">
|
<div class="act_as_cell amount" t-att-style="style">
|
||||||
<t t-if="type == 'partner_type'">
|
<t t-if="type == 'partner_type'">
|
||||||
<t
|
<t
|
||||||
t-set="domain"
|
t-set="domain"
|
||||||
|
@ -668,7 +658,6 @@
|
||||||
res-model="account.move.line"
|
res-model="account.move.line"
|
||||||
>
|
>
|
||||||
<t
|
<t
|
||||||
t-att-style="style"
|
|
||||||
t-raw="total_amount[account_id][partner_id]['ending_currency_balance']"
|
t-raw="total_amount[account_id][partner_id]['ending_currency_balance']"
|
||||||
t-options="{'widget': 'monetary', 'display_currency': total_amount[account_id]['currency_id']}"
|
t-options="{'widget': 'monetary', 'display_currency': total_amount[account_id]['currency_id']}"
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue