test_account_onboarding.py 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # -*- coding: utf-8 -*-
  2. # Part of Odoo. See LICENSE file for full copyright and licensing details.
  3. from odoo.addons.account.tests.common import AccountTestInvoicingHttpCommon
  4. from odoo.tests.common import tagged
  5. @tagged('post_install', '-at_install')
  6. class TestTourRenderInvoiceReport(AccountTestInvoicingHttpCommon):
  7. @classmethod
  8. def setUpClass(cls, chart_template_ref=None):
  9. super().setUpClass(chart_template_ref=chart_template_ref)
  10. cls.env.user.write({
  11. 'groups_id': [
  12. (6, 0, (cls.env.ref('account.group_account_manager') + cls.env.ref('base.group_system')).ids),
  13. ],
  14. })
  15. cls.out_invoice = cls.env['account.move'].create({
  16. 'move_type': 'out_invoice',
  17. 'partner_id': cls.partner_a.id,
  18. 'invoice_date': '2019-05-01',
  19. 'date': '2019-05-01',
  20. 'invoice_line_ids': [
  21. (0, 0, {'name': 'line1', 'price_unit': 100.0}),
  22. ],
  23. })
  24. cls.out_invoice.action_post()
  25. report_layout = cls.env.ref('web.report_layout_standard')
  26. cls.company_data['company'].write({
  27. 'primary_color': '#123456',
  28. 'secondary_color': '#789101',
  29. 'external_report_layout_id': report_layout.view_id.id,
  30. })
  31. cls.env.ref('account.account_invoices_without_payment').report_type = 'qweb-html'
  32. def test_render_account_document_layout(self):
  33. self.start_tour('/web', 'account_render_report', login=self.env.user.login, timeout=200)