Commit f4e82888 authored by Jérome Perrin's avatar Jérome Perrin

test that currency is visible on accounting reports


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34489 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 94dfa24d
...@@ -161,6 +161,9 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase): ...@@ -161,6 +161,9 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self.portal.accounting_module, self.portal.accounting_module,
'AccountingTransactionModule_viewJournalReport') 'AccountingTransactionModule_viewJournalReport')
self.assertEquals(1, len(report_section_list)) self.assertEquals(1, len(report_section_list))
# currency is present in the report
self.assertEquals('currency_module/euro', self.portal.
AccountingTransactionModule_viewJournalReport.your_currency.get_value('default'))
# precision is set in the REQUEST (so that fields know how to format) # precision is set in the REQUEST (so that fields know how to format)
precision = self.portal.REQUEST.get('precision') precision = self.portal.REQUEST.get('precision')
...@@ -674,6 +677,10 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase): ...@@ -674,6 +677,10 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
# precision is set in the REQUEST (so that fields know how to format) # precision is set in the REQUEST (so that fields know how to format)
precision = self.portal.REQUEST.get('precision') precision = self.portal.REQUEST.get('precision')
self.assertEquals(2, precision) self.assertEquals(2, precision)
# currency is present in the report
self.assertEquals('currency_module/euro', self.portal.
AccountModule_viewAccountStatementReport.your_currency.get_value('default'))
line_list = self.getListBoxLineList(report_section_list[0]) line_list = self.getListBoxLineList(report_section_list[0])
data_line_list = [l for l in line_list if l.isDataLine()] data_line_list = [l for l in line_list if l.isDataLine()]
...@@ -1743,6 +1750,10 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase): ...@@ -1743,6 +1750,10 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
line_list = self.getListBoxLineList(report_section_list[0]) line_list = self.getListBoxLineList(report_section_list[0])
data_line_list = [l for l in line_list if l.isDataLine()] data_line_list = [l for l in line_list if l.isDataLine()]
# currency is present in the report
self.assertEquals('currency_module/euro', self.portal.
AccountModule_viewTrialBalanceReport.your_currency.get_value('default'))
# all accounts are present # all accounts are present
self.assertEquals( self.assertEquals(
len(self.portal.account_module.contentValues(portal_type='Account')), len(self.portal.account_module.contentValues(portal_type='Account')),
...@@ -2700,6 +2711,10 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase): ...@@ -2700,6 +2711,10 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
if field.getId() != 'listbox': if field.getId() != 'listbox':
self.fail('Field %s should not be visible' % field.getId()) self.fail('Field %s should not be visible' % field.getId())
report_section.popReport(self.portal) report_section.popReport(self.portal)
# currency is present in the report
self.assertEquals('currency_module/euro', self.portal.
AccountModule_viewGeneralLedgerReport.your_currency.get_value('default'))
# report layout # report layout
self.assertEquals(['Movement_getSpecificReference', self.assertEquals(['Movement_getSpecificReference',
...@@ -3038,6 +3053,9 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase): ...@@ -3038,6 +3053,9 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self.assertEquals(1, len(report_section_list)) self.assertEquals(1, len(report_section_list))
self.assertEquals(report_section_list[0].getTitle(), self.assertEquals(report_section_list[0].getTitle(),
self.organisation_module.client_1.getTitle()) self.organisation_module.client_1.getTitle())
# currency is present in the report
self.assertEquals('currency_module/euro', self.portal.
AccountModule_viewOtherPartiesReport.your_currency.get_value('default'))
line_list = self.getListBoxLineList(report_section_list[0]) line_list = self.getListBoxLineList(report_section_list[0])
data_line_list = [l for l in line_list if l.isDataLine()] data_line_list = [l for l in line_list if l.isDataLine()]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment