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.

20 lines
883 B

  1. # © 2016 Therp BV <http://therp.nl>
  2. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  3. from lxml import etree
  4. from odoo.tests.common import TransactionCase
  5. class TestAccountFinancialReportHorizontal(TransactionCase):
  6. def test_account_financial_report_horizontal(self):
  7. action = self.env['accounting.report'].with_context(
  8. active_id=self.env.ref('account.menu_account_report_pl').id,
  9. active_model='ir.ui.view',
  10. ).create({}).check_report()
  11. data = action['data']
  12. report = self.env['ir.actions.report']._get_report_from_name(
  13. action['report_name'])
  14. html = report.with_context(action['context']).render_qweb_html(
  15. self.env[data['model']].browse(data['ids']),
  16. data=data,
  17. )[0]
  18. self.assertTrue(etree.fromstring(html).xpath("//div[hasclass('row')]"))