diff --git a/addons/hr/board_hr_view.xml b/addons/hr/board_hr_view.xml
index 873032a4067..3b64c362340 100644
--- a/addons/hr/board_hr_view.xml
+++ b/addons/hr/board_hr_view.xml
@@ -7,7 +7,7 @@
name="Human Resources"
parent="base.dashboard"/>
-
+
board.hr.form
board.board
diff --git a/addons/hr/hr_demo.xml b/addons/hr/hr_demo.xml
index 36a2703717f..572eb3c1060 100644
--- a/addons/hr/hr_demo.xml
+++ b/addons/hr/hr_demo.xml
@@ -2,6 +2,43 @@
+
+
+
+ CEO
+
+
+
+ CTO
+
+
+
+
+ Managers(Tech. Heads)
+
+
+
+
+ Project Managers
+
+
+
+
+ Sr. Executives(Team Leads)
+
+
+
+
+ Jr. Executives(Developers)
+
+
+
+
+ Trainee(Intership)
+
+
+
+
@@ -9,6 +46,7 @@
+
diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml
index 402df16939e..1b72561ed9c 100644
--- a/addons/hr/hr_view.xml
+++ b/addons/hr/hr_view.xml
@@ -62,7 +62,7 @@
-
+
@@ -88,6 +88,7 @@
+
@@ -102,7 +103,9 @@
-
+
+
+
diff --git a/addons/hr_attendance/hr_attendance.py b/addons/hr_attendance/hr_attendance.py
index b8892837310..d5667051ae1 100644
--- a/addons/hr_attendance/hr_attendance.py
+++ b/addons/hr_attendance/hr_attendance.py
@@ -60,7 +60,7 @@ class hr_attendance(osv.osv):
'day': fields.function(_day_compute, method=True, type='char', string='Day', store=True, select=1, size=32),
}
_defaults = {
- 'name': time.strftime('%Y-%m-%d %H:%M:%S'),
+ 'name': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'), #Don't remove the lambda, if you remove it then the current time will not change
'employee_id': _employee_get,
}
@@ -119,6 +119,7 @@ class hr_employee(osv.osv):
def attendance_action_change(self, cr, uid, ids, type='action', context=None, dt=False, *args):
id = False
warning_sign = 'sign'
+ res = {}
#Special case when button calls this method :type=context
if isinstance(type, dict):
@@ -127,7 +128,6 @@ class hr_employee(osv.osv):
warning_sign = "Sign In"
elif type == 'sign_out':
warning_sign = "Sign Out"
-
for emp in self.read(cr, uid, ids, ['id'], context=context):
if not self._action_check(cr, uid, emp['id'], dt, context):
raise osv.except_osv(_('Warning'), _('You tried to %s with a date anterior to another event !\nTry to contact the administrator to correct attendances.')%(warning_sign,))
diff --git a/addons/hr_attendance/report/__init__.py b/addons/hr_attendance/report/__init__.py
index 9b27aeb24ae..faa57ad2e95 100644
--- a/addons/hr_attendance/report/__init__.py
+++ b/addons/hr_attendance/report/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -15,12 +15,12 @@
# 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 .
+# along with this program. If not, see .
#
##############################################################################
import attendance_errors
-import bymonth
+import attendance_by_month
import timesheet
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/hr_attendance/report/bymonth.py b/addons/hr_attendance/report/attendance_by_month.py
similarity index 96%
rename from addons/hr_attendance/report/bymonth.py
rename to addons/hr_attendance/report/attendance_by_month.py
index fc646e089ac..0710d30faaf 100644
--- a/addons/hr_attendance/report/bymonth.py
+++ b/addons/hr_attendance/report/attendance_by_month.py
@@ -40,12 +40,13 @@ def hour2str(h):
class report_custom(report_rml):
def create_xml(self, cr, uid, ids, datas, context=None):
+ obj_emp = pooler.get_pool(cr.dbname).get('hr.employee')
if context is None:
context = {}
month = DateTime.DateTime(datas['form']['year'], datas['form']['month'], 1)
user_xml = ['%s' % month2name[month.month], '%s' % month.year]
for employee_id in ids:
- emp = pooler.get_pool(cr.dbname).get('hr.employee').read(cr, uid, [employee_id], ['name'])[0]
+ emp = obj_emp.read(cr, uid, [employee_id], ['name'])[0]
stop, days_xml = False, []
user_repr = '''
diff --git a/addons/hr_attendance/report/timesheet.py b/addons/hr_attendance/report/timesheet.py
index 8b5bbdff5e7..94dc1edcbbd 100644
--- a/addons/hr_attendance/report/timesheet.py
+++ b/addons/hr_attendance/report/timesheet.py
@@ -37,6 +37,7 @@ def to_hour(h):
class report_custom(report_rml):
def create_xml(self, cr, uid, ids, datas, context=None):
+ obj_emp = pooler.get_pool(cr.dbname).get('hr.employee')
start_date = DateTime.strptime(datas['form']['init_date'], '%Y-%m-%d')
end_date = DateTime.strptime(datas['form']['end_date'], '%Y-%m-%d')
first_monday = start_date - DateTime.RelativeDateTime(days=start_date.day_of_week)
@@ -47,7 +48,7 @@ class report_custom(report_rml):
user_xml = []
for employee_id in ids:
- emp = pooler.get_pool(cr.dbname).get('hr.employee').read(cr, uid, [employee_id], ['id', 'name'])[0]
+ emp = obj_emp.read(cr, uid, [employee_id], ['id', 'name'])[0]
monday, n_monday = first_monday, first_monday + one_week
stop, week_xml = False, []
user_repr = '''
diff --git a/addons/hr_attendance/wizard/hr_attendance_bymonth_view.xml b/addons/hr_attendance/wizard/hr_attendance_bymonth_view.xml
index 6518202ac36..b7a9a8afab5 100644
--- a/addons/hr_attendance/wizard/hr_attendance_bymonth_view.xml
+++ b/addons/hr_attendance/wizard/hr_attendance_bymonth_view.xml
@@ -23,7 +23,7 @@
- Print Timesheet by month
+ Print Attendance by month
ir.actions.act_window
hr.attendance.month
form
@@ -34,7 +34,7 @@
- Print Timesheet by month
+ Print Attendance by month
client_print_multi
action
diff --git a/addons/hr_attendance/wizard/hr_attendance_byweek_view.xml b/addons/hr_attendance/wizard/hr_attendance_byweek_view.xml
index 1e536334675..ed7ff7a8bc7 100644
--- a/addons/hr_attendance/wizard/hr_attendance_byweek_view.xml
+++ b/addons/hr_attendance/wizard/hr_attendance_byweek_view.xml
@@ -2,7 +2,7 @@
-
+
diff --git a/addons/hr_timesheet/wizard/hr_timesheet_print_employee_view.xml b/addons/hr_timesheet/wizard/hr_timesheet_print_employee_view.xml
index b895ace8a60..98c48e3e124 100644
--- a/addons/hr_timesheet/wizard/hr_timesheet_print_employee_view.xml
+++ b/addons/hr_timesheet/wizard/hr_timesheet_print_employee_view.xml
@@ -69,10 +69,10 @@
new
-
+ groups="hr.group_hr_user" sequence="4" icon="STOCK_PRINT"/-->
diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
index 2eb352974d7..65b842bb592 100644
--- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
+++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
@@ -718,9 +718,9 @@ class res_company(osv.osv):
_inherit = 'res.company'
_columns = {
'timesheet_range': fields.selection(
- [('day','Day'),('week','Week'),('month','Month'),('year','Year')], 'Timeshet range'),
- 'timesheet_max_difference': fields.float('Timesheet allowed difference',
- help="Allowed difference between the sign in/out and the timesheet " \
+ [('day','Day'),('week','Week'),('month','Month'),('year','Year')], 'Timesheet range'),
+ 'timesheet_max_difference': fields.float('Timesheet allowed difference(Hours)',
+ help="Allowed difference in hours between the sign in/out and the timesheet " \
"computation for one sheet. Set this to 0 if you do not want any control."),
}
_defaults = {