diff --git a/addons/hr_contract/hr_contract.py b/addons/hr_contract/hr_contract.py index 5e78ff3287a..54fdf6e1274 100644 --- a/addons/hr_contract/hr_contract.py +++ b/addons/hr_contract/hr_contract.py @@ -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): diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py index e7364f6caf4..f0751684dba 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py @@ -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')), }