You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.6 KiB

8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
  1. # -*- coding: utf-8 -*-
  2. # Author: Julien Coux
  3. # Copyright 2016 Camptocamp SA
  4. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  5. import time
  6. from . import abstract_test
  7. class TestGeneralLedger(abstract_test.AbstractTest):
  8. """
  9. Technical tests for General Ledger Report.
  10. """
  11. def _getReportModel(self):
  12. return self.env['report_general_ledger_qweb']
  13. def _getQwebReportName(self):
  14. return 'account_financial_report_qweb.report_general_ledger_qweb'
  15. def _getXlsxReportName(self):
  16. return 'account_financial_report_qweb.report_general_ledger_xlsx'
  17. def _getXlsxReportActionName(self):
  18. return 'account_financial_report_qweb.' \
  19. 'action_report_general_ledger_xlsx'
  20. def _getReportTitle(self):
  21. return 'General Ledger'
  22. def _getBaseFilters(self):
  23. return {
  24. 'date_from': time.strftime('%Y-01-01'),
  25. 'date_to': time.strftime('%Y-12-31'),
  26. 'company_id': self.env.ref('base.main_company').id,
  27. 'fy_start_date': time.strftime('%Y-01-01'),
  28. }
  29. def _getAdditionalFiltersToBeTested(self):
  30. return [
  31. {'only_posted_moves': True},
  32. {'hide_account_balance_at_0': True},
  33. {'centralize': True},
  34. {'only_posted_moves': True, 'hide_account_balance_at_0': True},
  35. {'only_posted_moves': True, 'centralize': True},
  36. {'hide_account_balance_at_0': True, 'centralize': True},
  37. {
  38. 'only_posted_moves': True,
  39. 'hide_account_balance_at_0': True,
  40. 'centralize': True
  41. },
  42. ]