From ec58eefc894227e95ba4a09ae1e304f9776d7f53 Mon Sep 17 00:00:00 2001 From: "Vir (Open ERP)" Date: Thu, 24 Dec 2009 12:35:23 +0530 Subject: [PATCH] [IMP] Help added on timesheet state field.Changed caption from 'Status' to 'State' bzr revid: vir@tinyerp.com-20091224070523-rlhk6rcijp5cujy2 --- addons/hr_timesheet_sheet/hr_timesheet_sheet.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py index 7d23e1340cb..17aada314ee 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 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 . # ############################################################################## @@ -215,7 +215,7 @@ class hr_timesheet_sheet(osv.osv): return True _columns = { - 'name': fields.char('Description', size=64, select=1, + 'name': fields.char('Description', size=64, select=1, states={'confirm':[('readonly', True)], 'done':[('readonly', True)]}), 'user_id': fields.many2one('res.users', 'User', required=True, select=1, states={'confirm':[('readonly', True)], 'done':[('readonly', True)]}), @@ -229,7 +229,14 @@ class hr_timesheet_sheet(osv.osv): 'new': [('readonly', False)]} ), 'attendances_ids' : one2many_mod2('hr.attendance', 'sheet_id', 'Attendances', readonly=True, states={'draft':[('readonly',False)],'new':[('readonly',False)]}), - 'state' : fields.selection([('new', 'New'),('draft','Draft'),('confirm','Confirmed'),('done','Done')], 'Status', select=True, required=True, readonly=True), + 'state' : fields.selection([ + ('new', 'New'), + ('draft','Draft'), + ('confirm','Confirmed'), + ('done','Done')], 'State', select=True, required=True, readonly=True, + help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed timesheet. \ + \n* The \'Confirmed\' state is used for to confirm the timesheet by user. \ + \n* The \'Done\' state is used when users timesheet is accepted by his/her senior.'), 'state_attendance' : fields.function(_state_attendance, method=True, type='selection', selection=[('absent', 'Absent'), ('present', 'Present'),('none','No employee defined')], string='Current Status'), 'total_attendance_day': fields.function(_total_day, method=True, string='Total Attendance', multi="_total_day"), 'total_timesheet_day': fields.function(_total_day, method=True, string='Total Timesheet', multi="_total_day"),