Browse Source

[IMP] account_financial_report: black, isort, prettier

pull/749/head
Alex Cuellar 4 years ago
committed by João Marques
parent
commit
162a3a0c43
  1. 3
      account_financial_report/report/abstract_report_xlsx.py
  2. 8
      account_financial_report/report/general_ledger.py
  3. 18
      account_financial_report/report/general_ledger_xlsx.py
  4. 138
      account_financial_report/report/templates/aged_partner_balance.xml
  5. 74
      account_financial_report/report/templates/general_ledger.xml
  6. 62
      account_financial_report/report/templates/journal_ledger.xml
  7. 57
      account_financial_report/report/templates/open_items.xml
  8. 57
      account_financial_report/report/templates/trial_balance.xml
  9. 16
      account_financial_report/report/templates/vat_report.xml
  10. 6
      account_financial_report/report/vat_report.py
  11. 14
      account_financial_report/view/report_template.xml
  12. 4
      account_financial_report/wizard/aged_partner_balance_wizard_view.xml
  13. 14
      account_financial_report/wizard/general_ledger_wizard.py
  14. 15
      account_financial_report/wizard/general_ledger_wizard_view.xml
  15. 5
      account_financial_report/wizard/open_items_wizard.py
  16. 4
      account_financial_report/wizard/open_items_wizard_view.xml
  17. 6
      account_financial_report/wizard/trial_balance_wizard_view.xml
  18. 1
      setup/account_financial_report/odoo/addons/account_financial_report
  19. 6
      setup/account_financial_report/setup.py

3
account_financial_report/report/abstract_report_xlsx.py

@ -237,8 +237,7 @@ class AbstractReportXslx(models.AbstractModel):
self.row_pos += 1
def write_line_from_dict(self, line_dict):
"""Write a line on current line
"""
"""Write a line on current line"""
for col_pos, column in self.columns.items():
value = line_dict.get(column["field"], False)
cell_type = column.get("type", "string")

8
account_financial_report/report/general_ledger.py

@ -748,12 +748,16 @@ class GeneralLedgerReport(models.AbstractModel):
for partner in account["list_partner"]:
for move_line in partner["move_lines"]:
centralized_ml = self._calculate_centralization(
centralized_ml, move_line, date_to,
centralized_ml,
move_line,
date_to,
)
else:
for move_line in account["move_lines"]:
centralized_ml = self._calculate_centralization(
centralized_ml, move_line, date_to,
centralized_ml,
move_line,
date_to,
)
list_centralized_ml = []
for jnl_id in centralized_ml.keys():

18
account_financial_report/report/general_ledger_xlsx.py

@ -195,7 +195,10 @@ class GeneralLedgerXslx(models.AbstractModel):
for tag_id in line["tag_ids"]:
tags += tags_data[tag_id]["name"] + " "
line.update(
{"taxes_description": taxes_description, "tags": tags,}
{
"taxes_description": taxes_description,
"tags": tags,
}
)
self.write_line_from_dict(line)
# Display ending balance line for account
@ -208,7 +211,9 @@ class GeneralLedgerXslx(models.AbstractModel):
)
if foreign_currency:
account.update(
{"final_bal_curr": account["fin_bal"]["bal_curr"],}
{
"final_bal_curr": account["fin_bal"]["bal_curr"],
}
)
self.write_ending_balance_from_dict(account)
@ -234,7 +239,9 @@ class GeneralLedgerXslx(models.AbstractModel):
)
if foreign_currency:
partner.update(
{"initial_bal_curr": partner["init_bal"]["bal_curr"],}
{
"initial_bal_curr": partner["init_bal"]["bal_curr"],
}
)
self.write_initial_balance_from_dict(partner)
@ -263,7 +270,10 @@ class GeneralLedgerXslx(models.AbstractModel):
for tag_id in line["tag_ids"]:
tags += tags_data[tag_id]["name"] + " "
line.update(
{"taxes_description": taxes_description, "tags": tags,}
{
"taxes_description": taxes_description,
"tags": tags,
}
)
self.write_line_from_dict(line)

138
account_financial_report/report/templates/aged_partner_balance.xml

@ -15,9 +15,12 @@
<!-- Saved flag fields into variables, used to define columns display -->
<t t-set="show_move_line_details" t-value="show_move_line_details" />
<!-- Defines global variables used by internal layout -->
<t t-set="title">Aged Partner Balance - <t t-raw="company_name" /> - <t
t-raw="currency_name"
/></t>
<t t-set="title">
Aged Partner Balance -
<t t-raw="company_name" />
-
<t t-raw="currency_name" />
</t>
<div class="page">
<div class="row">
<h4
@ -191,7 +194,8 @@
<div class="act_as_row labels">
<!--## date-->
<div class="act_as_cell first_column" style="width: 6.00%;">
Date</div>
Date
</div>
<!--## move-->
<div class="act_as_cell" style="width: 7.00%;">Entry</div>
<!--## journal-->
@ -199,31 +203,41 @@
<!--## account code-->
<div class="act_as_cell" style="width: 6.00%;">Account</div>
<!--## partner-->
<div class="act_as_cell" style="width: 10.50%;">Partner
</div>
<div class="act_as_cell" style="width: 10.50%;">Partner</div>
<!--## ref - label-->
<div class="act_as_cell" style="width: 18.00%;">Ref -
Label</div>
<div class="act_as_cell" style="width: 18.00%;">
Ref -
Label
</div>
<!--## date_due-->
<div class="act_as_cell" style="width: 6.00%;">Due
date</div>
<!--## amount_residual-->
<div class="act_as_cell" style="width: 6.00%;">Residual
<div class="act_as_cell" style="width: 6.00%;">
Due
date
</div>
<!--## amount_residual-->
<div class="act_as_cell" style="width: 6.00%;">Residual</div>
<!--## current-->
<div class="act_as_cell" style="width: 6.00%;">Current</div>
<!--## age_30_days-->
<div class="act_as_cell" style="width: 6.00%;">Age ≤ 30
d.</div>
<div class="act_as_cell" style="width: 6.00%;">
Age ≤ 30
d.
</div>
<!--## age_60_days-->
<div class="act_as_cell" style="width: 6.00%;">Age ≤ 60
d.</div>
<div class="act_as_cell" style="width: 6.00%;">
Age ≤ 60
d.
</div>
<!--## age_90_days-->
<div class="act_as_cell" style="width: 6.00%;">Age ≤ 90
d.</div>
<div class="act_as_cell" style="width: 6.00%;">
Age ≤ 90
d.
</div>
<!--## age_120_days-->
<div class="act_as_cell" style="width: 6.00%;">Age ≤ 120
d.</div>
<div class="act_as_cell" style="width: 6.00%;">
Age ≤ 120
d.
</div>
<!--## older-->
<div class="act_as_cell" style="width: 6.00%;">Older</div>
</div>
@ -448,8 +462,10 @@
<div class="act_as_table list_table" style="width: 100%;">
<div class="act_as_row lines" style="font-weight: bold;">
<!--## date-->
<div class="act_as_cell right" style="width: 52.00%;">Partner
cumul aged balance</div>
<div class="act_as_cell right" style="width: 52.00%;">
Partner
cumul aged balance
</div>
<!--## date_due-->
<div class="act_as_cell" style="width: 6.00%;" />
<!--## amount_residual-->
@ -620,78 +636,76 @@
<div class="act_as_row" style="font-weight: bold; font-style: italic;">
<t t-if="not show_move_line_details">
<!--## total-->
<div class="act_as_cell right" style="width: 32.52%;">
Percents</div>
<div class="act_as_cell right" style="width: 32.52%;">Percents</div>
<!--## amount_residual-->
<div class="act_as_cell amount" style="width: 9.64%;" />
<!--## current-->
<div class="act_as_cell amount" style="width: 9.64%;"><span
t-esc="account['percent_current']"
/>%
<div class="act_as_cell amount" style="width: 9.64%;">
<span t-esc="account['percent_current']" />
%
</div>
<!--## age_30_days-->
<div class="act_as_cell amount" style="width: 9.64%;"><span
t-esc="account['percent_30_days']"
/>%
<div class="act_as_cell amount" style="width: 9.64%;">
<span t-esc="account['percent_30_days']" />
%
</div>
<!--## age_60_days-->
<div class="act_as_cell amount" style="width: 9.64%;"><span
t-esc="account['percent_60_days']"
/>%
<div class="act_as_cell amount" style="width: 9.64%;">
<span t-esc="account['percent_60_days']" />
%
</div>
<!--## age_90_days-->
<div class="act_as_cell amount" style="width: 9.64%;"><span
t-esc="account['percent_90_days']"
/>%
<div class="act_as_cell amount" style="width: 9.64%;">
<span t-esc="account['percent_90_days']" />
%
</div>
<!--## age_120_days-->
<div class="act_as_cell amount" style="width: 9.64%;"><span
t-esc="account['percent_120_days']"
/>%
<div class="act_as_cell amount" style="width: 9.64%;">
<span t-esc="account['percent_120_days']" />
%
</div>
<!--## older-->
<div class="act_as_cell amount" style="width: 9.64%;"><span
t-esc="account['percent_older']"
/>%
<div class="act_as_cell amount" style="width: 9.64%;">
<span t-esc="account['percent_older']" />
%
</div>
</t>
<t t-if="show_move_line_details">
<!--## total-->
<div class="act_as_cell right" style="width: 52.00%;">
Percents</div>
<div class="act_as_cell right" style="width: 52.00%;">Percents</div>
<!--## date_due-->
<div class="act_as_cell" style="width: 6.00%;" />
<!--## amount_residual-->
<div class="act_as_cell amount" style="width: 6.00%" />
<!--## current-->
<div class="act_as_cell amount" style="width: 6.00%"><span
t-esc="account['percent_current']"
/>%
<div class="act_as_cell amount" style="width: 6.00%">
<span t-esc="account['percent_current']" />
%
</div>
<!--## age_30_days-->
<div class="act_as_cell amount" style="width: 6.00%"><span
t-esc="account['percent_30_days']"
/>%
<div class="act_as_cell amount" style="width: 6.00%">
<span t-esc="account['percent_30_days']" />
%
</div>
<!--## age_60_days-->
<div class="act_as_cell amount" style="width: 6.00%"><span
t-esc="account['percent_60_days']"
/>%
<div class="act_as_cell amount" style="width: 6.00%">
<span t-esc="account['percent_60_days']" />
%
</div>
<!--## age_90_days-->
<div class="act_as_cell amount" style="width: 6.00%"><span
t-esc="account['percent_90_days']"
/>%
<div class="act_as_cell amount" style="width: 6.00%">
<span t-esc="account['percent_90_days']" />
%
</div>
<!--## age_120_days-->
<div class="act_as_cell amount" style="width: 6.00%"><span
t-esc="account['percent_120_days']"
/>%
<div class="act_as_cell amount" style="width: 6.00%">
<span t-esc="account['percent_120_days']" />
%
</div>
<!--## older-->
<div class="act_as_cell amount" style="width: 6.00%"><span
t-esc="account['percent_older']"
/>%
<div class="act_as_cell amount" style="width: 6.00%">
<span t-esc="account['percent_older']" />
%
</div>
</t>
</div>

74
account_financial_report/report/templates/general_ledger.xml

@ -14,9 +14,12 @@
<t t-set="foreign_currency" t-value="foreign_currency" />
<t t-set="filter_partner_ids" t-value="filter_partner_ids" />
<!-- Defines global variables used by internal layout -->
<t t-set="title">General Ledger - <t t-raw="company_name" /> - <t
t-raw="currency_name"
/></t>
<t t-set="title">
General Ledger -
<t t-raw="company_name" />
-
<t t-raw="currency_name" />
</t>
<div class="page">
<div class="row">
<h4
@ -34,7 +37,8 @@
<div class="act_as_caption account_title" style="width: 100%">
<span
t-esc="o._get_atr_from_dict(account['id'], accounts_data, 'code')"
/> -
/>
-
<span
t-esc="o._get_atr_from_dict(account['id'], accounts_data, 'name')"
/>
@ -115,7 +119,10 @@
</div>
<div class="act_as_row">
<div class="act_as_cell">
From: <span t-esc="date_from" /> To: <span t-esc="date_to" />
From:
<span t-esc="date_from" />
To:
<span t-esc="date_to" />
</div>
<div class="act_as_cell">
<t t-if="only_posted_moves">All posted entries</t>
@ -143,7 +150,8 @@
<div class="act_as_row labels">
<!--## date-->
<div class="act_as_cell first_column" style="width: 3.51%;">
Date</div>
Date
</div>
<!--## move-->
<div class="act_as_cell" style="width: 8.03%">Entry</div>
<!--## journal-->
@ -153,17 +161,17 @@
<!--## account code-->
<div class="act_as_cell" style="width: 8.89%;">Taxes</div>
<!--## partner-->
<div class="act_as_cell" style="width: 12.01%;">Partner
</div>
<div class="act_as_cell" style="width: 12.01%;">Partner</div>
<!--## ref - label-->
<div class="act_as_cell" style="width: 16.9%;">Ref -
Label</div>
<div class="act_as_cell" style="width: 16.9%;">
Ref -
Label
</div>
<t t-if="show_cost_center">
<!--## cost_center-->
<div
class="act_as_cell"
style="width: 8.03%;"
>Analytic Account</div>
<div class="act_as_cell" style="width: 8.03%;">
Analytic Account
</div>
</t>
<t t-if="show_analytic_tags">
<!--## analytic tags-->
@ -176,18 +184,16 @@
<!--## credit-->
<div class="act_as_cell amount" style="width: 8.02%;">Credit</div>
<!--## balance cumulated-->
<div
class="act_as_cell amount"
style="width: 8.02%;"
>Cumul. Bal.</div>
<div class="act_as_cell amount" style="width: 8.02%;">
Cumul. Bal.
</div>
<t t-if="foreign_currency">
<!--## currency_name-->
<div class="act_as_cell" style="width: 2.08%;">Cur.</div>
<!--## amount_currency-->
<div
class="act_as_cell amount"
style="width: 5.19%;"
>Amount cur.</div>
<div class="act_as_cell amount" style="width: 5.19%;">
Amount cur.
</div>
</t>
</div>
</div>
@ -724,22 +730,24 @@
<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: 41.32%;"><span
<div class="act_as_cell first_column" style="width: 41.32%;">
<span
t-esc="o._get_atr_from_dict(account['id'], accounts_data, 'code')"
/> - <span
/>
-
<span
t-esc="o._get_atr_from_dict(account['id'], accounts_data, 'name')"
/></div>
<div
class="act_as_cell right"
style="width: 16.9%;"
>Ending balance</div>
/>
</div>
<div class="act_as_cell right" style="width: 16.9%;">
Ending balance
</div>
</t>
<t t-if='type == "partner_type"'>
<div class="act_as_cell first_column" style="width: 41.32%;" />
<div
class="act_as_cell right"
style="width: 16.9%;"
>Partner ending balance</div>
<div class="act_as_cell right" style="width: 16.9%;">
Partner ending balance
</div>
</t>
<t t-if="show_cost_center">
<!--## cost_center-->

62
account_financial_report/report/templates/journal_ledger.xml

@ -14,9 +14,12 @@
<template id="report_journal_ledger_base">
<t t-set="display_currency" t-value="foreign_currency" />
<t t-set="display_account_name" t-value="with_account_name" />
<t t-set="title">Journal Ledger - <t t-raw="company_name" /> - <t
t-raw="currency_name"
/></t>
<t t-set="title">
Journal Ledger -
<t t-raw="company_name" />
-
<t t-raw="currency_name" />
</t>
<t t-set="company_name" t-value="Company_Name" />
<div class="page">
<div class="row">
@ -63,12 +66,16 @@
<template id="account_financial_report.report_journal_ledger_journal">
<div class="act_as_table list_table" style="margin-top: 10px;" />
<div class="act_as_caption account_title" style="width: 100%;">
<span t-esc="journal['name']" /> (<span
t-esc="journal['currency_name']"
/>) - <span t-esc="date_from" t-options="{'widget': 'date'}" /> to <span
t-esc="date_to"
t-options="{'widget': 'date'}"
/> - <span t-esc="move_target" /> Moves
<span t-esc="journal['name']" />
(
<span t-esc="journal['currency_name']" />
) -
<span t-esc="date_from" t-options="{'widget': 'date'}" />
to
<span t-esc="date_to" t-options="{'widget': 'date'}" />
-
<span t-esc="move_target" />
Moves
</div>
<div class="act_as_table data_table" style="width: 100%;">
<t
@ -84,20 +91,12 @@
</template>
<template id="account_financial_report.report_journal_ledger_journal_table_header">
<t t-if="not display_account_name">
<t t-set="account_column_style">
width: 8.11%;
</t>
<t t-set="label_column_style">
width: 38.92%;
</t>
<t t-set="account_column_style">width: 8.11%;</t>
<t t-set="label_column_style">width: 38.92%;</t>
</t>
<t t-else="">
<t t-set="account_column_style">
width: 23.78%;
</t>
<t t-set="label_column_style">
width: 23.24%;
</t>
<t t-set="account_column_style">width: 23.78%;</t>
<t t-set="label_column_style">width: 23.24%;</t>
</t>
<div class="act_as_thead">
<div class="act_as_row labels">
@ -108,9 +107,7 @@
>
Entry
</div>
<div class="act_as_cell" name="date" style="width: 5.41%;">
Date
</div>
<div class="act_as_cell" name="date" style="width: 5.41%;">Date</div>
<div
class="act_as_cell"
name="account"
@ -124,12 +121,8 @@
<div class="act_as_cell" name="label" t-att-style="label_column_style">
Ref - Label
</div>
<div class="act_as_cell" name="taxes" style="width: 7.57%;">
Taxes
</div>
<div class="act_as_cell" name="debit" style="width: 8.65%;">
Debit
</div>
<div class="act_as_cell" name="taxes" style="width: 7.57%;">Taxes</div>
<div class="act_as_cell" name="debit" style="width: 8.65%;">Debit</div>
<div class="act_as_cell" name="credit" style="width: 8.65%;">
Credit
</div>
@ -174,8 +167,10 @@
</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>
</t>
</div>
@ -226,7 +221,8 @@
t-esc="o._get_atr_from_dict(move_line['account_id'], account_ids_data, 'code')"
/>
<span t-if="display_account_name">
- <span
-
<span
t-esc="o._get_atr_from_dict(move_line['account_id'], account_ids_data, 'name')"
/>
</span>
@ -412,7 +408,8 @@
</div>
</div>
</div>
<div class="act_as_table data_table" style="width: 100%;">10
<div class="act_as_table data_table" style="width: 100%;">
10
<div class="act_as_row labels">
<div
class="act_as_cell first_column"
@ -439,7 +436,6 @@
Balance
</div>
</div>
<t t-foreach="ReportTaxLines" t-as="tax_line">
<div class="act_as_row lines">
<div class="act_as_cell left" name="tax_name">

57
account_financial_report/report/templates/open_items.xml

@ -13,9 +13,12 @@
<!-- Saved flag fields into variables, used to define columns display -->
<t t-set="foreign_currency" t-value="foreign_currency" />
<!-- Defines global variables used by internal layout -->
<t t-set="title">Open Items - <t t-raw="company_name" /> - <t
t-raw="currency_name"
/></t>
<t t-set="title">
Open Items -
<t t-raw="company_name" />
-
<t t-raw="currency_name" />
</t>
<t t-set="company_name" t-value="Company_Name" />
<div class="page">
<div class="row">
@ -128,8 +131,7 @@
<div class="act_as_thead">
<div class="act_as_row labels">
<!--## date-->
<div class="act_as_cell first_column" style="width: 5.51%;">
Date</div>
<div class="act_as_cell first_column" style="width: 5.51%;">Date</div>
<!--## move-->
<div class="act_as_cell" style="width: 9.76%;">Entry</div>
<!--## journal-->
@ -137,32 +139,32 @@
<!--## account code-->
<div class="act_as_cell" style="width: 5.38%;">Account</div>
<!--## partner-->
<div class="act_as_cell" style="width: 15.07%;">Partner
</div>
<div class="act_as_cell" style="width: 15.07%;">Partner</div>
<!--## ref - label-->
<div class="act_as_cell" style="width: 24.5%;">Ref -
Label</div>
<div class="act_as_cell" style="width: 24.5%;">
Ref -
Label
</div>
<!--## date_due-->
<div class="act_as_cell" style="width: 6.47%;">Due
date</div>
<!--## amount_total_due-->
<div class="act_as_cell" style="width: 6.57%;">Original
<div class="act_as_cell" style="width: 6.47%;">
Due
date
</div>
<!--## amount_total_due-->
<div class="act_as_cell" style="width: 6.57%;">Original</div>
<!--## amount_residual-->
<div class="act_as_cell" style="width: 6.57%;">Residual</div>
<t t-if="foreign_currency">
<!--## currency_name-->
<div class="act_as_cell" style="width: 2.25%;">Cur.</div>
<!--## amount_total_due_currency-->
<div
class="act_as_cell amount"
style="width: 6.57%;"
>Cur. Original</div>
<div class="act_as_cell amount" style="width: 6.57%;">
Cur. Original
</div>
<!--## amount_residual_currency-->
<div
class="act_as_cell amount"
style="width: 6.57%;"
>Cur. Residual</div>
<div class="act_as_cell amount" style="width: 6.57%;">
Cur. Residual
</div>
</t>
</div>
</div>
@ -261,15 +263,16 @@
-
<span t-esc="accounts_data[account_id]['name']" />
</div>
<div class="act_as_cell right" style="width: 28.66%;">Ending
balance</div>
<div class="act_as_cell right" style="width: 28.66%;">
Ending
balance
</div>
</t>
<t t-if='type == "partner_type"'>
<div class="act_as_cell first_column" style="width: 36.34%;" />
<div
class="act_as_cell right"
style="width: 28.66%;"
>Partner ending balance</div>
<div class="act_as_cell right" style="width: 28.66%;">
Partner ending balance
</div>
</t>
<!--## date_due-->
<div class="act_as_cell" style="width: 6.47%;" />

57
account_financial_report/report/templates/trial_balance.xml

@ -16,9 +16,12 @@
<t t-set="show_hierarchy_level" t-value="show_hierarchy_level" />
<t t-set="limit_hierarchy_level" t-value="limit_hierarchy_level" />
<!-- Defines global variables used by internal layout -->
<t t-set="title">Trial Balance - <t t-raw="company_name" /> - <t
t-raw="currency_name"
/></t>
<t t-set="title">
Trial Balance -
<t t-raw="company_name" />
-
<t t-raw="currency_name" />
</t>
<t t-set="company_name" t-value="Company_Name" />
<!-- <t t-set="res_company" t-value="company_id"/>-->
<t class="page">
@ -116,11 +119,10 @@
class="o_account_financial_reports_web_action"
t-att-style="style"
>
<t
t-raw="accounts_data[account_id]['code']"
/> - <t
t-raw="accounts_data[account_id]['name']"
/></a>
<t t-raw="accounts_data[account_id]['code']" />
-
<t t-raw="accounts_data[account_id]['name']" />
</a>
</span>
</div>
<div class="act_as_table data_table" style="width: 100%;">
@ -165,10 +167,10 @@
</div>
<div class="act_as_row">
<div class="act_as_cell">
From: <span
t-esc="date_from"
t-options="{'widget': 'date'}"
/> To <span t-esc="date_to" t-options="{'widget': 'date'}" />
From:
<span t-esc="date_from" t-options="{'widget': 'date'}" />
To
<span t-esc="date_to" t-options="{'widget': 'date'}" />
</div>
<div class="act_as_cell">
<t t-if="only_posted_moves">All posted entries</t>
@ -180,11 +182,10 @@
</div>
<div class="act_as_cell">
<t t-if="limit_hierarchy_level">
Level <span t-esc="show_hierarchy_level" />
</t>
<t t-if="not limit_hierarchy_level">
No limit
Level
<span t-esc="show_hierarchy_level" />
</t>
<t t-if="not limit_hierarchy_level">No limit</t>
</div>
</div>
</div>
@ -197,17 +198,17 @@
<!--## Code-->
<div class="act_as_cell" style="width: 8%;">Code</div>
<!--## Account-->
<div class="act_as_cell" style="width: 25%;">Account
</div>
<div class="act_as_cell" style="width: 25%;">Account</div>
</t>
<t t-if="show_partner_details">
<!--## Partner-->
<div class="act_as_cell" style="width: 33%;">Partner
</div>
<div class="act_as_cell" style="width: 33%;">Partner</div>
</t>
<!--## Initial balance-->
<div class="act_as_cell" style="width: 9%;">Initial
balance</div>
<div class="act_as_cell" style="width: 9%;">
Initial
balance
</div>
<!--## Debit-->
<div class="act_as_cell" style="width: 9%;">Debit</div>
<!--## Credit-->
@ -220,10 +221,14 @@
<!--## currency_name-->
<div class="act_as_cell" style="width: 4%;">Cur.</div>
<!--## amount_currency-->
<div class="act_as_cell" style="width: 9%;">Initial
balance cur.</div>
<div class="act_as_cell" style="width: 9%;">Ending balance
cur.</div>
<div class="act_as_cell" style="width: 9%;">
Initial
balance cur.
</div>
<div class="act_as_cell" style="width: 9%;">
Ending balance
cur.
</div>
</t>
</div>
</div>

16
account_financial_report/report/templates/vat_report.xml

@ -10,9 +10,12 @@
</t>
</template>
<template id="account_financial_report.report_vat_report_base">
<t t-set="title">VAT Report - <t t-raw="company_name" /> - <t
t-raw="currency_name"
/></t>
<t t-set="title">
VAT Report -
<t t-raw="company_name" />
-
<t t-raw="currency_name" />
</t>
<t t-set="company_name" t-value="company_name" />
<div class="page">
<div class="row">
@ -30,10 +33,9 @@
<div class="act_as_thead">
<div class="act_as_row labels">
<!--## code-->
<div
class="act_as_cell first_column"
style="width: 5%;"
>Code</div>
<div class="act_as_cell first_column" style="width: 5%;">
Code
</div>
<!--## name-->
<div class="act_as_cell" style="width: 65%;">Name</div>
<!--## net-->

6
account_financial_report/report/vat_report.py

@ -68,13 +68,15 @@ class VATReport(models.AbstractModel):
"tag_ids",
]
tax_move_lines = self.env["account.move.line"].search_read(
domain=tax_domain, fields=ml_fields,
domain=tax_domain,
fields=ml_fields,
)
net_domain = self._get_net_report_domain(
company_id, date_from, date_to, only_posted_moves
)
taxed_move_lines = self.env["account.move.line"].search_read(
domain=net_domain, fields=ml_fields,
domain=net_domain,
fields=ml_fields,
)
taxed_move_lines = list(filter(lambda d: d["tax_ids"], taxed_move_lines))
vat_data = []

14
account_financial_report/view/report_template.xml

@ -22,12 +22,14 @@
</template>
<template id="report_buttons">
<div class="button_row">
<button class="o_account_financial_reports_print btn btn-sm oe_button"><span
class="fa fa-print"
/> Print</button>
<button
class="o_account_financial_reports_export btn btn-sm oe_button"
><span class="fa fa-download" /> Export</button>
<button class="o_account_financial_reports_print btn btn-sm oe_button">
<span class="fa fa-print" />
Print
</button>
<button class="o_account_financial_reports_export btn btn-sm oe_button">
<span class="fa fa-download" />
Export
</button>
</div>
</template>
<record id="action_report_general_ledger" model="ir.actions.client">

4
account_financial_report/wizard/aged_partner_balance_wizard_view.xml

@ -44,9 +44,7 @@
class="oe_inline"
options="{'no_create': True}"
/>
<span class="oe_inline">
To
</span>
<span class="oe_inline">To</span>
<field
name="account_code_to"
class="oe_inline"

14
account_financial_report/wizard/general_ledger_wizard.py

@ -48,7 +48,9 @@ class GeneralLedgerReportWizard(models.TransientModel):
"If partners are filtered, "
"debits and credits totals will not match the trial balance.",
)
show_analytic_tags = fields.Boolean(string="Show analytic tags",)
show_analytic_tags = fields.Boolean(
string="Show analytic tags",
)
receivable_accounts_only = fields.Boolean()
payable_accounts_only = fields.Boolean()
partner_ids = fields.Many2many(
@ -86,8 +88,14 @@ class GeneralLedgerReportWizard(models.TransientModel):
string="Account Code To",
help="Ending account in a range",
)
show_partner_details = fields.Boolean(string="Show Partner Details", default=True,)
show_cost_center = fields.Boolean(string="Show Analytic Account", default=True,)
show_partner_details = fields.Boolean(
string="Show Partner Details",
default=True,
)
show_cost_center = fields.Boolean(
string="Show Analytic Account",
default=True,
)
domain = fields.Char(
string="Journal Items Domain",
default=[],

15
account_financial_report/wizard/general_ledger_wizard_view.xml

@ -47,9 +47,7 @@
class="oe_inline"
options="{'no_create': True}"
/>
<span class="oe_inline">
To
</span>
<span class="oe_inline">To</span>
<field
name="account_code_to"
class="oe_inline"
@ -94,8 +92,9 @@
/>
</page>
<page string="Additional Filtering">
<style
>.o_domain_show_selection_button {display: none}</style>
<style>
.o_domain_show_selection_button {display: none}
</style>
<field
name="domain"
widget="domain"
@ -113,8 +112,10 @@
invisible="1"
/>
<group />
<h4
>General Ledger can be computed only if selected company have only one unaffected earnings account.</h4>
<h4>
General Ledger can be computed only if selected company have
only one unaffected earnings account.
</h4>
<group />
</div>
<footer>

5
account_financial_report/wizard/open_items_wizard.py

@ -55,7 +55,10 @@ class OpenItemsReportWizard(models.TransientModel):
"will display initial and final balance in that currency.",
default=lambda self: self._default_foreign_currency(),
)
show_partner_details = fields.Boolean(string="Show Partner Details", default=True,)
show_partner_details = fields.Boolean(
string="Show Partner Details",
default=True,
)
account_code_from = fields.Many2one(
comodel_name="account.account",
string="Account Code From",

4
account_financial_report/wizard/open_items_wizard_view.xml

@ -45,9 +45,7 @@
class="oe_inline"
options="{'no_create': True}"
/>
<span class="oe_inline">
To
</span>
<span class="oe_inline">To</span>
<field
name="account_code_to"
class="oe_inline"

6
account_financial_report/wizard/trial_balance_wizard_view.xml

@ -106,8 +106,10 @@
invisible="1"
/>
<group />
<h4
>Trial Balance can be computed only if selected company have only one unaffected earnings account.</h4>
<h4>
Trial Balance can be computed only if selected company have only
one unaffected earnings account.
</h4>
<group />
</div>
<footer>

1
setup/account_financial_report/odoo/addons/account_financial_report

@ -0,0 +1 @@
../../../../account_financial_report

6
setup/account_financial_report/setup.py

@ -0,0 +1,6 @@
import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
Loading…
Cancel
Save