Browse Source

[11.0][account_financial_report] Fix test_trial_balance report html name issue

pull/585/head
Tonow-c2c 6 years ago
parent
commit
437ecbea75
  1. 4
      account_financial_report/report/templates/trial_balance.xml
  2. 3
      account_financial_report/report/trial_balance.py
  3. 2
      account_financial_report/reports.xml
  4. 3
      account_financial_report/tests/test_trial_balance.py

4
account_financial_report/report/templates/trial_balance.xml

@ -11,6 +11,10 @@
</t> </t>
</template> </template>
<template id="report_trial_balance_html_qweb">
<t t-call="account_financial_report.report_trial_balance_qweb"/>
</template>
<template id="account_financial_report.report_trial_balance_base"> <template id="account_financial_report.report_trial_balance_base">
<!-- Saved flag fields into variables, used to define columns display --> <!-- Saved flag fields into variables, used to define columns display -->
<t t-set="show_partner_details" t-value="o.show_partner_details"/> <t t-set="show_partner_details" t-value="o.show_partner_details"/>

3
account_financial_report/report/trial_balance.py

@ -204,6 +204,9 @@ class TrialBalanceReportCompute(models.TransientModel):
self.ensure_one() self.ensure_one()
if report_type == 'xlsx': if report_type == 'xlsx':
report_name = 'a_f_r.report_trial_balance_xlsx' report_name = 'a_f_r.report_trial_balance_xlsx'
elif report_type == 'qweb-html':
report_name = 'account_financial_report.' \
'report_trial_balance_html_qweb'
else: else:
report_name = 'account_financial_report.' \ report_name = 'account_financial_report.' \
'report_trial_balance_qweb' 'report_trial_balance_qweb'

2
account_financial_report/reports.xml

@ -53,7 +53,7 @@
model="report_trial_balance" model="report_trial_balance"
string="Trial Balance" string="Trial Balance"
report_type="qweb-html" report_type="qweb-html"
name="account_financial_report.report_trial_balance_qweb"
name="account_financial_report.report_trial_balance_html_qweb"
file="account_financial_report.report_trial_balance_html" file="account_financial_report.report_trial_balance_html"
/> />

3
account_financial_report/tests/test_trial_balance.py

@ -19,6 +19,9 @@ class TestTrialBalance(a_t_f_c.AbstractTestForeignCurrency):
def _getQwebReportName(self): def _getQwebReportName(self):
return 'account_financial_report.report_trial_balance_qweb' return 'account_financial_report.report_trial_balance_qweb'
def _getHtmlReportName(self):
return 'account_financial_report.report_trial_balance_html_qweb'
def _getXlsxReportName(self): def _getXlsxReportName(self):
return 'a_f_r.report_trial_balance_xlsx' return 'a_f_r.report_trial_balance_xlsx'

Loading…
Cancel
Save