[IMP] Help added on timesheet state field.Changed caption from 'Status' to 'State'

bzr revid: vir@tinyerp.com-20091224070523-rlhk6rcijp5cujy2
This commit is contained in:
Vir (Open ERP) 2009-12-24 12:35:23 +05:30
parent 9799d989a6
commit ec58eefc89
1 changed files with 11 additions and 4 deletions

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
@ -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 <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@ -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"),