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.

41 lines
1.1 KiB

  1. # Author: Julien Coux
  2. # Copyright 2016 Camptocamp SA
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  4. import time
  5. from . import abstract_test
  6. class TestOpenItems(abstract_test.AbstractTest):
  7. """
  8. Technical tests for Open Items Report.
  9. """
  10. def _getReportModel(self):
  11. return self.env['report_open_items']
  12. def _getQwebReportName(self):
  13. return 'account_financial_report.report_open_items_qweb'
  14. def _getXlsxReportName(self):
  15. return 'a_f_r.report_open_items_xlsx'
  16. def _getXlsxReportActionName(self):
  17. return 'account_financial_report.action_report_open_items_xlsx'
  18. def _getReportTitle(self):
  19. return 'Odoo Report'
  20. def _getBaseFilters(self):
  21. return {
  22. 'date_at': time.strftime('%Y-12-31'),
  23. 'company_id': self.env.ref('base.main_company').id,
  24. }
  25. def _getAdditionalFiltersToBeTested(self):
  26. return [
  27. {'only_posted_moves': True},
  28. {'hide_account_balance_at_0': True},
  29. {'only_posted_moves': True, 'hide_account_balance_at_0': True},
  30. ]