Merge lp:~openerp-dev/openerp-india/payroll-india-python-code-improvements-kbh into lp:~openerp-dev/openerp-india/payroll-india

Proposed by Khushboo Bhatt(openerp)
Status: Merged
Merged at revision: 4508
Proposed branch: lp:~openerp-dev/openerp-india/payroll-india-python-code-improvements-kbh
Merge into: lp:~openerp-dev/openerp-india/payroll-india
Diff against target: 88 lines (+21/-8)
1 file modified
l10n_in_hr_payroll/data/l10n_in_hr_payroll_data.xml (+21/-8)
To merge this branch: bzr merge lp:~openerp-dev/openerp-india/payroll-india-python-code-improvements-kbh
Reviewer Review Type Date Requested Status
OpenERP R&D Team Pending
Review via email: mp+122009@code.launchpad.net

Description of the change

Hello,

 l10n_in_hr_payroll::
 I have Improved python code for some salary rules.

Thank you,
khushboo(KBH).

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'l10n_in_hr_payroll/data/l10n_in_hr_payroll_data.xml'
2--- l10n_in_hr_payroll/data/l10n_in_hr_payroll_data.xml 2012-08-29 12:35:21 +0000
3+++ l10n_in_hr_payroll/data/l10n_in_hr_payroll_data.xml 2012-08-30 08:48:21 +0000
4@@ -70,7 +70,9 @@
5 <record id="hr_salary_rule_houserentallowancemetro_nonmetro" model="hr.salary.rule">
6 <field name="code">HRAMN</field>
7 <field name="amount_select">code</field>
8- <field name="amount_python_compute">result = payslip.company_id.dearness_allowance and ((contract.wage + DA) * contract.house_rent_allowance_metro_nonmetro / 100) or (contract.wage * contract.house_rent_allowance_metro_nonmetro / 100)</field>
9+ <field name="amount_python_compute">result = (payslip.company_id.dearness_allowance and
10+((contract.wage + DA) * contract.house_rent_allowance_metro_nonmetro / 100)
11+or (contract.wage * contract.house_rent_allowance_metro_nonmetro / 100))</field>
12 <field name="category_id" ref="hr_payroll.ALW"/>
13 <field name="name">House Rent Allowance</field>
14 <field name="register_id" ref="hr_houserent_allowance_register"/>
15@@ -129,7 +131,8 @@
16 <field name="condition_select">none</field>
17 <field name="sequence" eval="21"/>
18 <field name="amount_select">code</field>
19- <field name="amount_python_compute">result = payslip.company_id.dearness_allowance and ((contract.wage + DA) * 0.10) or (contract.wage * 0.10)</field>
20+ <field name="amount_python_compute">result = (payslip.company_id.dearness_allowance and ((contract.wage + DA) * 0.10)
21+or (contract.wage * 0.10))</field>
22 <field name="note">This allowance is paid to Employees who are posted in big cities. The purpose is to compensate the high cost of living in cities like Mumbai, Delhi, etc. However it is Fully Taxable.</field>
23 </record>
24
25@@ -348,7 +351,11 @@
26 <field name="condition_select">python</field>
27 <field name="condition_python">result = contract.wage &gt;= 3000 </field>
28 <field name="amount_select">code</field>
29- <field name="amount_python_compute">result = -200 if contract.wage &gt;= 12000 else -150 if ((contract.wage &gt;= 9000) and (contract.wage &lt;= 11999)) else -80 if ((contract.wage &gt;= 6000) and (contract.wage &lt;= 8999)) else -20 if ((contract.wage &gt;= 3000) and (contract.wage &lt;= 5999)) else -0</field>
30+ <field name="amount_python_compute">result = (-200 if contract.wage &gt;= 12000
31+else -150 if ((contract.wage &gt;= 9000) and (contract.wage &lt;= 11999))
32+else -80 if ((contract.wage &gt;= 6000) and (contract.wage &lt;= 8999))
33+else -20 if ((contract.wage &gt;= 3000) and (contract.wage &lt;= 5999))
34+else -0)</field>
35 <field name="register_id" ref="hr_professional_tax_deduction_register"/>
36 <field eval="145" name="sequence"/>
37 <field name="note">Workers living in states that impose the professional tax must submit a payment each half-year for the right to practice a profession or trade. It applies equally to employees who work for the national or state government, and those employed by private corporations. The professional tax uses a six-month accounting system, which divides the year into two periods, beginning on April 1 and October 1.</field>
38@@ -359,7 +366,8 @@
39 <field name="name">Employee's PF Contribution</field>
40 <field name="category_id" ref="hr_payroll.DED"/>
41 <field name="amount_select">code</field>
42- <field name="amount_python_compute">result = payslip.company_id.dearness_allowance and - ((contract.wage + DA) * 0.12) or - (contract.wage * 0.12)</field>
43+ <field name="amount_python_compute">result = (payslip.company_id.dearness_allowance and - ((contract.wage + DA) * 0.12)
44+or - (contract.wage * 0.12))</field>
45 <field name= "note">Employer contribution does not become part of employee’s income and hence income tax is not payable on this part.</field>
46 <field name="register_id" ref="hr_register_provident_fund"/>
47 <field name="sequence" eval="150"/>
48@@ -370,7 +378,8 @@
49 <field name="name">Employee's NPS Contribution</field>
50 <field name="category_id" ref="hr_payroll.DED"/>
51 <field name="amount_select">code</field>
52- <field name="amount_python_compute">result = payslip.company_id.dearness_allowance and - ((contract.wage + DA) * 0.10) or - (contract.wage * 0.10)</field>
53+ <field name="amount_python_compute">result = (payslip.company_id.dearness_allowance and - ((contract.wage + DA) * 0.10)
54+or - (contract.wage * 0.10))</field>
55 <field name="sequence" eval="155"/>
56 <field name="register_id" ref="hr_nps_contribution_register"/>
57 <field name="note">Employee can claim deduction even of employer's contribution to NPS.</field>
58@@ -383,7 +392,9 @@
59 <field name="condition_select">python</field>
60 <field name="condition_python">result = bool(contract.voluntary_provident_fund)</field>
61 <field name="amount_select">code</field>
62- <field name="amount_python_compute">result = payslip.company_id.dearness_allowance and - ((contract.wage + DA) * contract.voluntary_provident_fund / 100) or - (contract.wage * contract.voluntary_provident_fund / 100)</field>
63+ <field name="amount_python_compute">result = (payslip.company_id.dearness_allowance and
64+- ((contract.wage + DA) * contract.voluntary_provident_fund / 100)
65+or - (contract.wage * contract.voluntary_provident_fund / 100))</field>
66 <field name="sequence" eval="160"/>
67 <field name="register_id" ref="hr_vpf_contribution_register"/>
68 <field name="note">VPF is a safe option wherein you can contribute more than the PF ceiling of 12% that has been mandated by the government.This additional amount enjoys all the benefits of PF except that the employer is not liable to contribute any extra amount apart from 12%.An added advantage is that the interest rate is equal to the interest rate of PF and he withdrawal is tax free. Please note that the maximum contribution towards VPF is 100% of your Basic.The highest rate of interest (close to 9%) makes it a very attractive saving scheme. Because of these advantages many employees chose not to close their PF account even after getting employment else where other than India.Employees also get a major tax break on their entire contribution to the fund up to a ceiling of Rs. 70,000/-</field>
69@@ -488,7 +499,8 @@
70 <field name="name">Employer's NPS Contribution</field>
71 <field name="category_id" ref="hr_payroll.DED"/>
72 <field name="amount_select">code</field>
73- <field name="amount_python_compute">result = payslip.company_id.dearness_allowance and - ((contract.wage + DA) * 0.10) or - (contract.wage * 0.10)</field>
74+ <field name="amount_python_compute">result = (payslip.company_id.dearness_allowance and - ((contract.wage + DA) * 0.10)
75+or - (contract.wage * 0.10))</field>
76 <field name="sequence" eval="190"/>
77 <field name="register_id" ref="hr_nps_contribution_register"/>
78 <field name="appears_on_payslip" eval="False"/>
79@@ -500,7 +512,8 @@
80 <field name="name">Employer's PF Contribution</field>
81 <field name="category_id" ref="hr_payroll.DED"/>
82 <field name="amount_select">code</field>
83- <field name="amount_python_compute">result = payslip.company_id.dearness_allowance and - ((contract.wage + DA) * 0.12) or - (contract.wage * 0.12)</field>
84+ <field name="amount_python_compute">result = (payslip.company_id.dearness_allowance and - ((contract.wage + DA) * 0.12)
85+or - (contract.wage * 0.12))</field>
86 <field name="sequence" eval="195"/>
87 <field name="register_id" ref="hr_register_provident_fund"/>
88 <field name="appears_on_payslip" eval="False"/>

Subscribers

People subscribed via source and target branches