From a584ba9ed2e2d921d16b4a5c69f62bbc5e43d219 Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Mon, 27 Jan 2014 14:20:20 +0100 Subject: [PATCH] [IMP] removes 'Employee Timesheet' and 'Employees Timesheet' reports in HR reporting (addon hr_timesheet) bzr revid: ged@openerp.com-20140127132020-qhxgkygxx38vecab --- addons/hr_timesheet/__openerp__.py | 2 - addons/hr_timesheet/wizard/__init__.py | 2 - .../wizard/hr_timesheet_print_employee.py | 66 ------------------- .../hr_timesheet_print_employee_view.xml | 40 ----------- .../wizard/hr_timesheet_print_users.py | 56 ---------------- .../wizard/hr_timesheet_print_users_view.xml | 46 ------------- 6 files changed, 212 deletions(-) delete mode 100644 addons/hr_timesheet/wizard/hr_timesheet_print_employee.py delete mode 100644 addons/hr_timesheet/wizard/hr_timesheet_print_employee_view.xml delete mode 100644 addons/hr_timesheet/wizard/hr_timesheet_print_users.py delete mode 100644 addons/hr_timesheet/wizard/hr_timesheet_print_users_view.xml diff --git a/addons/hr_timesheet/__openerp__.py b/addons/hr_timesheet/__openerp__.py index f2e589d969e..17a40f64189 100644 --- a/addons/hr_timesheet/__openerp__.py +++ b/addons/hr_timesheet/__openerp__.py @@ -49,8 +49,6 @@ up a management by affair. 'hr_timesheet_report.xml', 'hr_timesheet_wizard.xml', 'process/hr_timesheet_process.xml', - 'wizard/hr_timesheet_print_employee_view.xml', - 'wizard/hr_timesheet_print_users_view.xml', 'wizard/hr_timesheet_sign_in_out_view.xml', 'hr_timesheet_installer.xml', 'hr_timesheet_data.xml' diff --git a/addons/hr_timesheet/wizard/__init__.py b/addons/hr_timesheet/wizard/__init__.py index 5f2bc1443e3..8b73cf62f43 100644 --- a/addons/hr_timesheet/wizard/__init__.py +++ b/addons/hr_timesheet/wizard/__init__.py @@ -20,8 +20,6 @@ ############################################################################## import hr_timesheet_sign_in_out -import hr_timesheet_print_employee -import hr_timesheet_print_users # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_timesheet/wizard/hr_timesheet_print_employee.py b/addons/hr_timesheet/wizard/hr_timesheet_print_employee.py deleted file mode 100644 index efffa6acd5f..00000000000 --- a/addons/hr_timesheet/wizard/hr_timesheet_print_employee.py +++ /dev/null @@ -1,66 +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 datetime - -from openerp.osv import fields, osv -from openerp.tools.translate import _ - -class analytical_timesheet_employee(osv.osv_memory): - _name = 'hr.analytical.timesheet.employee' - _description = 'Print Employee Timesheet & Print My Timesheet' - _columns = { - 'month': fields.selection([(1,'January'), (2,'February'), (3,'March'), (4,'April'), - (5,'May'), (6,'June'), (7,'July'), (8,'August'), (9,'September'), - (10,'October'), (11,'November'), (12,'December')], 'Month', required=True), - 'year': fields.integer('Year', required=True), - 'employee_id': fields.many2one('hr.employee', 'Employee', required=True) - - } - - def _get_user(self, cr, uid, context=None): - - emp_obj = self.pool.get('hr.employee') - emp_id = emp_obj.search(cr, uid, [('user_id', '=', uid)], context=context) - if not emp_id: - raise osv.except_osv(_("Warning!"), _("Please define employee for this user!")) - return emp_id and emp_id[0] or False - - _defaults = { - 'month': lambda *a: datetime.date.today().month, - 'year': lambda *a: datetime.date.today().year, - 'employee_id': _get_user - } - - def print_report(self, cr, uid, ids, context=None): - data = self.read(cr, uid, ids, context=context)[0] - data['employee_id'] = data['employee_id'][0] - datas = { - 'ids': [], - 'model': 'hr.employee', - 'form': data - } - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'hr.analytical.timesheet', - 'datas': datas, - } - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_timesheet/wizard/hr_timesheet_print_employee_view.xml b/addons/hr_timesheet/wizard/hr_timesheet_print_employee_view.xml deleted file mode 100644 index 3603809990b..00000000000 --- a/addons/hr_timesheet/wizard/hr_timesheet_print_employee_view.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - hr.analytical.timesheet.employee.form - hr.analytical.timesheet.employee - -
- - - - - -
-
-
-
-
- - - Employee Timesheet - hr.analytical.timesheet.employee - form - tree,form - - new - - - - -
-
diff --git a/addons/hr_timesheet/wizard/hr_timesheet_print_users.py b/addons/hr_timesheet/wizard/hr_timesheet_print_users.py deleted file mode 100644 index d7dda927111..00000000000 --- a/addons/hr_timesheet/wizard/hr_timesheet_print_users.py +++ /dev/null @@ -1,56 +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 datetime - -from openerp.osv import fields, osv - -class analytical_timesheet_employees(osv.osv_memory): - _name = 'hr.analytical.timesheet.users' - _description = 'Print Employees Timesheet' - _columns = { - 'month': fields.selection([(1,'January'), (2,'February'), (3,'March'), (4,'April'), - (5,'May'), (6,'June'), (7,'July'), (8,'August'), (9,'September'), - (10,'October'), (11,'November'), (12,'December')], 'Month', required=True), - 'year': fields.integer('Year', required=True), - 'employee_ids': fields.many2many('hr.employee', 'timesheet_employee_rel', 'timesheet_id', 'employee_id', 'employees', required=True) - } - - _defaults = { - 'month': lambda *a: datetime.date.today().month, - 'year': lambda *a: datetime.date.today().year, - } - - def print_report(self, cr, uid, ids, context=None): - data = self.read(cr, uid, ids, context=context)[0] - datas = { - 'ids': [], - 'model': 'hr.employee', - 'form': data - } - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'hr.analytical.timesheet_users', - 'datas': datas, - } - - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_timesheet/wizard/hr_timesheet_print_users_view.xml b/addons/hr_timesheet/wizard/hr_timesheet_print_users_view.xml deleted file mode 100644 index 93015a76503..00000000000 --- a/addons/hr_timesheet/wizard/hr_timesheet_print_users_view.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - hr.analytical.timesheet.users.form - hr.analytical.timesheet.users - -
- - - - - - - -
-
-
-
-
- - - Employees Timesheet - hr.analytical.timesheet.users - form - tree,form - - new - - - - -
-