Launchpad automatic translations update.
[odoo/odoo.git] / addons / hr_timesheet_invoice / test / hr_timesheet_invoice_report.yml
1 -
2   In order to test the PDF reports defined on HR Timesheet Account Analytic Profit, we will print report of  HR Timesheet Account Analytic Profit
3 -
4   !python {model: account.analytic.line}: |
5     import netsvc, tools, os, time
6     data_dict = {'model': 'ir.ui.menu', 'form': {'date_from': time.strftime('%Y-%m-01'), 'employee_ids': [[6,0,[ref('hr.employee_fp'), ref('hr.employee_qdp'),ref('hr.employee_al')]]], 'journal_ids': [[6,0,[ref('hr_timesheet.analytic_journal')]]], 'date_to': time.strftime('%Y-%m-%d')}}
7     (data, format) = netsvc.LocalService('report.account.analytic.profit').create(cr, uid, [], data_dict, {})
8     if tools.config['test_report_directory']:
9        file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet_invoice-account_analytic_profit_report.'+format), 'wb+').write(data)
10 -
11  Print the HR Cost Ledger report through the wizard
12 -
13   !python {model: account.analytic.account}: |
14     import netsvc, tools, os, time
15     ctx={}
16     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')]
17     ctx.update({'model': 'ir.ui.menu','active_ids': acc_ids})
18     data_dict = {'date1': time.strftime('%Y-01-01'), 'date2': time.strftime('%Y-%m-%d')}
19     from tools import test_reports
20     test_reports.try_report_action(cr, uid, 'action_hr_timesheet_invoice_cost_ledger',wiz_data=data_dict, context=ctx, our_module='hr_timesheet_invoice')