diff --git a/addons/hr/hr.py b/addons/hr/hr.py index 34c5b9ede9a..b5db01ac512 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -70,8 +70,8 @@ class hr_job(osv.osv): _description = "Job Description" _columns = { 'name': fields.char('Job Name', size=128, required=True, select=True), - 'expected_employees':fields.integer('Expected Employees'), - 'no_of_employee': fields.function(_no_of_employee, method=True, string='No of Employees', type='integer'), + 'expected_employees':fields.integer('Expected Employees', help='Required number of Employees'), + 'no_of_employee': fields.function(_no_of_employee, method=True, string='No of Employees', type='integer', help='Number of Employees selected'), 'employee_ids':fields.one2many('hr.employee', 'job_id','Employees'), 'description': fields.text('Job Description'), 'requirements':fields.text('Requirements'), diff --git a/addons/hr/hr_department_view.xml b/addons/hr/hr_department_view.xml index 70576149592..c0b2e3c53c7 100644 --- a/addons/hr/hr_department_view.xml +++ b/addons/hr/hr_department_view.xml @@ -49,9 +49,11 @@ search - - - + + + + + diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml index 64ac0e27a48..f03058dccc7 100644 --- a/addons/hr/hr_view.xml +++ b/addons/hr/hr_view.xml @@ -42,7 +42,7 @@
- + @@ -120,7 +120,6 @@ - @@ -181,7 +180,8 @@ form - + + @@ -250,8 +250,8 @@ form
- - + + @@ -328,8 +328,8 @@
- - + + @@ -356,7 +356,7 @@ tree - + diff --git a/addons/hr_attendance/report/bymonth.py b/addons/hr_attendance/report/bymonth.py index e30d4107171..cfebc640777 100644 --- a/addons/hr_attendance/report/bymonth.py +++ b/addons/hr_attendance/report/bymonth.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,7 +15,7 @@ # 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 . # ############################################################################## @@ -42,7 +42,7 @@ class report_custom(report_rml): 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 = self.pool.get('hr.employee').read(cr, uid, 'read', [employee_id], ['name'])[0] + emp = pooler.get_pool(cr.dbname).get('hr.employee').read(cr, uid, [employee_id], ['name'])[0] stop, days_xml = False, [] user_repr = ''' @@ -74,15 +74,15 @@ class report_custom(report_rml): if att['action'] == 'sign_out': wh += (dt - ldt).hours ldt = dt - + # Week xml representation wh = hour2str(wh) today_xml = '%s' % ((today - month).days+1, wh) days_xml.append(today_xml) today, tomor = tomor, tomor + one_day - + user_xml.append(user_repr % '\n'.join(days_xml)) - + xml = ''' %s diff --git a/addons/hr_attendance/report/timesheet.py b/addons/hr_attendance/report/timesheet.py index 9b428a6b54f..7319c366298 100644 --- a/addons/hr_attendance/report/timesheet.py +++ b/addons/hr_attendance/report/timesheet.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,7 +15,7 @@ # 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 . # ############################################################################## @@ -48,7 +48,7 @@ class report_custom(report_rml): user_xml = [] for employee_id in ids: - emp = self.pool.get('hr.employee').read(cr, uid, [employee_id], ['id', 'name'])[0] + emp = pooler.get_pool(cr.dbname).get('hr.employee').read(cr, uid, [employee_id], ['id', 'name'])[0] monday, n_monday = first_monday, first_monday + one_week stop, week_xml = False, [] user_repr = ''' @@ -71,7 +71,7 @@ class report_custom(report_rml): attendances = cr.dictfetchall() week_wh = {} # Fake sign ins/outs at week ends, to take attendances across week ends into account - # XXX this is wrong for the first sign-in ever and the last sign out to this date + # XXX this is wrong for the first sign-in ever and the last sign out to this date if attendances and attendances[0]['action'] == 'sign_out': attendances.insert(0, {'name': monday.strftime('%Y-%m-%d %H:%M:%S'), 'action':'sign_in'}) if attendances and attendances[-1]['action'] == 'sign_in': @@ -96,10 +96,10 @@ class report_custom(report_rml): week_repr.append('') if len(week_repr) > 21: # 21 = minimal length of week_repr week_xml.append('\n'.join(week_repr)) - + monday, n_monday = n_monday, n_monday + one_week user_xml.append(user_repr % '\n'.join(week_xml)) - + xml = ''' %s diff --git a/addons/hr_attendance/wizard/hr_attendance_sign_in_out_view.xml b/addons/hr_attendance/wizard/hr_attendance_sign_in_out_view.xml index a7a39312aff..7598543e302 100644 --- a/addons/hr_attendance/wizard/hr_attendance_sign_in_out_view.xml +++ b/addons/hr_attendance/wizard/hr_attendance_sign_in_out_view.xml @@ -12,6 +12,7 @@ +