9 lines
688 B
YAML
9 lines
688 B
YAML
-
|
|
In order to test the PDF reports defined on a hr timesheet invoice, we will print a hr timesheet invoice
|
|
-
|
|
!python {model: account.analytic.line}: |
|
|
import netsvc, tools, os, time
|
|
data_dict = {'model': 'ir.ui.menu', 'form': {'id': 1, 'date_from': '2010-09-01', 'employee_ids': [[6, 0, [1, ref('hr.employee2')]]], 'journal_ids': [[6, 0, [1, 2, 3, 4]]], 'date_to': '2010-09-16'}}
|
|
(data, format) = netsvc.LocalService('report.account.analytic.profit').create(cr, uid, [], data_dict, {'periods': []})
|
|
if tools.config['test_report_directory']:
|
|
file(os.path.join(tools.config['test_report_directory'], 'hr_timesheet_invoice-report.'+format), 'wb+').write(data) |