diff --git a/addons/hr_holidays/__openerp__.py b/addons/hr_holidays/__openerp__.py
index bfb211de864..f5a57313348 100644
--- a/addons/hr_holidays/__openerp__.py
+++ b/addons/hr_holidays/__openerp__.py
@@ -56,6 +56,7 @@
'hr_holidays_wizard.xml',
'hr_holidays_report.xml',
'wizard/hr_holidays_summary_department_view.xml',
+ 'wizard/hr_holidays_summary_employees_view.xml',
#'process/hr_holidays_process.xml'
],
'demo_xml': [],
diff --git a/addons/hr_holidays/hr_holidays_wizard.xml b/addons/hr_holidays/hr_holidays_wizard.xml
index 92064620e02..a32e3027bba 100644
--- a/addons/hr_holidays/hr_holidays_wizard.xml
+++ b/addons/hr_holidays/hr_holidays_wizard.xml
@@ -25,8 +25,8 @@
-
+ keyword="client_print_multi" id="wizard_holidays_summary" />-->
diff --git a/addons/hr_holidays/report/holidays_summary_report.py b/addons/hr_holidays/report/holidays_summary_report.py
index e3a59e8344d..77dde5b4575 100644
--- a/addons/hr_holidays/report/holidays_summary_report.py
+++ b/addons/hr_holidays/report/holidays_summary_report.py
@@ -210,8 +210,7 @@ class report_custom(report_rml):
row_id=1
if data['model']=='hr.employee':
-
- for id in data['form']['emp'][0][2]:
+ for id in data['form']['emp']:
items = pooler.get_pool(cr.dbname).get('hr.employee').read(cr,uid,id,['id','name'])
emp_xml += emp_create_xml(self,cr,uid,0,holiday_type,row_id,items['id'],items['name'],som, eom)
diff --git a/addons/hr_holidays/wizard/__init__.py b/addons/hr_holidays/wizard/__init__.py
index f021cfc09d7..19228a07fac 100644
--- a/addons/hr_holidays/wizard/__init__.py
+++ b/addons/hr_holidays/wizard/__init__.py
@@ -20,6 +20,7 @@
##############################################################################
import hr_holidays_summary_department
-import holidays_summary_employees
+import hr_holidays_summary_employees
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/hr_holidays/wizard/holidays_summary_employees.py b/addons/hr_holidays/wizard/holidays_summary_employees.py
deleted file mode 100644
index bdc5664abfb..00000000000
--- a/addons/hr_holidays/wizard/holidays_summary_employees.py
+++ /dev/null
@@ -1,87 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-##############################################################################
-
-import wizard
-import datetime
-import time
-import pooler
-
-
-form='''
-'''
-
-zero_form='''
-'''
-
-zero_fields={
-}
-
-class wizard_report(wizard.interface):
- def _check(self, cr, uid, data, context):
- data['form']['date_from']=time.strftime('%Y-%m-%d')
- data['form']['holiday_type']='Validated'
- data['form']['emp'] = data['ids']
- return data['form']
-
- def _checkemps(self, cr, uid, data, context):
-
- if len(data['form']['emp'][0][2])==0:
- return 'notify'
- else:
- return 'report'
-
- fields={
- 'date_from':{
- 'string':'From',
- 'type':'date',
- 'required':True,
- },
- 'holiday_type':{'string':"Select Holiday Type",'type':'selection','selection':[('Validated','Validated'),('Confirmed','Confirmed'),('both','Both')]},
- 'emp': {'string': 'Employee(s)', 'type': 'many2many', 'relation': 'hr.employee'},
- }
-
- states={
- 'init':{
- 'actions':[_check],
- 'result':{'type':'form', 'arch':form, 'fields':fields, 'state':[('end', 'Cancel','gtk-cancel'), ('checkemp', 'Print', 'gtk-print')]}
- },
- 'checkemp': {
- 'actions': [],
- 'result': {'type':'choice','next_state':_checkemps}
- },
- 'notify': {
- 'actions': [],
- 'result': {'type':'form','arch':zero_form,'fields':zero_fields,'state':[('end','Ok', 'gtk-ok')]}
- },
- 'report':{
- 'actions':[],
- 'result':{'type':'print', 'report':'holidays.summary', 'state':'end'}
- }
- }
-wizard_report('hr.holidays.summary.employee')
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/hr_holidays/wizard/hr_holidays_summary_employees.py b/addons/hr_holidays/wizard/hr_holidays_summary_employees.py
new file mode 100644
index 00000000000..1452c864c7f
--- /dev/null
+++ b/addons/hr_holidays/wizard/hr_holidays_summary_employees.py
@@ -0,0 +1,56 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+##############################################################################
+import time
+
+from osv import osv, fields
+from tools.translate import _
+
+class hr_holidays_summary_employee(osv.osv_memory):
+ _name = 'hr.holidays.summary.employee'
+ _description = 'HR Holidays Summary Report By Employee'
+ _columns = {
+ 'date_from': fields.date('From', required=True),
+ 'emp': fields.many2many('hr.employee', 'summary_emp_rel', 'sum_id', 'emp_id', 'Employee(s)'),
+ 'holiday_type': fields.selection([('Validated','Validated'),('Confirmed','Confirmed'),('both','Both Validated and Confirmed')], 'Select Holiday Type', required=True)
+ }
+
+ _defaults = {
+ 'date_from': time.strftime('%Y-%m-%d'),
+ 'holiday_type': 'Validated',
+ }
+
+ def print_report(self, cr, uid, ids, context=None):
+ data = self.read(cr, uid, ids, [])[0]
+ data['emp'] = context['active_ids']
+ datas = {
+ 'ids': [],
+ 'model': 'hr.employee',
+ 'form': data
+ }
+ return {
+ 'type': 'ir.actions.report.xml',
+ 'report_name': 'holidays.summary',
+ 'datas': datas,
+ }
+
+hr_holidays_summary_employee()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
diff --git a/addons/hr_holidays/wizard/hr_holidays_summary_employees_view.xml b/addons/hr_holidays/wizard/hr_holidays_summary_employees_view.xml
new file mode 100644
index 00000000000..0957083a136
--- /dev/null
+++ b/addons/hr_holidays/wizard/hr_holidays_summary_employees_view.xml
@@ -0,0 +1,47 @@
+
+
+
+
+
+ hr.holidays.summary.employee.form
+ hr.holidays.summary.employee
+ form
+
+
+
+
+
+
+ Employee's Holidays
+ ir.actions.act_window
+ hr.holidays.summary.employee
+ form
+ form
+ new
+
+
+
+
+
+ Employee's Holidays
+ client_print_multi
+
+ action
+ hr.employee
+
+
+
+
\ No newline at end of file