[IMP] account_financial_report: black, isort, prettier

pull/868/head
Alex Cuellar 2020-10-11 11:55:20 -05:00 committed by Jasmin Solanki
parent 5abbac64d7
commit 1e92a40691
20 changed files with 347 additions and 292 deletions

View File

@ -59,7 +59,7 @@ class AbstractReportXslx(models.AbstractModel):
self._write_report_footer(report_footer) self._write_report_footer(report_footer)
def _define_formats(self, workbook): def _define_formats(self, workbook):
""" Add cell formats to current workbook. """Add cell formats to current workbook.
Those formats can be used on all cell. Those formats can be used on all cell.
Available formats are : Available formats are :
* format_bold * format_bold
@ -237,8 +237,7 @@ class AbstractReportXslx(models.AbstractModel):
self.row_pos += 1 self.row_pos += 1
def write_line_from_dict(self, line_dict): 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(): for col_pos, column in self.columns.items():
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")
@ -528,7 +527,7 @@ class AbstractReportXslx(models.AbstractModel):
def _generate_report_content(self, workbook, report, data): def _generate_report_content(self, workbook, report, data):
""" """
Allow to fetch report content to be displayed. Allow to fetch report content to be displayed.
""" """
raise NotImplementedError() raise NotImplementedError()
@ -542,74 +541,74 @@ class AbstractReportXslx(models.AbstractModel):
def _get_report_name(self, report, data=False): def _get_report_name(self, report, data=False):
""" """
Allow to define the report name. Allow to define the report name.
Report name will be used as sheet name and as report title. Report name will be used as sheet name and as report title.
:return: the report name :return: the report name
""" """
raise NotImplementedError() raise NotImplementedError()
def _get_report_footer(self): def _get_report_footer(self):
""" """
Allow to define the report footer. Allow to define the report footer.
:return: the report footer :return: the report footer
""" """
return False return False
def _get_report_columns(self, report): def _get_report_columns(self, report):
""" """
Allow to define the report columns Allow to define the report columns
which will be used to generate report. which will be used to generate report.
:return: the report columns as dict :return: the report columns as dict
:Example: :Example:
{ {
0: {'header': 'Simple column', 0: {'header': 'Simple column',
'field': 'field_name_on_my_object', 'field': 'field_name_on_my_object',
'width': 11}, 'width': 11},
1: {'header': 'Amount column', 1: {'header': 'Amount column',
'field': 'field_name_on_my_object', 'field': 'field_name_on_my_object',
'type': 'amount', 'type': 'amount',
'width': 14}, 'width': 14},
} }
""" """
raise NotImplementedError() raise NotImplementedError()
def _get_report_filters(self, report): def _get_report_filters(self, report):
""" """
:return: the report filters as list :return: the report filters as list
:Example: :Example:
[ [
['first_filter_name', 'first_filter_value'], ['first_filter_name', 'first_filter_value'],
['second_filter_name', 'second_filter_value'] ['second_filter_name', 'second_filter_value']
] ]
""" """
raise NotImplementedError() raise NotImplementedError()
def _get_col_count_filter_name(self): def _get_col_count_filter_name(self):
""" """
:return: the columns number used for filter names. :return: the columns number used for filter names.
""" """
raise NotImplementedError() raise NotImplementedError()
def _get_col_count_filter_value(self): def _get_col_count_filter_value(self):
""" """
:return: the columns number used for filter values. :return: the columns number used for filter values.
""" """
raise NotImplementedError() raise NotImplementedError()
def _get_col_pos_initial_balance_label(self): def _get_col_pos_initial_balance_label(self):
""" """
:return: the columns position used for initial balance label. :return: the columns position used for initial balance label.
""" """
raise NotImplementedError() raise NotImplementedError()
def _get_col_count_final_balance_name(self): def _get_col_count_final_balance_name(self):
""" """
:return: the columns number used for final balance name. :return: the columns number used for final balance name.
""" """
raise NotImplementedError() raise NotImplementedError()
def _get_col_pos_final_balance_label(self): def _get_col_pos_final_balance_label(self):
""" """
:return: the columns position used for final balance label. :return: the columns position used for final balance label.
""" """
raise NotImplementedError() raise NotImplementedError()

View File

@ -268,8 +268,8 @@ class AgedPartnerBalanceXslx(models.AbstractModel):
def write_ending_balance_from_dict(self, my_object): def write_ending_balance_from_dict(self, my_object):
""" """
Specific function to write ending partner balance Specific function to write ending partner balance
for Aged Partner Balance for Aged Partner Balance
""" """
name = None name = None
label = _("Partner cumul aged balance") label = _("Partner cumul aged balance")
@ -288,7 +288,7 @@ class AgedPartnerBalanceXslx(models.AbstractModel):
amount_is_percent, amount_is_percent,
): ):
""" """
Specific function to write account footer for Aged Partner Balance Specific function to write account footer for Aged Partner Balance
""" """
col_pos_footer_label = self._get_col_pos_footer_label(report) col_pos_footer_label = self._get_col_pos_footer_label(report)
for col_pos, column in self.columns.items(): for col_pos, column in self.columns.items():

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -68,13 +68,15 @@ class VATReport(models.AbstractModel):
"tag_ids", "tag_ids",
] ]
tax_move_lines = self.env["account.move.line"].search_read( 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( net_domain = self._get_net_report_domain(
company_id, date_from, date_to, only_posted_moves company_id, date_from, date_to, only_posted_moves
) )
taxed_move_lines = self.env["account.move.line"].search_read( 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)) taxed_move_lines = list(filter(lambda d: d["tax_ids"], taxed_move_lines))
vat_data = [] vat_data = []

View File

@ -1,4 +1,4 @@
odoo.define("account_financial_report.account_financial_report_backend", function( odoo.define("account_financial_report.account_financial_report_backend", function (
require require
) { ) {
"use strict"; "use strict";
@ -14,7 +14,7 @@ odoo.define("account_financial_report.account_financial_report_backend", functio
"click .o_account_financial_reports_print": "print", "click .o_account_financial_reports_print": "print",
"click .o_account_financial_reports_export": "export", "click .o_account_financial_reports_export": "export",
}, },
init: function(parent, action) { init: function (parent, action) {
this.actionManager = parent; this.actionManager = parent;
this.given_context = {}; this.given_context = {};
this.odoo_context = action.context; this.odoo_context = action.context;
@ -28,27 +28,27 @@ odoo.define("account_financial_report.account_financial_report_backend", functio
this.given_context.ttype = action.context.ttype || false; this.given_context.ttype = action.context.ttype || false;
return this._super.apply(this, arguments); return this._super.apply(this, arguments);
}, },
willStart: function() { willStart: function () {
return $.when(this.get_html()); return $.when(this.get_html());
}, },
set_html: function() { set_html: function () {
var self = this; var self = this;
var def = $.when(); var def = $.when();
if (!this.report_widget) { if (!this.report_widget) {
this.report_widget = new ReportWidget(this, this.given_context); this.report_widget = new ReportWidget(this, this.given_context);
def = this.report_widget.appendTo(this.$el); def = this.report_widget.appendTo(this.$el);
} }
def.then(function() { def.then(function () {
self.report_widget.$el.html(self.html); self.report_widget.$el.html(self.html);
}); });
}, },
start: function() { start: function () {
this.set_html(); this.set_html();
return this._super(); return this._super();
}, },
// Fetches the html and is previous report.context if any, // Fetches the html and is previous report.context if any,
// else create it // else create it
get_html: function() { get_html: function () {
var self = this; var self = this;
var defs = []; var defs = [];
return this._rpc({ return this._rpc({
@ -56,7 +56,7 @@ odoo.define("account_financial_report.account_financial_report_backend", functio
method: "get_html", method: "get_html",
args: [self.given_context], args: [self.given_context],
context: self.odoo_context, context: self.odoo_context,
}).then(function(result) { }).then(function (result) {
self.html = result.html; self.html = result.html;
defs.push(self.update_cp()); defs.push(self.update_cp());
return $.when.apply($, defs); return $.when.apply($, defs);
@ -64,7 +64,7 @@ odoo.define("account_financial_report.account_financial_report_backend", functio
}, },
// Updates the control panel and render the elements that have yet // Updates the control panel and render the elements that have yet
// to be rendered // to be rendered
update_cp: function() { update_cp: function () {
if (this.$buttons) { if (this.$buttons) {
var status = { var status = {
breadcrumbs: this.actionManager.get_breadcrumbs(), breadcrumbs: this.actionManager.get_breadcrumbs(),
@ -73,33 +73,33 @@ odoo.define("account_financial_report.account_financial_report_backend", functio
return this.update_control_panel(status); return this.update_control_panel(status);
} }
}, },
do_show: function() { do_show: function () {
this._super(); this._super();
this.update_cp(); this.update_cp();
}, },
print: function() { print: function () {
var self = this; var self = this;
this._rpc({ this._rpc({
model: this.given_context.model, model: this.given_context.model,
method: "print_report", method: "print_report",
args: [this.given_context.active_id, "qweb-pdf"], args: [this.given_context.active_id, "qweb-pdf"],
context: self.odoo_context, context: self.odoo_context,
}).then(function(result) { }).then(function (result) {
self.do_action(result); self.do_action(result);
}); });
}, },
export: function() { export: function () {
var self = this; var self = this;
this._rpc({ this._rpc({
model: this.given_context.model, model: this.given_context.model,
method: "print_report", method: "print_report",
args: [this.given_context.active_id, "xlsx"], args: [this.given_context.active_id, "xlsx"],
context: self.odoo_context, context: self.odoo_context,
}).then(function(result) { }).then(function (result) {
self.do_action(result); self.do_action(result);
}); });
}, },
canBeRemoved: function() { canBeRemoved: function () {
return $.when(); return $.when();
}, },
}); });

View File

@ -1,4 +1,4 @@
odoo.define("account_financial_report.account_financial_report_widget", function( odoo.define("account_financial_report.account_financial_report_widget", function (
require require
) { ) {
"use strict"; "use strict";
@ -14,13 +14,13 @@ odoo.define("account_financial_report.account_financial_report_widget", function
"click .o_account_financial_reports_web_action_monetary_multi": "click .o_account_financial_reports_web_action_monetary_multi":
"boundLinkMonetarymulti", "boundLinkMonetarymulti",
}, },
init: function() { init: function () {
this._super.apply(this, arguments); this._super.apply(this, arguments);
}, },
start: function() { start: function () {
return this._super.apply(this, arguments); return this._super.apply(this, arguments);
}, },
boundLink: function(e) { boundLink: function (e) {
var res_model = $(e.target).data("res-model"); var res_model = $(e.target).data("res-model");
var res_id = $(e.target).data("active-id"); var res_id = $(e.target).data("active-id");
return this.do_action({ return this.do_action({
@ -31,7 +31,7 @@ odoo.define("account_financial_report.account_financial_report_widget", function
target: "current", target: "current",
}); });
}, },
boundLinkmulti: function(e) { boundLinkmulti: function (e) {
var res_model = $(e.target).data("res-model"); var res_model = $(e.target).data("res-model");
var domain = $(e.target).data("domain"); var domain = $(e.target).data("domain");
if (!res_model) { if (!res_model) {
@ -52,7 +52,7 @@ odoo.define("account_financial_report.account_financial_report_widget", function
target: "current", target: "current",
}); });
}, },
boundLinkMonetary: function(e) { boundLinkMonetary: function (e) {
var res_model = $(e.target.parentElement).data("res-model"); var res_model = $(e.target.parentElement).data("res-model");
var res_id = $(e.target.parentElement).data("active-id"); var res_id = $(e.target.parentElement).data("active-id");
return this.do_action({ return this.do_action({
@ -63,7 +63,7 @@ odoo.define("account_financial_report.account_financial_report_widget", function
target: "current", target: "current",
}); });
}, },
boundLinkMonetarymulti: function(e) { boundLinkMonetarymulti: function (e) {
var res_model = $(e.target.parentElement).data("res-model"); var res_model = $(e.target.parentElement).data("res-model");
var domain = $(e.target.parentElement).data("domain"); var domain = $(e.target.parentElement).data("domain");
return this.do_action({ return this.do_action({
@ -77,8 +77,8 @@ odoo.define("account_financial_report.account_financial_report_widget", function
target: "current", target: "current",
}); });
}, },
_toTitleCase: function(str) { _toTitleCase: function (str) {
return str.replace(/\w\S*/g, function(txt) { return str.replace(/\w\S*/g, function (txt) {
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
}); });
}, },

View File

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

View File

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

View File

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

View File

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

View File

@ -55,7 +55,10 @@ class OpenItemsReportWizard(models.TransientModel):
"will display initial and final balance in that currency.", "will display initial and final balance in that currency.",
default=lambda self: self._default_foreign_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( account_code_from = fields.Many2one(
comodel_name="account.account", comodel_name="account.account",
string="Account Code From", string="Account Code From",

View File

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

View File

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