From 2c9e0c2459be2421d4f30b25ed2ac2cd9b93272f Mon Sep 17 00:00:00 2001 From: Meera Trambadia Date: Thu, 26 Jul 2012 17:57:02 +0530 Subject: [PATCH] [IMP]:reverted the changes for 'name' field bzr revid: mtr@tinyerp.com-20120726122702-bbttyqkepqs0fdg6 --- addons/hr_holidays/hr_holidays.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index 9d10f08d590..54ab5f31a29 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -112,7 +112,7 @@ class hr_holidays(osv.osv): return result _columns = { - 'name': fields.text('Description', required=True,states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}), + 'name': fields.char('Description', required=True, size=64), 'state': fields.selection([('draft', 'To Submit'), ('cancel', 'Cancelled'),('confirm', 'To Approve'), ('refuse', 'Refused'), ('validate1', 'Second Approval'), ('validate', 'Approved')], 'State', readonly=True, help='The state is set to \'To Submit\', when a holiday request is created.\ \nThe state is \'To Approve\', when holiday request is confirmed by user.\ @@ -126,6 +126,7 @@ class hr_holidays(osv.osv): #'manager_id': fields.many2one('hr.employee', 'Leave Manager', invisible=False, readonly=True, help='This area is automatically filled by the user who validate the leave'), #'notes': fields.text('Notes',readonly=True, states={'draft':[('readonly',False)]}), 'manager_id': fields.many2one('hr.employee', 'First Approval', invisible=False, readonly=True, help='This area is automatically filled by the user who validate the leave'), + 'notes': fields.text('Reasons',readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}), 'number_of_days_temp': fields.float('Number of Days', readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}), 'number_of_days': fields.function(_compute_number_of_days, string='Number of Days', store=True), 'meeting_id': fields.many2one('crm.meeting', 'Meeting'), @@ -267,7 +268,7 @@ class hr_holidays(osv.osv): 'name': record.name, 'categ_ids': record.holiday_status_id.categ_id and [(6,0,[record.holiday_status_id.categ_id.id])] or [], 'duration': record.number_of_days_temp * 8, - 'description': record.name, + 'description': record.notes, 'user_id': record.user_id.id, 'date': record.date_from, 'end_date': record.date_to,