2010-09-17 07:28:06 +00:00
|
|
|
-
|
2010-12-21 12:07:40 +00:00
|
|
|
Print the HR Holidays(Summary Department) Report through the wizard
|
2010-09-17 07:28:06 +00:00
|
|
|
-
|
|
|
|
!python {model: hr.holidays}: |
|
2010-12-24 04:54:34 +00:00
|
|
|
import time
|
2010-12-21 12:07:40 +00:00
|
|
|
ctx={}
|
2011-12-22 13:35:59 +00:00
|
|
|
ctx.update({'model': 'hr.department','active_ids': [ref('hr.employee_fp'),ref('hr.employee_qdp'),ref('hr.employee_al')]})
|
2012-06-08 08:49:11 +00:00
|
|
|
data_dict = {'date_from': time.strftime('%Y-%m-01'), 'depts' : [(6,0,[ref('hr.dep_sales')])],'holiday_type' : 'Approved'}
|
2013-02-09 06:24:36 +00:00
|
|
|
from openerp.tools import test_reports
|
2010-12-21 12:07:40 +00:00
|
|
|
test_reports.try_report_action(cr, uid, 'action_hr_holidays_summary_dept',wiz_data=data_dict, context=ctx, our_module='hr_holidays')
|
|
|
|
|
|
|
|
-
|
|
|
|
Print the HR Holidays(Summary Employee) Report through the wizard
|
|
|
|
-
|
|
|
|
!python {model: hr.holidays}: |
|
2010-12-24 04:54:34 +00:00
|
|
|
import time
|
2010-12-21 12:07:40 +00:00
|
|
|
ctx={}
|
2011-12-22 13:35:59 +00:00
|
|
|
ctx.update({'model': 'hr.employee','active_ids': [ref('hr.employee_fp'),ref('hr.employee_qdp'),ref('hr.employee_al')]})
|
2012-06-08 08:49:11 +00:00
|
|
|
data_dict = {'date_from': time.strftime('%Y-%m-01'), 'emp' : [(6,0,[ref('hr.employee_fp'),ref('hr.employee_qdp'),ref('hr.employee_al')])],'holiday_type' : 'Approved'}
|
2013-02-09 06:24:36 +00:00
|
|
|
from openerp.tools import test_reports
|
2010-12-21 12:07:40 +00:00
|
|
|
test_reports.try_report_action(cr, uid, 'action_hr_holidays_summary_employee',wiz_data=data_dict, context=ctx, our_module='hr_holidays')
|
|
|
|
|