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 780829aec4c..8a3d99c9087 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 @@ -14,39 +14,20 @@ - HRAM + HRA code - result = payslip.company_id.dearness_allowance and ((contract.wage + DA) * 0.50) or (contract.wage * 0.50) + result=payslip.company_id.dearness_allowance and ((contract.wage + DA) * 0.50) or (contract.wage * 0.50) if (contract.city_type=='metro') else payslip.company_id.dearness_allowance and ((contract.wage + DA) * 0.40) or (contract.wage * 0.40) if (contract.city_type=='non-metro') else 0.00 - House Rent Allowance for metro city + House Rent Allowance - python - result = (contract.city_type=='metro') Rent receipts can be shown for taking tax benefit for living in a rented house. Income tax exemption for HRA will be least of following: 1. The actual amount of HRA received as a part of salary. - 2. 40% (if living in non-metro area). + 2. 50% (if living in metro area) and 40% (if living in non-metro area) of (basic salary+Dearness allowance(if applicable)). 3. Rent paid minus 10% of (basic salary+DA). - - code - result = payslip.company_id.dearness_allowance and ((contract.wage + DA) * 0.40) or (contract.wage * 0.40) - HRANM - - House Rent Allowance for non metro city - - python - result = (contract.city_type=='non-metro') - Rent receipts can be shown for taking tax benefit for living in a rented house. -Income tax exemption for HRA will be least of following: - 1. The actual amount of HRA received as a part of salary. - 2. 50% (if living in metro area) of (basic salary+Dearness allowance (DA)). - 3. Rent paid minus 10% of (basic salary+DA). - - - TCA Transport/Conveyance Allownace 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 302611d9c92..9dcf69ef5b7 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py @@ -38,7 +38,7 @@ class hr_contract(osv.osv): _inherit = 'hr.contract' _description = 'HR Contract' - + _columns = { 'tds': fields.float('TDS', digits_compute=dp.get_precision('Payroll'), help="Amount for Tax Deduction at Source"), 'driver_salay': fields.boolean('Driver Salary', help=" Allowance for company provided driver"), @@ -49,12 +49,15 @@ class hr_contract(osv.osv): ('non-metro', 'Non-Metro'), ], 'Type of City', readonly=False), } + _defaults = { + 'city_type': 'non-metro', + } hr_contract() class hr_employee(osv.osv): ''' - Employee's Join date allows to compute total working + Employee's Join date allows to compute total working experience of Employee and it is used to calculate Gratuity rule. ''' @@ -89,12 +92,12 @@ class hr_employee(osv.osv): 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): @@ -119,7 +122,7 @@ class payroll_advice(osv.osv): 'company_id':fields.many2one('res.company', 'Company', required=True, readonly=True, states={'draft': [('readonly', False)]}), 'bank_id':fields.many2one('res.bank', 'Bank', readonly=True, states={'draft': [('readonly', False)]}, help="Select the Bank from which the salary is going to be paid"), } - + _defaults = { 'date': lambda * a: time.strftime('%Y-%m-%d'), 'state': lambda * a: 'draft', @@ -132,7 +135,7 @@ class payroll_advice(osv.osv): def compute_advice(self, cr, uid, ids, context=None): """ - Advice - Create Advice lines in Payment Advice and + Advice - Create Advice lines in Payment Advice and compute Advice lines. @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @@ -244,7 +247,7 @@ class res_company(osv.osv): } _defaults = { 'dearness_allowance': True, - } + } res_company()