[MERGE] l10n_in_hr-payroll: One field added on contract type of city which will be used in House rent allowances rule

bzr revid: mra@tinyerp.com-20120716122438-l68c02q4ohdf6xf9
This commit is contained in:
Mustufa Rangwala (OpenERP) 2012-07-16 17:54:38 +05:30
commit 0a06bda8fe
3 changed files with 28 additions and 41 deletions

View File

@ -13,36 +13,15 @@
<field name="sequence" eval="13"/>
</record>
<record id="hr_salary_rule_houserentallowancemetro" model="hr.salary.rule">
<field name="code">HRAM</field>
<record id="hr_salary_rule_houserentallowancemetro_nonmetro" model="hr.salary.rule">
<field name="code">HRAMN</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result = payslip.company_id.dearness_allowance and ((contract.wage + DA) * 0.50) or (contract.wage * 0.50)</field>
<field name="amount_python_compute">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</field>
<field name="category_id" ref="hr_payroll.ALW"/>
<field name="name">House Rent Allowance for metro city</field>
<field name="name">House Rent Allowance for metro and nonmetro city</field>
<field name="sequence" eval="51"/>
<field name="note">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).
3. Rent paid minus 10% of (basic salary+DA).
</field>
</record>
<record id="hr_salary_rule_houserentallowancenonmetro" model="hr.salary.rule">
<field name="amount_select">code</field>
<field name="amount_python_compute">result = payslip.company_id.dearness_allowance and ((contract.wage + DA) * 0.40) or (contract.wage * 0.40)</field>
<field name="code">HRANM</field>
<field name="category_id" ref="hr_payroll.ALW"/>
<field name="name">House Rent Allowance for non metro city</field>
<field name="sequence" eval="52"/>
<field name="note">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).
</field>
</record>
<record id="hr_salary_trans_allownce" model="hr.salary.rule">
<field name="code">TCA</field>
<field name="name">Transport/Conveyance Allownace</field>
@ -121,7 +100,7 @@ Income tax exemption for HRA will be least of following:
<field name="amount_select">fix</field>
<field eval="0.0" name="amount_fix"/>
<field name="sequence" eval="28"/>
<field name="note">Generally arrears are fully taxable, but employee may claim exemption u/s 89(1).
<field name="note">Generally arrears are fully taxable, but employee may claim exemption u/s 89(1).
One would need to compute income tax on the arrears if it would have been received in actual year.
Now difference of income tax between payment year and actual year would be allowed for deduction.</field>
</record>
@ -134,8 +113,8 @@ Now difference of income tax between payment year and actual year would be allow
<field name="amount_select">code</field>
<field name="amount_python_compute">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)</field>
<field name="sequence" eval="57"/>
<field name="note">Covered under the Payment of Gratuity Act, 1971:
(Last drawn monthly basic salary + dearness allowance)/26 x 15 days x
<field name="note">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)</field>
</record>
@ -328,12 +307,12 @@ number of years of service (date of joining date of retirement/leaving job)<
<field name="code">CPT</field>
<field name="name">Deduction for Company Provided Transport</field>
<field name="category_id" ref="hr_payroll.DED"/>
<field name="condition_select">none</field>
<field name="condition_select">none</field>
<field name="amount_select">fix</field>
<field eval="0.0" name="amount_fix"/>
<field name="sequence" eval="165"/>
</record>
<record id="hr_salary_rule_food_coupon_ded" model="hr.salary.rule">
<field name="amount_select">fix</field>
<field eval="-20" name="amount_fix"/>
@ -367,7 +346,7 @@ number of years of service (date of joining date of retirement/leaving job)<
<field name="code">DLA</field>
<field name="name">Deduction Towards Leave Availed</field>
<field name="category_id" ref="hr_payroll.DED"/>
<field name="condition_select">none</field>
<field name="condition_select">none</field>
<field name="amount_select">fix</field>
<field eval="0.0" name="amount_fix"/>
<field name="sequence" eval="180"/>

View File

@ -39,19 +39,26 @@ 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"),
'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 computed as percentage(%)"),
'city_type': fields.selection([
('metro', 'Metro'),
('non-metro', 'Non Metro'),
], 'Type of City'),
}
_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.
'''
@ -86,12 +93,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):
@ -116,7 +123,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',
@ -128,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 users ID for security checks,
@ -282,7 +289,7 @@ class res_company(osv.osv):
}
_defaults = {
'dearness_allowance': True,
}
}
res_company()

View File

@ -13,6 +13,7 @@
<group col="2" colspan="2" name="right_column">
<separator colspan="2" string="Allowance"/>
<field name="driver_salay"/>
<field name="city_type"/>
</group>
<group col="2" colspan="2" name="left_column">
<separator colspan="2" string="Deduction"/>
@ -24,7 +25,7 @@
</data>
</field>
</record>
<record id="hr_employee_form_in_inherit" model="ir.ui.view">
<field name="name">hr.employee.form.inherit</field>
<field name="model">hr.employee</field>
@ -69,7 +70,7 @@
</tree>
</field>
</record>
<record id="view_hr_bank_advice_form" model="ir.ui.view">
<field name="name">hr.payroll.advice.form</field>
<field name="model">hr.payroll.advice</field>
@ -154,7 +155,7 @@
<field name="view_id" ref="view_hr_bank_advice_tree"/>
<field name="search_view_id" ref="view_hr_payroll_advice_filter"/>
</record>
<menuitem
action="action_view_hr_bank_advice_tree"
id="hr_menu_payment_advice"