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.

40 lines
1.3 KiB

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