diff --git a/addons/l10n_in_hr_payroll/data/l10n_in_hr_payroll_data.xml b/addons/l10n_in_hr_payroll/data/l10n_in_hr_payroll_data.xml index 414145d3dc1..a3082ef1a39 100644 --- a/addons/l10n_in_hr_payroll/data/l10n_in_hr_payroll_data.xml +++ b/addons/l10n_in_hr_payroll/data/l10n_in_hr_payroll_data.xml @@ -93,8 +93,10 @@ SA Grade/Special/Management/Supplementary Allowance - fix - + python + result = bool(contract.supplementary_allowance) + code + result = contract.supplementary_allowance This allowance is normally given as an additional benefit to employees and is fully taxable. @@ -163,19 +165,6 @@ One would need to compute income tax on the arrears if it would have been receiv Now difference of income tax between payment year and actual year would be allowed for deduction. - - GRA - Gratuity - - none - code - result = payslip.company_id.dearness_allowance and ((contract.wage + DA) * 15 * employee.number_of_year / worked_days.WORK100.number_of_days) or (contract.wage * 15 * employee.number_of_year / worked_days.WORK100.number_of_days) - - Covered under the Payment of Gratuity Act, 1971: -(Last drawn monthly basic salary + dearness allowance)/26 x 15 days x -number of years of service (date of joining – date of retirement/leaving job) - - LTA Leave Travel Allowance @@ -202,16 +191,27 @@ number of years of service (date of joining – date of retirement/leaving job)< 4.Rs. 3 Lakh - + PI - Performance Incentive/Bonus + Performance Incentive - fix - + code + result = inputs.PERF.amount This would be fully taxable based on incentive. + + BONUS + Bonus + + code + result = inputs.BNS.amount + + This would be fully taxable based on Bonus. + + + MEDA Medical Reimbursement @@ -467,5 +467,18 @@ number of years of service (date of joining – date of retirement/leaving job)< Both the employees and employer contribute to the fund at the rate of 12% of the basic wages, dearness allowance and retaining allowance, if any, payable to employees per month. + + + + PERF + Performance of Employee + + + + + BNS + Bonus + + 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 21bc834a2a4..185b8237f28 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py @@ -50,6 +50,7 @@ class hr_contract(osv.osv): ('non-metro', 'Non Metro'), ], 'Type of City'), 'house_rent_allowance_metro_nonmetro': fields.float('House Rent Allowance for Metro and Non Metro City', digits_compute=dp.get_precision('Payroll'), help="HRA computed as percentage(%)"), + 'supplementary_allowance': fields.float('Supplementary Allowance', digits_compute=dp.get_precision('Payroll')), } _defaults = { 'city_type': 'non-metro', @@ -57,51 +58,6 @@ class hr_contract(osv.osv): hr_contract() -class hr_employee(osv.osv): - ''' - Employee's Join date allows to compute total working - experience of Employee and it is used to calculate Gratuity rule. - ''' - - _inherit = 'hr.employee' - _description = 'Employee' - - def _compute_year(self, cr, uid, ids, fields, args, context=None): - """ - @param cr: the current row, from the database cursor, - @param uid: the current user’s ID for security checks, - @param ids: List of employee’s IDs - @return: No. of years of experience. - @param context: A standard dictionary for contextual values - """ - res = {} - c_date = time.strftime(DATETIME_FORMAT) - current_date = datetime.strptime(c_date, DATETIME_FORMAT) - for employee in self.browse(cr, uid, ids, context=context): - if employee.join_date: - date_start = datetime.strptime(employee.join_date, DATETIME_FORMAT) - diffyears = current_date.year - date_start.year - difference = current_date - date_start.replace(current_date.year) - days_in_year = isleap(current_date.year) and 366 or 365 - difference_in_years = diffyears + (difference.days + difference.seconds / 86400.0) / days_in_year - total_years = relativedelta(current_date, date_start).years - total_months = relativedelta(current_date, date_start).months - if total_months < 10: - year_month = float(total_months) / 10 + total_years - else: - year_month = float(total_months) / 100 + total_years - res[employee.id] = year_month - else: - res[employee.id] = 0.0 - return res - - _columns = { - 'join_date': fields.date('Join Date', help="Joining date of employee"), - 'number_of_year': fields.function(_compute_year, string='No. of Years of Service', type="float", store=True, help="Total years of work experience"), - } - -hr_employee() - class payroll_advice(osv.osv): ''' Bank Advice diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_demo.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_demo.xml index 6aaef2c9069..bcb168467a9 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_demo.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_demo.xml @@ -7,7 +7,7 @@ NE Non-Executive Employee - + diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml index e977c21844b..1ea2faed60e 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll_view.xml @@ -15,6 +15,7 @@ + @@ -27,21 +28,6 @@ - - hr.employee.form.inherit - hr.employee - form - - - - - - - - - - - hr.payslip.run.form.inherit hr.payslip.run