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.4 KiB

  1. # -*- coding: utf-8 -*-
  2. # Copyright 2017 ACSONE SA/NV
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  4. from datetime import date
  5. from dateutil import relativedelta
  6. from odoo.tests.common import TransactionCase
  7. from odoo import fields
  8. class TestAccountExportCsv(TransactionCase):
  9. def setUp(self):
  10. super(TestAccountExportCsv, self).setUp()
  11. self.report_wizard = self.env['account.csv.export']
  12. today_dt = date.today()
  13. next_month_date = today_dt + relativedelta.relativedelta(months=1)
  14. self.report_date_start = fields.Date.to_string(today_dt)
  15. self.report_date_end = fields.Date.to_string(next_month_date)
  16. def test_1(self):
  17. report_wizard = self.report_wizard.create({
  18. 'date_start': self.report_date_start,
  19. 'date_end': self.report_date_end
  20. })
  21. report_wizard.action_manual_export_account()
  22. def test_2(self):
  23. report_wizard = self.report_wizard.create({
  24. 'date_start': self.report_date_start,
  25. 'date_end': self.report_date_end
  26. })
  27. report_wizard.action_manual_export_analytic()
  28. def test_3(self):
  29. report_wizard = self.report_wizard.create({
  30. 'date_start': self.report_date_start,
  31. 'date_end': self.report_date_end
  32. })
  33. report_wizard.action_manual_export_journal_entries()