[hr] Improve code and tooltip space.

bzr revid: amb@tinyerp.com-20130627070942-439q75pndgotligf
This commit is contained in:
Amit Bhavsar (Open ERP) 2013-06-27 12:39:42 +05:30
parent 34f15e56d9
commit ae5bc2790d
2 changed files with 4 additions and 5 deletions

View File

@ -89,11 +89,10 @@ class hr_contract(osv.osv):
}
def onchange_employee_id(self, cr, uid, ids, employee_id, context=None):
if not employee_id:
return {'value':{}}
emp_obj = self.pool.get('hr.employee').browse(cr, uid, employee_id, context=context)
val = {'job_id': emp_obj.job_id.id}
return {'value': val}
if emp_obj.job_id:
return {'value': {'job_id': emp_obj.job_id.id}}
return {'value': {'job_id': False}}
def _check_dates(self, cr, uid, ids, context=None):
for contract in self.read(cr, uid, ids, ['date_start', 'date_end'], context=context):

View File

@ -44,7 +44,7 @@ class hr_contract(osv.osv):
'driver_salay': fields.boolean('Driver Salary', help="Check this box if you provide allowance for driver"),
'medical_insurance': fields.float('Medical Insurance', digits_compute=dp.get_precision('Payroll'), help="Deduction towards company provided medical insurance"),
'voluntary_provident_fund': fields.float('Voluntary Provident Fund (%)', digits_compute=dp.get_precision('Payroll'), help="VPF is a safe option wherein you can contribute more than the PF ceiling of 12% that has been mandated by the government and VPF computed as percentage(%)"),
'house_rent_allowance_metro_nonmetro': fields.float('House Rent Allowance (%)', digits_compute=dp.get_precision('Payroll'), help="HRA is an allowance given by the employer to the employee for taking care of his rental or accommodation expenses for metro city it is 50 % and for non metro 40%. \nHRA computed as percentage(%)"),
'house_rent_allowance_metro_nonmetro': fields.float('House Rent Allowance (%)', digits_compute=dp.get_precision('Payroll'), help="HRA is an allowance given by the employer to the employee for taking care of his rental or accommodation expenses for metro city it is 50% and for non metro 40%. \nHRA computed as percentage(%)"),
'supplementary_allowance': fields.float('Supplementary Allowance', digits_compute=dp.get_precision('Payroll')),
}