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.

57 lines
1.8 KiB

  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_foreign_currency as a_t_f_c
  7. class TestTrialBalance(a_t_f_c.AbstractTestForeignCurrency):
  8. """
  9. Technical tests for Trial Balance Report.
  10. """
  11. def _getReportModel(self):
  12. return self.env['report_trial_balance_qweb']
  13. def _getQwebReportName(self):
  14. return 'account_financial_report_qweb.report_trial_balance_qweb'
  15. def _getXlsxReportName(self):
  16. return 'account_financial_report_qweb.report_trial_balance_xlsx'
  17. def _getXlsxReportActionName(self):
  18. return 'account_financial_report_qweb.action_report_trial_balance_xlsx'
  19. def _getReportTitle(self):
  20. return 'Trial Balance'
  21. def _getBaseFilters(self):
  22. return {
  23. 'date_from': time.strftime('%Y-01-01'),
  24. 'date_to': time.strftime('%Y-12-31'),
  25. 'company_id': self.env.ref('base.main_company').id,
  26. 'fy_start_date': time.strftime('%Y-01-01'),
  27. 'foreign_currency': True,
  28. 'show_partner_details': True,
  29. }
  30. def _getAdditionalFiltersToBeTested(self):
  31. return [
  32. {'only_posted_moves': True},
  33. {'hide_account_at_0': True},
  34. {'show_partner_details': True},
  35. {'only_posted_moves': True, 'hide_account_at_0': True},
  36. {'only_posted_moves': True, 'show_partner_details': True},
  37. {'hide_account_at_0': True, 'show_partner_details': True},
  38. {
  39. 'only_posted_moves': True,
  40. 'hide_account_at_0': True,
  41. 'show_partner_details': True
  42. },
  43. ]
  44. def _partner_test_is_possible(self, filters):
  45. return 'show_partner_details' in filters