-
  In order to test the PDF reports defined on HR Timesheet Account Analytic Profit, we will print report of  HR Timesheet Account Analytic Profit
-
  !python {model: account.analytic.line}: |
    import netsvc, tools, os, time
    data_dict = {'model': 'ir.ui.menu', 'form': {'date_from': time.strftime('%Y-%m-01'), 'employee_ids': [[6,0,[ref('hr.employee1'), ref('hr.employee2'),ref('hr.employee3')]]], 'journal_ids': [[6,0,[ref('hr_timesheet.analytic_journal')]]], 'date_to': time.strftime('%Y-%m-%d')}}
    (data, format) = netsvc.LocalService('report.account.analytic.profit').create(cr, uid, [], data_dict, {})
    if tools.config['test_report_directory']:
       file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet_invoice-account_analytic_profit_report.'+format), 'wb+').write(data)

-
  In order to test the PDF reports defined on HR Cost Ledger, we will print report of HR Cost Ledger
-
  !python {model: account.analytic.account}: |
    import netsvc, tools, os, time
    acc_ids = [ref('account.analytic_absences'),ref('account.analytic_internal'),ref('account.analytic_sednacom'),ref('account.analytic_thymbra'),ref('account.analytic_partners_camp_to_camp')]
    data_dict = {'model': 'ir.ui.menu', 'form': {'date1': time.strftime('%Y-01-01'), 'date2': time.strftime('%Y-%m-%d')}}
    (data, format) = netsvc.LocalService('report.hr.timesheet.invoice.account.analytic.account.cost_ledger').create(cr, uid, acc_ids, data_dict, {'active_ids': acc_ids})
    if tools.config['test_report_directory']:
       file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet_invoice-cost_ledger_report.'+format), 'wb+').write(data)
