Update links in report, add account group file, update trial balance with hierarchy.

Update indentation, remove empty lines from header.

Update test.

Update pylint.

Remove company_id on computing accounts, since account.group is not a company based model, filtering accounts is done on trial balance report.

Update account variables.

Improve condition in padding on accounts.

Add option to print hierarchy based on defined accounts/computed accounts.

Add VAT report, hierarchy from tax tags ans taxes.

Fix pylint, xlsx report generation header.

Update code to select code_prefix or name.

Update code to select code_prefix or name.

Update code to select code_prefix or name.

Fix domain in base amounts in vat report.

Change trial balance code_prefix or name.

Update trail balance, add tests for vat report.

Update pylint, amounts as monetary, many2one option on generation excels.

Update pulint.

Add VAT Report in readme.

Add VAT Report in readme.

Update array_agg.

Update array_agg.

Update array_agg.

Add option in VAT Report to be printed on Tax Tags - Tax Groups.

Add widget to hierarchy_on on trial balance.
This commit is contained in:
Fekete Mihai
2018-03-03 17:44:53 +02:00
committed by chaule97
parent feedc2aad2
commit 2547753dcc
44 changed files with 2739 additions and 347 deletions

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="account_financial_report.report_aged_partner_balance_qweb">
<template id="report_aged_partner_balance_qweb">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="account_financial_report.internal_layout">
@@ -11,7 +11,7 @@
</t>
</template>
<template id="account_financial_report.report_aged_partner_balance_base">
<template id="report_aged_partner_balance_base">
<!-- Saved flag fields into variables, used to define columns display -->
<t t-set="show_move_line_details" t-value="o.show_move_line_details"/>
@@ -81,7 +81,7 @@
</div>
</template>
<template id="account_financial_report.report_aged_partner_balance_filters">
<template id="report_aged_partner_balance_filters">
<div class="act_as_table data_table" style="width: 100%;">
<div class="act_as_row labels">
<div class="act_as_cell">Date at filter</div>
@@ -99,7 +99,7 @@
</div>
</template>
<template id="account_financial_report.report_aged_partner_balance_lines_header">
<template id="report_aged_partner_balance_lines_header">
<!-- Display table headers for lines -->
<div class="act_as_thead">
<div class="act_as_row labels">
@@ -123,7 +123,7 @@
</div>
</template>
<template id="account_financial_report.report_aged_partner_balance_lines">
<template id="report_aged_partner_balance_lines">
<!-- Display each lines -->
<t t-foreach="partner.line_ids" t-as="line">
<!-- # lines -->
@@ -134,78 +134,78 @@
</div>
<!--## amount_residual-->
<div class="act_as_cell amount">
<span t-field="line.amount_residual"/>
<span t-field="line.amount_residual" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## current-->
<div class="act_as_cell amount">
<span t-field="line.current"/>
<span t-field="line.current" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## age_30_days-->
<div class="act_as_cell amount">
<span t-field="line.age_30_days"/>
<span t-field="line.age_30_days" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## age_60_days-->
<div class="act_as_cell amount">
<span t-field="line.age_60_days"/>
<span t-field="line.age_60_days" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## age_90_days-->
<div class="act_as_cell amount">
<span t-field="line.age_90_days"/>
<span t-field="line.age_90_days" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## age_120_days-->
<div class="act_as_cell amount">
<span t-field="line.age_120_days"/>
<span t-field="line.age_120_days" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## older-->
<div class="act_as_cell amount">
<span t-field="line.older"/>
<span t-field="line.older" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
</div>
</t>
</template>
<template id="account_financial_report.report_aged_partner_balance_move_lines">
<template id="report_aged_partner_balance_move_lines">
<div class="act_as_table data_table" style="width: 100%;">
<!-- Display table headers for move lines -->
<div class="act_as_thead">
<div class="act_as_row labels">
<!--## date-->
<div class="act_as_cell first_column" style="width: 5.26%;">
<div class="act_as_cell first_column" style="width: 6.00%;">
Date</div>
<!--## move-->
<div class="act_as_cell" style="width: 8.77%;">Entry</div>
<div class="act_as_cell" style="width: 7.00%;">Entry</div>
<!--## journal-->
<div class="act_as_cell" style="width: 5.01%;">Journal</div>
<div class="act_as_cell" style="width: 5.00%;">Journal</div>
<!--## account code-->
<div class="act_as_cell" style="width: 6.88%;">Account</div>
<div class="act_as_cell" style="width: 6.00%;">Account</div>
<!--## partner-->
<div class="act_as_cell" style="width: 10.52%;">Partner
<div class="act_as_cell" style="width: 10.50%;">Partner
</div>
<!--## ref - label-->
<div class="act_as_cell" style="width: 19.23%;">Ref -
<div class="act_as_cell" style="width: 18.00%;">Ref -
Label</div>
<!--## date_due-->
<div class="act_as_cell" style="width: 6.26%;">Due
<div class="act_as_cell" style="width: 6.00%;">Due
date</div>
<!--## amount_residual-->
<div class="act_as_cell" style="width: 6.19%;">Residual
<div class="act_as_cell" style="width: 6.00%;">Residual
</div>
<!--## current-->
<div class="act_as_cell" style="width: 6.19%;">Current</div>
<div class="act_as_cell" style="width: 6.00%;">Current</div>
<!--## age_30_days-->
<div class="act_as_cell" style="width: 6.19%;">Age ??? 30
<div class="act_as_cell" style="width: 6.00%;">Age ??? 30
d.</div>
<!--## age_60_days-->
<div class="act_as_cell" style="width: 6.19%;">Age ??? 60
<div class="act_as_cell" style="width: 6.00%;">Age ??? 60
d.</div>
<!--## age_90_days-->
<div class="act_as_cell" style="width: 6.19%;">Age ??? 90
<div class="act_as_cell" style="width: 6.00%;">Age ??? 90
d.</div>
<!--## age_120_days-->
<div class="act_as_cell" style="width: 6.19%;">Age ??? 120
<div class="act_as_cell" style="width: 6.00%;">Age ??? 120
d.</div>
<!--## older-->
<div class="act_as_cell" style="width: 6.19%;">Older</div>
<div class="act_as_cell" style="width: 6.00%;">Older</div>
</div>
</div>
<!-- Display each move lines -->
@@ -214,174 +214,288 @@
<div class="act_as_row lines">
<!--## date-->
<div class="act_as_cell left">
<span t-field="line.date"/>
<span>
<a t-att-data-active-id="line.move_line_id.id"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action"
style="color: black;">
<t t-raw="line.date"/></a>
</span>
</div>
<!--## move-->
<div class="act_as_cell left">
<span t-field="line.entry"/>
<span>
<a t-att-data-active-id="line.move_line_id.move_id.id"
t-att-data-res-model="'account.move'"
class="o_account_financial_reports_web_action"
style="color: black;">
<t t-raw="line.entry"/></a>
</span>
</div>
<!--## journal-->
<div class="act_as_cell left">
<span t-field="line.journal"/>
<span>
<a t-att-data-active-id="line.move_line_id.move_id.journal_id.id"
t-att-data-res-model="'account.journal'"
class="o_account_financial_reports_web_action"
style="color: black;">
<t t-raw="line.journal"/></a>
</span>
</div>
<!--## account code-->
<div class="act_as_cell left">
<span t-field="line.account"/>
<span>
<a t-att-data-active-id="line.move_line_id.account_id.id"
t-att-data-res-model="'account.account'"
class="o_account_financial_reports_web_action"
style="color: black;">
<t t-raw="line.account"/></a>
</span>
</div>
<!--## partner-->
<div class="act_as_cell left">
<span t-field="line.partner"/>
<span>
<a t-att-data-active-id="line.move_line_id.partner_id.id"
t-att-data-res-model="'res.partner'"
class="o_account_financial_reports_web_action"
style="color: black;">
<t t-raw="line.partner"/></a>
</span>
</div>
<!--## ref - label-->
<div class="act_as_cell left">
<span t-field="line.label"/>
<span>
<a t-att-data-active-id="line.move_line_id.id"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action"
style="color: black;">
<t t-raw="line.label"/></a>
</span>
</div>
<!--## date_due-->
<div class="act_as_cell left">
<span t-field="line.date_due"/>
<span>
<a t-att-data-active-id="line.move_line_id.id"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action"
style="color: black;">
<t t-raw="line.date_due"/></a>
</span>
</div>
<!--## amount_residual-->
<div class="act_as_cell amount">
<span t-field="line.amount_residual"/>
<span>
<a t-att-data-domain="[('id', 'in', list(filter(lambda x: x != 'False', [str(line.move_line_id.id), str(line.move_line_id.matched_debit_ids.debit_move_id.id), str(line.move_line_id.matched_credit_ids.credit_move_id.id)])))]"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
style="color: black;">
<t t-raw="line.amount_residual" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</div>
<!--## current-->
<div class="act_as_cell amount">
<span t-field="line.current"/>
<t t-if="line.current != 0">
<span>
<a t-att-data-domain="[('id', 'in', list(filter(lambda x: x != 'False', [str(line.move_line_id.id), str(line.move_line_id.matched_debit_ids.debit_move_id.id), str(line.move_line_id.matched_credit_ids.credit_move_id.id)])))]"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
style="color: black;">
<t t-raw="line.current" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</t>
<t t-if="line.current == 0">
<span t-field="line.current" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</t>
</div>
<!--## age_30_days-->
<div class="act_as_cell amount">
<span t-field="line.age_30_days"/>
<t t-if="line.age_30_days != 0">
<span>
<a t-att-data-domain="[('id', 'in', list(filter(lambda x: x != 'False', [str(line.move_line_id.id), str(line.move_line_id.matched_debit_ids.debit_move_id.id), str(line.move_line_id.matched_credit_ids.credit_move_id.id)])))]"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
style="color: black;">
<t t-raw="line.age_30_days" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</t>
<t t-if="line.age_30_days == 0">
<span t-field="line.age_30_days" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</t>
</div>
<!--## age_60_days-->
<div class="act_as_cell amount">
<span t-field="line.age_60_days"/>
<t t-if="line.age_60_days != 0">
<span>
<a t-att-data-domain="[('id', 'in', list(filter(lambda x: x != 'False', [str(line.move_line_id.id), str(line.move_line_id.matched_debit_ids.debit_move_id.id), str(line.move_line_id.matched_credit_ids.credit_move_id.id)])))]"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
style="color: black;">
<t t-raw="line.age_60_days" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</t>
<t t-if="line.age_60_days == 0">
<span t-field="line.age_60_days" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</t>
</div>
<!--## age_90_days-->
<div class="act_as_cell amount">
<span t-field="line.age_90_days"/>
<t t-if="line.age_90_days != 0">
<span>
<a t-att-data-domain="[('id', 'in', list(filter(lambda x: x != 'False', [str(line.move_line_id.id), str(line.move_line_id.matched_debit_ids.debit_move_id.id), str(line.move_line_id.matched_credit_ids.credit_move_id.id)])))]"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
style="color: black;">
<t t-raw="line.age_90_days" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</t>
<t t-if="line.age_90_days == 0">
<span t-field="line.age_90_days" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</t>
</div>
<!--## age_120_days-->
<div class="act_as_cell amount">
<span t-field="line.age_120_days"/>
<t t-if="line.age_120_days != 0">
<span>
<a t-att-data-domain="[('id', 'in', list(filter(lambda x: x != 'False', [str(line.move_line_id.id), str(line.move_line_id.matched_debit_ids.debit_move_id.id), str(line.move_line_id.matched_credit_ids.credit_move_id.id)])))]"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
style="color: black;">
<t t-raw="line.age_120_days" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</t>
<t t-if="line.age_120_days == 0">
<span t-field="line.age_120_days" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</t>
</div>
<!--## older-->
<div class="act_as_cell amount">
<span t-field="line.older"/>
<t t-if="line.older != 0">
<span>
<a t-att-data-domain="[('id', 'in', list(filter(lambda x: x != 'False', [str(line.move_line_id.id), str(line.move_line_id.matched_debit_ids.debit_move_id.id), str(line.move_line_id.matched_credit_ids.credit_move_id.id)])))]"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
style="color: black;">
<t t-raw="line.older" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</t>
<t t-if="line.older == 0">
<span t-field="line.older" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</t>
</div>
</div>
</t>
</div>
</template>
<template id="account_financial_report.report_aged_partner_balance_partner_ending_cumul">
<template id="report_aged_partner_balance_partner_ending_cumul">
<!-- Display ending balance line for partner -->
<div class="act_as_table list_table" style="width: 100%;">
<div class="act_as_row labels" style="font-weight: bold;">
<div class="act_as_row lines" style="font-weight: bold;">
<!--## date-->
<div class="act_as_cell right" style="width: 51.41%;">Partner
<div class="act_as_cell right" style="width: 52.00%;">Partner
cumul aged balance</div>
<!--## date_due-->
<div class="act_as_cell" style="width: 5.26%;"/>
<div class="act_as_cell" style="width: 6.00%;"/>
<!--## amount_residual-->
<div class="act_as_cell amount" style="width: 6.19%;">
<span t-field="partner_cumul_line.amount_residual"/>
<div class="act_as_cell amount" style="width: 6.00%;">
<span t-field="partner_cumul_line.amount_residual" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## current-->
<div class="act_as_cell amount" style="width: 6.19%;">
<span t-field="partner_cumul_line.current"/>
<div class="act_as_cell amount" style="width: 6.00%;">
<span t-field="partner_cumul_line.current" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## age_30_days-->
<div class="act_as_cell amount" style="width: 6.19%;">
<span t-field="partner_cumul_line.age_30_days"/>
<div class="act_as_cell amount" style="width: 6.00%;">
<span t-field="partner_cumul_line.age_30_days" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## age_60_days-->
<div class="act_as_cell amount" style="width: 6.19%;">
<span t-field="partner_cumul_line.age_60_days"/>
<div class="act_as_cell amount" style="width: 6.00%;">
<span t-field="partner_cumul_line.age_60_days" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## age_90_days-->
<div class="act_as_cell amount" style="width: 6.19%;">
<span t-field="partner_cumul_line.age_90_days"/>
<div class="act_as_cell amount" style="width: 6.00%;">
<span t-field="partner_cumul_line.age_90_days" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## age_120_days-->
<div class="act_as_cell amount" style="width: 6.19%;">
<span t-field="partner_cumul_line.age_120_days"/>
<div class="act_as_cell amount" style="width: 6.00%;">
<span t-field="partner_cumul_line.age_120_days" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## older-->
<div class="act_as_cell amount" style="width: 6.19%;">
<span t-field="partner_cumul_line.older"/>
<div class="act_as_cell amount" style="width: 6.00%;">
<span t-field="partner_cumul_line.older" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
</div>
</div>
</template>
<template id="account_financial_report.report_aged_partner_balance_account_ending_cumul">
<template id="report_aged_partner_balance_account_ending_cumul">
<!-- Display ending balance line for account -->
<div class="act_as_table list_table" style="width: 100%;">
<div class="act_as_row labels" style="font-weight: bold;">
<div class="act_as_row lines" style="font-weight: bold;">
<t t-if="not show_move_line_details">
<!--## total-->
<div class="act_as_cell right" style="width: 32.52%;">Total</div>
<!--## amount_residual-->
<div class="act_as_cell amount" style="width: 9.64%;">
<span t-field="account.cumul_amount_residual"/>
<span t-field="account.cumul_amount_residual" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## current-->
<div class="act_as_cell amount" style="width: 9.64%;">
<span t-field="account.cumul_current"/>
<span t-field="account.cumul_current" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## age_30_days-->
<div class="act_as_cell amount" style="width: 9.64%;">
<span t-field="account.cumul_age_30_days"/>
<span t-field="account.cumul_age_30_days" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## age_60_days-->
<div class="act_as_cell amount" style="width: 9.64%;">
<span t-field="account.cumul_age_60_days"/>
<span t-field="account.cumul_age_60_days" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## age_90_days-->
<div class="act_as_cell amount" style="width: 9.64%;">
<span t-field="account.cumul_age_90_days"/>
<span t-field="account.cumul_age_90_days" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## age_120_days-->
<div class="act_as_cell amount" style="width: 9.64%;">
<span t-field="account.cumul_age_120_days"/>
<span t-field="account.cumul_age_120_days" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## older-->
<div class="act_as_cell amount" style="width: 9.64%;">
<span t-field="account.cumul_older"/>
<span t-field="account.cumul_older" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
</t>
<t t-if="show_move_line_details">
<!--## total-->
<div class="act_as_cell right" style="width: 51.41%;">Total</div>
<div class="act_as_cell right" style="width: 52.00%;">Total</div>
<!--## date_due-->
<div class="act_as_cell" style="width: 5.26%;"/>
<div class="act_as_cell" style="width: 6.00%;"/>
<!--## amount_residual-->
<div class="act_as_cell amount" style="width: 6.19%">
<span t-field="account.cumul_amount_residual"/>
<div class="act_as_cell amount" style="width: 6.00%">
<span t-field="account.cumul_amount_residual" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## current-->
<div class="act_as_cell amount" style="width: 6.19%">
<span t-field="account.cumul_current"/>
<div class="act_as_cell amount" style="width: 6.00%">
<span t-field="account.cumul_current" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## age_30_days-->
<div class="act_as_cell amount" style="width: 6.19%">
<span t-field="account.cumul_age_30_days"/>
<div class="act_as_cell amount" style="width: 6.00%">
<span t-field="account.cumul_age_30_days" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## age_60_days-->
<div class="act_as_cell amount" style="width: 6.19%">
<span t-field="account.cumul_age_60_days"/>
<div class="act_as_cell amount" style="width: 6.00%">
<span t-field="account.cumul_age_60_days" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## age_90_days-->
<div class="act_as_cell amount" style="width: 6.19%">
<span t-field="account.cumul_age_90_days"/>
<div class="act_as_cell amount" style="width: 6.00%">
<span t-field="account.cumul_age_90_days" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## age_120_days-->
<div class="act_as_cell amount" style="width: 6.19%">
<span t-field="account.cumul_age_120_days"/>
<div class="act_as_cell amount" style="width: 6.00%">
<span t-field="account.cumul_age_120_days" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## older-->
<div class="act_as_cell amount" style="width: 6.19%">
<span t-field="account.cumul_older"/>
<div class="act_as_cell amount" style="width: 6.00%">
<span t-field="account.cumul_older" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
</t>
</div>
@@ -414,29 +528,29 @@
</t>
<t t-if="show_move_line_details">
<!--## total-->
<div class="act_as_cell right" style="width: 51.41%;">
<div class="act_as_cell right" style="width: 52.00%;">
Percents</div>
<!--## date_due-->
<div class="act_as_cell" style="width: 5.26%;"/>
<div class="act_as_cell" style="width: 6.00%;"/>
<!--## amount_residual-->
<div class="act_as_cell amount" style="width: 6.19%"/>
<div class="act_as_cell amount" style="width: 6.00%"/>
<!--## current-->
<div class="act_as_cell amount" style="width: 6.19%"><span t-field="account.percent_current"/>%
<div class="act_as_cell amount" style="width: 6.00%"><span t-field="account.percent_current"/>%
</div>
<!--## age_30_days-->
<div class="act_as_cell amount" style="width: 6.19%"><span t-field="account.percent_age_30_days"/>%
<div class="act_as_cell amount" style="width: 6.00%"><span t-field="account.percent_age_30_days"/>%
</div>
<!--## age_60_days-->
<div class="act_as_cell amount" style="width: 6.19%"><span t-field="account.percent_age_60_days"/>%
<div class="act_as_cell amount" style="width: 6.00%"><span t-field="account.percent_age_60_days"/>%
</div>
<!--## age_90_days-->
<div class="act_as_cell amount" style="width: 6.19%"><span t-field="account.percent_age_90_days"/>%
<div class="act_as_cell amount" style="width: 6.00%"><span t-field="account.percent_age_90_days"/>%
</div>
<!--## age_120_days-->
<div class="act_as_cell amount" style="width: 6.19%"><span t-field="account.percent_age_120_days"/>%
<div class="act_as_cell amount" style="width: 6.00%"><span t-field="account.percent_age_120_days"/>%
</div>
<!--## older-->
<div class="act_as_cell amount" style="width: 6.19%"><span t-field="account.percent_older"/>%
<div class="act_as_cell amount" style="width: 6.00%"><span t-field="account.percent_older"/>%
</div>
</t>
</div>

View File

@@ -34,6 +34,7 @@
<t t-if="not account.partner_ids">
<!-- Display account move lines without partner regroup -->
<t t-set="type" t-value='"account_type"'/>
<t t-call="account_financial_report.report_general_ledger_lines">
<t t-set="account_or_partner_object" t-value="account"/>
</t>
@@ -42,6 +43,7 @@
<t t-if="account.partner_ids">
<!-- Display account partners -->
<t t-foreach="account.partner_ids" t-as="partner">
<t t-set="type" t-value='"partner_type"'/>
<div class="page_break">
<!-- Display partner header -->
<div class="act_as_caption account_title">
@@ -116,7 +118,7 @@
<!--## account code-->
<div class="act_as_cell" style="width: 5.19%;">Account</div>
<!--## partner-->
<div class="act_as_cell" style="width: 10%;">Partner
<div class="act_as_cell" style="width: 13.11%;">Partner
</div>
<!--## ref - label-->
<div class="act_as_cell" style="width: 25%;">Ref -
@@ -134,8 +136,6 @@
<div class="act_as_cell amount" style="width: 6.57%;">Credit</div>
<!--## balance cumulated-->
<div class="act_as_cell amount" style="width: 6.57%;">Cumul. Bal.</div>
<!--## currency_name-->
<div class="act_as_cell" style="width: 3.11%;">Cur.</div>
<!--## amount_currency-->
<div class="act_as_cell amount" style="width: 6.57%;">Amount cur.</div>
</div>
@@ -162,13 +162,93 @@
<!--## matching_number-->
<div class="act_as_cell"/>
<!--## debit-->
<div class="act_as_cell amount"><span t-field="account_or_partner_object.initial_debit"/></div>
<div class="act_as_cell amount">
<t t-if="type == 'account_type'">
<t t-set="domain"
t-value="[('account_id', '=', account_or_partner_object.account_id.id),
('date', '&lt;', o.date_from),
('debit', '&lt;&gt;', 0)]"/>
<span>
<a t-att-data-domain="domain"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
style="color: black;">
<t t-raw="account_or_partner_object.initial_debit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</t>
<t t-if="type == 'partner_type'">
<t t-set="domain"
t-value="[('account_id', '=', account_or_partner_object.report_account_id.account_id.id),
('partner_id', '=', account_or_partner_object.partner_id.id),
('date', '&lt;', o.date_from),
('debit', '&lt;&gt;', 0)]"/>
<span>
<a t-att-data-domain="domain"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
style="color: black;">
<t t-raw="account_or_partner_object.initial_debit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</t>
</div>
<!--## credit-->
<div class="act_as_cell amount"><span t-field="account_or_partner_object.initial_credit"/></div>
<div class="act_as_cell amount">
<t t-if="type == 'account_type'">
<t t-set="domain"
t-value="[('account_id', '=', account_or_partner_object.account_id.id),
('date', '&lt;', o.date_from),
('credit', '&lt;&gt;', 0)]"/>
<span>
<a t-att-data-domain="domain"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
style="color: black;">
<t t-raw="account_or_partner_object.initial_credit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</t>
<t t-if="type == 'partner_type'">
<t t-set="domain"
t-value="[('account_id', '=', account_or_partner_object.report_account_id.account_id.id),
('partner_id', '=', account_or_partner_object.partner_id.id),
('date', '&lt;', o.date_from),
('credit', '&lt;&gt;', 0)]"/>
<span>
<a t-att-data-domain="domain"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
style="color: black;">
<t t-raw="account_or_partner_object.initial_credit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</t>
</div>
<!--## balance cumulated-->
<div class="act_as_cell amount"><span t-field="account_or_partner_object.initial_balance"/></div>
<!--## currency_name-->
<div class="act_as_cell"/>
<div class="act_as_cell amount">
<t t-if="type == 'account_type'">
<t t-set="domain"
t-value="[('account_id', '=', account_or_partner_object.account_id.id),
('date', '&lt;', o.date_from)]"/>
<span>
<a t-att-data-domain="domain"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
style="color: black;">
<t t-raw="account_or_partner_object.initial_balance" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</t>
<t t-if="type == 'partner_type'">
<t t-set="domain"
t-value="[('account_id', '=', account_or_partner_object.report_account_id.account_id.id),
('partner_id', '=', account_or_partner_object.partner_id.id),
('date', '&lt;', o.date_from)]"/>
<span>
<a t-att-data-domain="domain"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
style="color: black;">
<t t-raw="account_or_partner_object.initial_balance" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</t>
</div>
<!--## amount_currency-->
<div class="act_as_cell"/>
</div>
@@ -178,7 +258,16 @@
<!-- # lines or centralized lines -->
<div class="act_as_row lines">
<!--## date-->
<div class="act_as_cell left"><span t-field="line.date"/></div>
<div class="act_as_cell left">
<t t-set="res_model" t-value="'account.move.line'"/>
<span>
<a t-att-data-active-id="line.move_line_id.id"
t-att-data-res-model="res_model"
class="o_account_financial_reports_web_action"
style="color: black;">
<t t-raw="line.date"/></a>
</span>
</div>
<!--## move-->
<div class="act_as_cell left">
<t t-set="res_model" t-value="'account.move'"/>
@@ -191,9 +280,27 @@
</span>
</div>
<!--## journal-->
<div class="act_as_cell left"><span t-field="line.journal"/></div>
<div class="act_as_cell left">
<t t-set="res_model" t-value="'account.journal'"/>
<span>
<a t-att-data-active-id="line.move_line_id.move_id.journal_id.id"
t-att-data-res-model="res_model"
class="o_account_financial_reports_web_action"
style="color: black;">
<t t-raw="line.journal"/></a>
</span>
</div>
<!--## account code-->
<div class="act_as_cell left"><span t-field="line.account"/></div>
<div class="act_as_cell left">
<t t-set="res_model" t-value="'account.account'"/>
<span>
<a t-att-data-active-id="line.move_line_id.account_id.id"
t-att-data-res-model="res_model"
class="o_account_financial_reports_web_action"
style="color: black;">
<t t-raw="line.account"/></a>
</span>
</div>
<!--## partner-->
<div class="act_as_cell left">
<t t-set="res_model" t-value="'res.partner'"/>
@@ -205,26 +312,85 @@
</span>
</div>
<!--## ref - label-->
<div class="act_as_cell left"><span t-field="line.label"/></div>
<t t-if="show_cost_center">
<!--## cost_center-->
<div class="act_as_cell left"><span t-field="line.cost_center"/></div>
<div class="act_as_cell left">
<t t-set="res_model" t-value="'account.move.line'"/>
<span>
<a t-att-data-active-id="line.move_line_id.id"
t-att-data-res-model="res_model"
class="o_account_financial_reports_web_action"
style="color: black;">
<t t-raw="line.label"/></a>
</span>
</div>
<!--## cost_center-->
<t t-if="show_cost_center">
<div class="act_as_cell left">
<t t-set="res_model" t-value="'account_analytic_account'"/>
<span t-if="line.cost_center">
<a t-att-data-active-id="line.move_line_id.analytic_account_id.id"
t-att-data-res-model="res_model"
class="o_account_financial_reports_web_action"
style="color: black;"><t t-raw="line.cost_center"/></a>
</span>
</div>
</t>
<!--## matching_number-->
<div class="act_as_cell"><span t-field="line.matching_number"/></div>
<div class="act_as_cell">
<t t-set="res_model" t-value="'account_full_reconcile'"/>
<span t-if="line.matching_number">
<a t-att-data-active-id="line.move_line_id.full_reconcile_id.id"
t-att-data-res-model="res_model"
class="o_account_financial_reports_web_action"
style="color: black;"><t t-raw="line.matching_number"/></a>
</span>
</div>
<!--## debit-->
<div class="act_as_cell amount"><span t-field="line.debit"/></div>
<div class="act_as_cell amount">
<t t-set="res_model" t-value="'account.move.line'"/>
<span>
<a t-att-data-active-id="line.move_line_id.id"
t-att-data-res-model="res_model"
class="o_account_financial_reports_web_action"
style="color: black;">
<t t-raw="line.debit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</div>
<!--## credit-->
<div class="act_as_cell amount"><span t-field="line.credit"/></div>
<div class="act_as_cell amount">
<t t-set="res_model" t-value="'account.move.line'"/>
<span>
<a t-att-data-active-id="line.move_line_id.id"
t-att-data-res-model="res_model"
class="o_account_financial_reports_web_action"
style="color: black;">
<t t-raw="line.credit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</div>
<!--## balance cumulated-->
<div class="act_as_cell amount"><span t-field="line.cumul_balance"/></div>
<!--## currency_name-->
<div class="act_as_cell"><span t-field="line.currency_name"/></div>
<t t-if="line.currency_name">
<div class="act_as_cell amount">
<t t-set="res_model" t-value="'account.move.line'"/>
<span>
<a t-att-data-active-id="line.move_line_id.id"
t-att-data-res-model="res_model"
class="o_account_financial_reports_web_action"
style="color: black;">
<t t-raw="line.cumul_balance" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</div>
<t t-if="line.currency_id">
<!--## amount_currency-->
<div class="act_as_cell amount"><span t-field="line.amount_currency"/></div>
<div class="act_as_cell amount">
<t t-set="res_model" t-value="'account.move.line'"/>
<span>
<a t-att-data-active-id="line.move_line_id.id"
t-att-data-res-model="res_model"
class="o_account_financial_reports_web_action"
style="color: black;">
<t t-raw="line.amount_currency" t-options="{'widget': 'monetary', 'display_currency': line.currency_id}"/></a>
</span>
</div>
</t>
<t t-if="not line.currency_name">
<t t-if="not line.currency_id">
<!--## amount_currency-->
<div class="act_as_cell"/>
</t>
@@ -240,32 +406,35 @@
<!--## date-->
<t t-if='type == "account_type"'>
<div class="act_as_cell first_column"
style="width: 33.33%;"><span
style="width: 33.81%;"><span
t-field="account_or_partner_object.code"/> - <span t-field="account_or_partner_object.name"/></div>
<div class="act_as_cell right"
style="width: 25.44%;">Ending balance</div>
style="width: 28.51%;">Ending balance</div>
</t>
<t t-if='type == "partner_type"'>
<div class="act_as_cell first_column" style="width: 33.33%;"/>
<div class="act_as_cell right" style="width: 25.44%;">Partner ending balance</div>
<div class="act_as_cell first_column" style="width: 33.81%;"/>
<div class="act_as_cell right" style="width: 28.51%;">Partner ending balance</div>
</t>
<t t-if="show_cost_center">
<!--## cost_center-->
<div class="act_as_cell" style="width: 8.77%"/>
</t>
<!--## matching_number-->
<div class="act_as_cell" style="width: 3.11%;"/>
<div class="act_as_cell" style="width: 2.63%;"/>
<!--## debit-->
<div class="act_as_cell amount" style="width: 6.57%;"><span
t-field="account_or_partner_object.final_debit"/></div>
<div class="act_as_cell amount" style="width: 6.57%;">
<span t-field="account_or_partner_object.final_debit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## credit-->
<div class="act_as_cell amount" style="width: 6.57%;"><span
t-field="account_or_partner_object.final_credit"/></div>
<div class="act_as_cell amount" style="width: 6.57%;">
<span t-field="account_or_partner_object.final_credit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## balance cumulated-->
<div class="act_as_cell amount" style="width: 6.57%;"><span
t-field="account_or_partner_object.final_balance"/></div>
<div class="act_as_cell amount" style="width: 6.57%;">
<span t-field="account_or_partner_object.final_balance" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## currency_name + amount_currency-->
<div class="act_as_cell" style="width: 9.64%;"/>
<div class="act_as_cell" style="width: 6.57%;"/>
</div>
</div>

View File

@@ -102,7 +102,7 @@
<!--## account code-->
<div class="act_as_cell" style="width: 5.38%;">Account</div>
<!--## partner-->
<div class="act_as_cell" style="width: 12.0%;">Partner
<div class="act_as_cell" style="width: 15.07%;">Partner
</div>
<!--## ref - label-->
<div class="act_as_cell" style="width: 25.5%;">Ref -
@@ -115,8 +115,6 @@
</div>
<!--## amount_residual-->
<div class="act_as_cell" style="width: 6.57%;">Residual</div>
<!--## currency_name-->
<div class="act_as_cell" style="width: 3.07%;">Cur.</div>
<!--## amount_total_due_currency-->
<div class="act_as_cell amount" style="width: 6.57%;">Cur. Original</div>
<!--## amount_residual_currency-->
@@ -174,27 +172,23 @@
</div>
<!--## amount_total_due-->
<div class="act_as_cell amount">
<span t-field="line.amount_total_due"/>
<span t-field="line.amount_total_due" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## amount_residual-->
<div class="act_as_cell amount">
<span t-field="line.amount_residual"/>
<span t-field="line.amount_residual" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## currency_name-->
<div class="act_as_cell">
<span t-field="line.currency_name"/>
</div>
<t t-if="line.currency_name">
<t t-if="line.currency_id">
<!--## amount_total_due_currency-->
<div class="act_as_cell amount">
<span t-field="line.amount_total_due_currency"/>
<span t-field="line.amount_total_due_currency" t-options="{'widget': 'monetary', 'display_currency': line.currency_id}"/>
</div>
<!--## amount_residual_currency-->
<div class="act_as_cell amount">
<span t-field="line.amount_residual_currency"/>
<span t-field="line.amount_residual_currency" t-options="{'widget': 'monetary', 'display_currency': line.currency_id}"/>
</div>
</t>
<t t-if="not line.currency_name">
<t t-if="not line.currency_id">
<!--## amount_total_due_currency-->
<div class="act_as_cell"/>
<!--## amount_residual_currency-->
@@ -211,30 +205,30 @@
<div class="act_as_row labels" style="font-weight: bold;">
<!--## date-->
<t t-if='type == "account_type"'>
<div class="act_as_cell first_column" style="width: 34.3%;">
<div class="act_as_cell first_column" style="width: 37.37%;">
<span t-field="account_or_partner_object.code"/>
-
<span t-field="account_or_partner_object.name"/>
</div>
<div class="act_as_cell right" style="width: 26.4%;">Ending
<div class="act_as_cell right" style="width: 29.47%;">Ending
balance</div>
</t>
<t t-if='type == "partner_type"'>
<div class="act_as_cell first_column"
style="width: 34.3%;"/>
style="width: 37.37%;"/>
<div class="act_as_cell right"
style="width: 26.4%;">Partner ending balance</div>
style="width: 29.47%;">Partner ending balance</div>
</t>
<!--## date_due-->
<div class="act_as_cell" style="width: 6.26%;"/>
<!--## amount_total_due-->
<div class="act_as_cell amount" style="width: 7.57%;"/>
<div class="act_as_cell amount" style="width: 6.57%;"/>
<!--## amount_currency-->
<div class="act_as_cell amount" style="width: 7.57%;">
<span t-field="account_or_partner_object.final_amount_residual"/>
<div class="act_as_cell amount" style="width: 6.57%;">
<span t-field="account_or_partner_object.final_amount_residual" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
</div>
<!--## currency_name + amount_total_due_currency + amount_residual_currency -->
<div class="act_as_cell" style="width: 17.90%;"/>
<!--## amount_total_due_currency + amount_residual_currency -->
<div class="act_as_cell" style="width: 13.14%;"/>
</div>
</div>
</template>

View File

@@ -27,24 +27,46 @@
<div class="act_as_table data_table" style="width: 100%;">
<!-- Display account header -->
<t t-call="account_financial_report.report_trial_balance_lines_header"/>
<!-- Display each lines -->
<t t-foreach="o.account_ids" t-as="line">
<t t-set="type" t-value='"account_type"'/>
<!-- Adapt -->
<t t-set="style" t-value="'font-size:8px;'"/>
<t t-set="padding" t-value="line.level * 4"/>
<t t-set="style" t-value="'font-size: ' + str(14 - line.level) + 'px; margin-left: ' + str(line.level * 4) + 'px;'"/>
<t t-if="line.account_group_id">
<t t-set="style" t-value="style + 'font-weight: bold; color: blue;'"/>
</t>
<!-- Display account lines -->
<t t-call="account_financial_report.report_trial_balance_line"/>
<!-- Adapt style -->
</t>
</div>
</t>
<!-- Display partner lines -->
<t t-if="show_partner_details">
<t t-set="padding" t-value="0"/>
<t t-foreach="o.account_ids" t-as="account">
<div class="page_break">
<t t-set="style" t-value="'font-size:8px;'"/>
<t t-set="padding" t-value="account.level * 4"/>
<t t-set="style" t-value="'font-size: ' + str(14 - account.level) + 'px; margin-left: ' + str(account.level * 4) + 'px;'"/>
<!-- Display account header -->
<div class="act_as_table list_table" style="margin-top: 10px;"/>
<div class="act_as_caption account_title"
style="width: 100%;">
<span t-field="account.code"/> - <span t-field="account.name"/>
<t t-set="res_model" t-value="'account.account'"/>
<span>
<a t-att-data-active-id="account.account_id.id"
t-att-data-res-model="res_model"
class="o_account_financial_reports_web_action"
t-att-style="style">
<t t-raw="account.code"/> - <t t-raw="account.name"/></a>
</span>
</div>
<div class="act_as_table data_table"
@@ -52,15 +74,22 @@
<!-- Display account/partner header -->
<t t-call="account_financial_report.report_trial_balance_lines_header"/>
<!-- Adapt style -->
<t t-set="padding" t-value="padding+4"/>
<!-- Display each partners -->
<t t-foreach="account.partner_ids" t-as="line">
<t t-set="type" t-value='"partner_type"'/>
<!-- Display partner line -->
<t t-call="account_financial_report.report_trial_balance_line"/>
</t>
<t t-set="padding" t-value="padding-4"/>
</div>
<!-- Display account footer -->
<t t-call="account_financial_report.report_trial_balance_account_footer"/>
<t t-set="type" t-value='"account_type"'/>
<t t-call="account_financial_report.report_trial_balance_account_footer"/>
</div>
</t>
</t>
@@ -124,18 +153,241 @@
<div class="act_as_row lines">
<t t-if="not show_partner_details">
<!--## Code-->
<div class="act_as_cell left"><span t-field="line.code"/></div>
<div class="act_as_cell left">
<t t-if="line.account_id">
<t t-set="res_model" t-value="'account.account'"/>
<span>
<a t-att-data-active-id="line.account_id.id"
t-att-data-res-model="res_model"
class="o_account_financial_reports_web_action"
t-att-style="style">
<t t-att-style="style" t-raw="line.code"/></a>
</span>
</t>
<t t-if="line.account_group_id">
<t t-set="res_model" t-value="'account.group'"/>
<span>
<a t-att-data-active-id="line.account_group_id.id"
t-att-data-res-model="res_model"
class="o_account_financial_reports_web_action"
t-att-style="style">
<t t-att-style="style" t-raw="line.code"/></a>
</span>
</t>
</div>
</t>
<!--## Account/Partner-->
<div class="act_as_cell left"><span t-field="line.name"/></div>
<div class="act_as_cell left">
<t t-if="type == 'account_type'">
<t t-if="line.account_id">
<t t-set="res_model" t-value="'account.account'"/>
<span>
<a t-att-data-active-id="line.account_id.id"
t-att-data-res-model="res_model"
class="o_account_financial_reports_web_action"
t-att-style="style">
<t t-att-style="style" t-raw="line.name"/></a>
</span>
</t>
<t t-if="line.account_group_id">
<t t-set="res_model" t-value="'account.group'"/>
<span>
<a t-att-data-active-id="line.account_group_id.id"
t-att-data-res-model="res_model"
class="o_account_financial_reports_web_action"
t-att-style="style">
<t t-att-style="style" t-raw="line.name"/></a>
</span>
</t>
</t>
<t t-if="type == 'partner_type'">
<t t-set="res_model" t-value="'res.partner'"/>
<span>
<a t-att-data-active-id="line.partner_id.id"
t-att-data-res-model="res_model"
class="o_account_financial_reports_web_action"
t-att-style="style">
<t t-att-style="style" t-raw="line.name"/></a>
</span>
</t>
</div>
<!--## Initial balance-->
<div class="act_as_cell amount"><span t-field="line.initial_balance"/></div>
<div class="act_as_cell amount">
<t t-if="type == 'account_type'">
<t t-if="line.account_id">
<t t-set="domain"
t-value="[('account_id', '=', line.account_id.id),
('date', '&lt;', o.date_from)]"/>
<span>
<a t-att-data-domain="domain"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
t-att-style="style">
<t t-att-style="style" t-raw="line.initial_balance" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</t>
<t t-if="line.account_group_id">
<t t-set="domain"
t-value="[('account_id', 'in', line.compute_account_ids.ids),
('date', '&lt;', o.date_from)]"/>
<span>
<a t-att-data-domain="domain"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
t-att-style="style">
<t t-att-style="style" t-raw="line.initial_balance" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</t>
</t>
<t t-if="type == 'partner_type'">
<t t-set="domain"
t-value="[('account_id', '=', line.report_account_id.account_id.id),
('partner_id', '=', line.partner_id.id),
('date', '&lt;', o.date_from)]"/>
<span>
<a t-att-data-domain="domain"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
t-att-style="style">
<t t-att-style="style" t-raw="line.initial_balance" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</t>
</div>
<!--## Debit-->
<div class="act_as_cell amount"><span t-field="line.debit"/></div>
<div class="act_as_cell amount">
<t t-if="type == 'account_type'">
<t t-if="line.account_id">
<t t-set="domain"
t-value="[('account_id', '=', line.account_id.id),
('date', '&gt;=', line.report_id.date_from),
('date', '&lt;=', line.report_id.date_to),
('debit', '&lt;&gt;', 0)]"/>
<span>
<a t-att-data-domain="domain"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
t-att-style="style">
<t t-att-style="style" t-raw="line.debit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</t>
<t t-if="line.account_group_id">
<t t-set="domain"
t-value="[('account_id', 'in', line.compute_account_ids.ids),
('date', '&gt;=', line.report_id.date_from),
('date', '&lt;=', line.report_id.date_to),
('debit', '&lt;&gt;', 0)]"/>
<span>
<a t-att-data-domain="domain"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
t-att-style="style">
<t t-att-style="style" t-raw="line.debit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</t>
</t>
<t t-if="type == 'partner_type'">
<t t-set="domain"
t-value="[('account_id', '=', line.report_account_id.account_id.id),
('partner_id', '=', line.partner_id.id),
('date', '&gt;=', line.report_account_id.report_id.date_from),
('date', '&lt;=', line.report_account_id.report_id.date_to),
('debit', '&lt;&gt;', 0)]"/>
<span>
<a t-att-data-domain="domain"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
t-att-style="style">
<t t-att-style="style" t-raw="line.debit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</t>
</div>
<!--## Credit-->
<div class="act_as_cell amount"><span t-field="line.credit"/></div>
<div class="act_as_cell amount">
<t t-if="type == 'account_type'">
<t t-if="line.account_id">
<t t-set="domain"
t-value="[('account_id', '=', line.account_id.id),
('date', '&gt;=', line.report_id.date_from),
('date', '&lt;=', line.report_id.date_to),
('credit', '&lt;&gt;', 0)]"/>
<span>
<a t-att-data-domain="domain"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
t-att-style="style">
<t t-att-style="style" t-raw="line.credit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</t>
<t t-if="line.account_group_id">
<t t-set="domain"
t-value="[('account_id', 'in', line.compute_account_ids.ids),
('date', '&gt;=', line.report_id.date_from),
('date', '&lt;=', line.report_id.date_to),
('credit', '&lt;&gt;', 0)]"/>
<span>
<a t-att-data-domain="domain"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
t-att-style="style">
<t t-att-style="style" t-raw="line.credit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</t>
</t>
<t t-if="type == 'partner_type'">
<t t-set="domain"
t-value="[('account_id', '=', line.report_account_id.account_id.id),
('partner_id', '=', line.partner_id.id),
('date', '&gt;=', line.report_account_id.report_id.date_from),
('date', '&lt;=', line.report_account_id.report_id.date_to),
('credit', '&lt;&gt;', 0)]"/>
<span>
<a t-att-data-domain="domain"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
t-att-style="style">
<t t-att-style="style" t-raw="line.credit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</t>
</div>
<!--## Ending balance-->
<div class="act_as_cell amount"><span t-field="line.final_balance"/></div>
<div class="act_as_cell amount">
<t t-if="type == 'account_type'">
<t t-if="line.account_id">
<t t-set="domain"
t-value="[('account_id', '=', line.account_id.id)]"/>
<span>
<a t-att-data-domain="domain"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
t-att-style="style">
<t t-att-style="style" t-raw="line.final_balance" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</t>
<t t-if="line.account_group_id">
<t t-set="domain"
t-value="[('account_id', 'in', line.compute_account_ids.ids)]"/>
<span>
<a t-att-data-domain="domain"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
t-att-style="style">
<t t-att-style="style" t-raw="line.final_balance" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</t>
</t>
<t t-if="type == 'partner_type'">
<t t-set="domain"
t-value="[('account_id', '=', line.report_account_id.account_id.id),
('partner_id', '=', line.partner_id.id)]"/>
<span>
<a t-att-data-domain="domain"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
t-att-style="style">
<t t-att-style="style" t-raw="line.final_balance" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</t>
</div>
</div>
</template>
@@ -144,16 +396,71 @@
<div class="act_as_table list_table" style="width: 100%;">
<div class="act_as_row labels" style="font-weight: bold;">
<!--## Account-->
<div class="act_as_cell left" style="width: 61.44%;"><span
t-field="account.code"/> - <span t-field="account.name"/></div>
<div class="act_as_cell left" style="width: 61.44%;">
<t t-set="res_model" t-value="'account.account'"/>
<span>
<a t-att-data-active-id="account.account_id.id"
t-att-data-res-model="res_model"
class="o_account_financial_reports_web_action"
t-att-style="style">
<t t-att-style="style" t-raw="account.code"/> - <t t-att-style="style" t-raw="account.name"/></a>
</span>
</div>
<!--## Initial balance-->
<div class="act_as_cell amount" style="width: 9.64%;"><span t-field="account.initial_balance"/></div>
<div class="act_as_cell amount" style="width: 9.64%;">
<t t-set="domain"
t-value="[('account_id', '=', account.account_id.id),
('date', '&lt;', o.date_from)]"/>
<span>
<a t-att-data-domain="domain"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
t-att-style="style">
<t t-att-style="style" t-raw="account.initial_balance" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</div>
<!--## Debit-->
<div class="act_as_cell amount" style="width: 9.64%;"><span t-field="account.debit"/></div>
<div class="act_as_cell amount" style="width: 9.64%;">
<t t-set="domain"
t-value="[('account_id', '=', account.account_id.id),
('date', '&gt;=', account.report_id.date_from),
('date', '&lt;=', account.report_id.date_to),
('debit', '&lt;&gt;', 0)]"/>
<span>
<a t-att-data-domain="domain"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
t-att-style="style">
<t t-att-style="style" t-raw="account.debit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</div>
<!--## Credit-->
<div class="act_as_cell amount" style="width: 9.64%;"><span t-field="account.credit"/></div>
<div class="act_as_cell amount" style="width: 9.64%;">
<t t-set="domain"
t-value="[('account_id', '=', account.account_id.id),
('date', '&gt;=', account.report_id.date_from),
('date', '&lt;=', account.report_id.date_to),
('credit', '&lt;&gt;', 0)]"/>
<span>
<a t-att-data-domain="domain"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
t-att-style="style">
<t t-att-style="style" t-raw="account.credit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</div>
<!--## Ending balance-->
<div class="act_as_cell amount" style="width: 9.64%;"><span t-field="account.final_balance"/></div>
<div class="act_as_cell amount" style="width: 9.64%;">
<t t-set="domain"
t-value="[('account_id', '=', account.account_id.id)]"/>
<span>
<a t-att-data-domain="domain"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
t-att-style="style" >
<t t-att-style="style" t-raw="account.final_balance" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</div>
</div>
</div>
</template>

View File

@@ -0,0 +1,169 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="account_financial_report.report_vat_report_qweb">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="account_financial_report.internal_layout" t-lang="user.lang">
<t t-call="account_financial_report.report_vat_report_base"/>
</t>
</t>
</t>
</template>
<template id="account_financial_report.report_vat_report_base">
<div class="page data_table">
<t t-set="title">VAT Report</t>
<div class="row">
<h4 class="mt0" t-esc="title or 'Odoo Report'"/>
</div>
<!-- Display filters -->
<t t-call="account_financial_report.report_vat_report_filters"/>
<div class="page_break"/>
<div class="act_as_table data_table" style="width: 100%;">
<!-- Display table headers for lines -->
<div class="act_as_thead">
<div class="act_as_row labels">
<!--## code-->
<div class="act_as_cell first_column" style="width: 5%;">Code</div>
<!--## name-->
<div class="act_as_cell" style="width: 65%;">Name</div>
<!--## net-->
<div class="act_as_cell" style="width: 15%;">Net</div>
<!--## tax-->
<div class="act_as_cell" style="width: 15%;">Tax</div>
</div>
</div>
<t t-foreach="o.taxtags_ids" t-as="tag">
<div class="act_as_row lines" style="font-weight: bold;">
<t t-if="tag.taxtag_id">
<t t-set="res_model" t-value="'account.account.tag'"/>
<t t-set="res_id" t-value="tag.taxtag_id.id"/>
</t>
<t t-if="tag.taxgroup_id">
<t t-set="res_model" t-value="'account.tax.group'"/>
<t t-set="res_id" t-value="tag.taxgroup_id.id"/>
</t>
<div class="act_as_cell left oe_tooltip_string" style="width: 5%;">
<span>
<a t-att-data-active-id="res_id"
t-att-data-res-model="res_model"
class="o_account_financial_reports_web_action"
t-att-style="style">
<t t-att-style="style" t-raw="tag.code"/></a>
</span>
</div>
<div class="act_as_cell left oe_tooltip_string" style="width: 65%;">
<span>
<a t-att-data-active-id="res_id"
t-att-data-res-model="res_model"
class="o_account_financial_reports_web_action"
t-att-style="style"><t t-att-style="style" t-raw="tag.name"/></a>
</span>
</div>
<div class="act_as_cell amount" style="width: 15%;">
<t t-set="domain"
t-value="[('tax_ids', 'in', [tax.tax_id.id for tax in tag.tax_ids]),
('date', '&gt;=', o.date_from),
('date', '&lt;=', o.date_to)]"/>
<span>
<a t-att-data-domain="domain"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
t-att-style="style">
<t t-att-style="style" t-raw="tag.net"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</div>
<div class="act_as_cell amount" style="width: 15%;">
<t t-set="domain"
t-value="[('tax_line_id', 'in', [tax.tax_id.id for tax in tag.tax_ids]),
('date', '&gt;=', o.date_from),
('date', '&lt;=', o.date_to),
('tax_exigible', '=', True)]"/>
<span>
<a t-att-data-domain="domain"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
t-att-style="style">
<t t-att-style="style" t-raw="tag.tax"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</div>
</div>
<t t-if="o.tax_detail">
<t t-foreach="tag.tax_ids" t-as="tax">
<t t-set="res_model" t-value="'account.tax'"/>
<div class="act_as_row lines">
<div class="act_as_cell" style="width: 5%;"/>
<div class="act_as_cell left oe_tooltip_string" style="padding-left: 20px; width: 65%;">
<span>
<a t-att-data-active-id="tax.tax_id.id"
t-att-data-res-model="res_model"
class="o_account_financial_reports_web_action"
t-att-style="style"><t t-att-style="style" t-raw="tax.name"/></a>
</span>
</div>
<div class="act_as_cell amount" style="width: 15%;">
<t t-set="domain"
t-value="[('tax_ids', 'in', tax.tax_id.ids),
('date', '&gt;=', o.date_from),
('date', '&lt;=', o.date_to),
('tax_exigible', '=', True)]"/>
<span>
<a t-att-data-domain="domain"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
t-att-style="style">
<t t-att-style="style" t-raw="tax.net"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</div>
<div class="act_as_cell amount" style="width: 15%;">
<t t-set="domain"
t-value="[('tax_line_id', '=', tax.tax_id.id),
('date', '&gt;=', o.date_from),
('date', '&lt;=', o.date_to),
('tax_exigible', '=', True)]"/>
<span>
<a t-att-data-domain="domain"
t-att-data-res-model="'account.move.line'"
class="o_account_financial_reports_web_action_multi"
t-att-style="style">
<t t-att-style="style" t-raw="tax.tax"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></a>
</span>
</div>
</div>
</t>
</t>
</t>
</div>
</div>
</template>
<template id="account_financial_report.report_vat_report_filters">
<div class="act_as_table data_table" style="width: 100%;">
<div class="act_as_row labels">
<div class="act_as_cell">Date From</div>
<div class="act_as_cell">Date To</div>
<div class="act_as_cell">Based On</div>
</div>
<div class="act_as_row">
<div class="act_as_cell">
<span t-field="o.date_from"/>
</div>
<div class="act_as_cell">
<span t-field="o.date_to"/>
</div>
<div class="act_as_cell">
<span t-field="o.based_on"/>
</div>
</div>
</div>
</template>
</odoo>