[FIX] l10n_us_hr_payroll: Fixed test case for exempt in test case of 2019 and extra character on tax table for following states. California, Georgia, Idaho, New Mexico and Alabama For Odoo12.0

This commit is contained in:
Bhoomi Vaishnani
2020-08-26 12:34:08 -04:00
committed by Jared Kipe
parent 203e480f05
commit 6a28e74fab
7 changed files with 216 additions and 215 deletions

View File

@@ -3,7 +3,7 @@
'author': 'Hibou Corp. <hello@hibou.io>', 'author': 'Hibou Corp. <hello@hibou.io>',
'category': 'Localization', 'category': 'Localization',
'depends': ['hr_payroll', 'hr_payroll_rate'], 'depends': ['hr_payroll', 'hr_payroll_rate'],
'version': '12.0.2020.1.0', 'version': '12.0.2020.2.0',
'description': """ 'description': """
USA Payroll Rules. USA Payroll Rules.
================== ==================

View File

@@ -334,6 +334,7 @@
<field name="name">US CA California SIT Tax Rate</field> <field name="name">US CA California SIT Tax Rate</field>
<field name="code">us_ca_sit_tax_rate</field> <field name="code">us_ca_sit_tax_rate</field>
<field name="parameter_value">{ <field name="parameter_value">{
'head_household': {
'weekly': ( 'weekly': (
( 339, 0.0110, 0.00), ( 339, 0.0110, 0.00),
( 803, 0.0220, 3.73), ( 803, 0.0220, 3.73),

View File

@@ -94,7 +94,7 @@
(5000.00, 95.00, 5.00), (5000.00, 95.00, 5.00),
( 'inf', 170.00, 5.75), ( 'inf', 170.00, 5.75),
), ),
},}, },
'married filing joint, one spouse working': { 'married filing joint, one spouse working': {
'weekly': ( 'weekly': (
( 19.00, 0.00, 1.00), ( 19.00, 0.00, 1.00),

View File

@@ -305,7 +305,7 @@
(47508, 558.00, 6.625), (47508, 558.00, 6.625),
('inf', 1068.00, 6.925), ('inf', 1068.00, 6.925),
), ),
},}, },
'head of household': { 'head of household': {
'weekly': ( 'weekly': (
( 238, 0.00, 0.000), ( 238, 0.00, 0.000),

View File

@@ -27,220 +27,220 @@
<field name="code">us_nm_sit_tax_rate</field> <field name="code">us_nm_sit_tax_rate</field>
<field name="parameter_value">{ <field name="parameter_value">{
'single': { 'single': {
+ 'weekly': ( 'weekly': (
+ ( 119, 0.00, 0.0), ( 119, 0.00, 0.0),
+ ( 225, 0.00, 1.7), ( 225, 0.00, 1.7),
+ ( 331, 1.80, 3.2), ( 331, 1.80, 3.2),
+ ( 427, 5.18, 4.7), ( 427, 5.18, 4.7),
+ ( 619, 9.70, 4.9), ( 619, 9.70, 4.9),
+ ( 927, 19.13, 4.9), ( 927, 19.13, 4.9),
+ ( 1369, 34.20, 4.9), ( 1369, 34.20, 4.9),
+ ('inf', 55.88, 4.9), ('inf', 55.88, 4.9),
+ ), ),
+ 'bi-weekly': ( 'bi-weekly': (
+ ( 238, 0.00, 0.0), ( 238, 0.00, 0.0),
+ ( 450, 0.00, 1.7), ( 450, 0.00, 1.7),
+ ( 662, 3.60, 3.2), ( 662, 3.60, 3.2),
+ ( 854, 10.37, 4.7), ( 854, 10.37, 4.7),
+ ( 1238, 19.40, 4.9), ( 1238, 19.40, 4.9),
+ ( 1854, 38.25, 4.9), ( 1854, 38.25, 4.9),
+ ( 2738, 68.40, 4.9), ( 2738, 68.40, 4.9),
+ ('inf', 111.75, 4.9), ('inf', 111.75, 4.9),
+ ), ),
+ 'semi-monthly': ( 'semi-monthly': (
+ ( 258, 0.00, 0.0), ( 258, 0.00, 0.0),
+ ( 488, 0.00, 1.7), ( 488, 0.00, 1.7),
+ ( 717, 3.90, 3.2), ( 717, 3.90, 3.2),
+ ( 925, 11.23, 4.7), ( 925, 11.23, 4.7),
+ ( 1342, 21.02, 4.9), ( 1342, 21.02, 4.9),
+ ( 2008, 41.44, 4.9), ( 2008, 41.44, 4.9),
+ ( 2967, 74.10, 4.9), ( 2967, 74.10, 4.9),
+ ('inf', 121.06, 4.9), ('inf', 121.06, 4.9),
+ ), ),
+ 'monthly': ( 'monthly': (
+ ( 517, 0.00, 0.0), ( 517, 0.00, 0.0),
+ ( 975, 0.00, 1.7), ( 975, 0.00, 1.7),
+ ( 1433, 7.79, 3.2), ( 1433, 7.79, 3.2),
+ ( 1850, 22.46, 4.7), ( 1850, 22.46, 4.7),
+ ( 2683, 42.04, 4.9), ( 2683, 42.04, 4.9),
+ ( 4017, 82.88, 4.9), ( 4017, 82.88, 4.9),
+ ( 5933, 148.21, 4.9), ( 5933, 148.21, 4.9),
+ ('inf', 242.13, 4.9), ('inf', 242.13, 4.9),
+ ), ),
+ 'quarterly': ( 'quarterly': (
+ ( 1550, 0.00, 0.0), ( 1550, 0.00, 0.0),
+ ( 2925, 0.00, 1.7), ( 2925, 0.00, 1.7),
+ ( 4300, 23.38, 3.2), ( 4300, 23.38, 3.2),
+ ( 5550, 67.38, 4.7), ( 5550, 67.38, 4.7),
+ ( 8050, 126.13, 4.9), ( 8050, 126.13, 4.9),
+ ( 12050, 248.63, 4.9), ( 12050, 248.63, 4.9),
+ ( 17800, 444.63, 4.9), ( 17800, 444.63, 4.9),
+ ( 'inf', 726.38, 4.9), ( 'inf', 726.38, 4.9),
+ ), ),
+ 'semi-annual': ( 'semi-annual': (
+ ( 3100, 0.00, 0.0), ( 3100, 0.00, 0.0),
+ ( 5850, 0.00, 1.7), ( 5850, 0.00, 1.7),
+ ( 8600, 46.75, 3.2), ( 8600, 46.75, 3.2),
+ (11100, 134.75, 4.7), (11100, 134.75, 4.7),
+ (16100, 252.25, 4.9), (16100, 252.25, 4.9),
+ (24100, 497.25, 4.9), (24100, 497.25, 4.9),
+ (35600, 889.25, 4.9), (35600, 889.25, 4.9),
+ ('inf', 1452.75, 4.9), ('inf', 1452.75, 4.9),
+ ), ),
+ 'annually': ( 'annually': (
+ ( 6200, 0.00, 0.0), ( 6200, 0.00, 0.0),
+ (11700, 0.00, 1.7), (11700, 0.00, 1.7),
+ (17200, 93.50, 3.2), (17200, 93.50, 3.2),
+ (22200, 269.50, 4.7), (22200, 269.50, 4.7),
+ (32200, 504.50, 4.9), (32200, 504.50, 4.9),
+ (48200, 994.50, 4.9), (48200, 994.50, 4.9),
+ (71200, 1778.50, 4.9), (71200, 1778.50, 4.9),
+ ('inf', 2905.50, 4.9), ('inf', 2905.50, 4.9),
+ ), ),
}, },
'married': { 'married': {
+ 'weekly': ( 'weekly': (
+ ( 238, 0.00, 0.0), ( 238, 0.00, 0.0),
+ ( 392, 0.00, 1.7), ( 392, 0.00, 1.7),
+ ( 546, 2.62, 3.2), ( 546, 2.62, 3.2),
+ ( 700, 7.54, 4.7), ( 700, 7.54, 4.7),
+ ( 1008, 14.77, 4.9), ( 1008, 14.77, 4.9),
+ ( 1469, 29.85, 4.9), ( 1469, 29.85, 4.9),
+ ( 2162, 52.46, 4.9), ( 2162, 52.46, 4.9),
+ ('inf', 86.38, 4.9), ('inf', 86.38, 4.9),
+ ), ),
+ 'bi-weekly': ( 'bi-weekly': (
+ ( 477, 0.00, 0.0), ( 477, 0.00, 0.0),
+ ( 785, 0.00, 1.7), ( 785, 0.00, 1.7),
+ ( 1092, 5.23, 3.2), ( 1092, 5.23, 3.2),
+ ( 1400, 15.08, 4.7), ( 1400, 15.08, 4.7),
+ (2015, 29.54, 4.9), (2015, 29.54, 4.9),
+ ( 2938, 59.69, 4.9), ( 2938, 59.69, 4.9),
+ ( 4323, 104.92, 4.9), ( 4323, 104.92, 4.9),
+ ('inf', 172.77, 4.9), ('inf', 172.77, 4.9),
+ ), ),
+ 'semi-monthly': ( 'semi-monthly': (
+ ( 517, 0.00, 0.0), ( 517, 0.00, 0.0),
+ ( 850, 0.00, 1.7), ( 850, 0.00, 1.7),
+ ( 1183, 5.67, 3.2), ( 1183, 5.67, 3.2),
+ ( 1517, 16.33, 4.7), ( 1517, 16.33, 4.7),
+ ( 2183, 32.00, 4.9), ( 2183, 32.00, 4.9),
+ ( 3183, 64.67, 4.9), ( 3183, 64.67, 4.9),
+ ( 4683, 113.67, 4.9), ( 4683, 113.67, 4.9),
+ ('inf', 187.17, 4.9), ('inf', 187.17, 4.9),
+ ), ),
+ 'monthly': ( 'monthly': (
+ ( 1033, 0.00, 0.0), ( 1033, 0.00, 0.0),
+ ( 1700, 0.00, 1.7), ( 1700, 0.00, 1.7),
+ ( 2367, 11.33, 3.2), ( 2367, 11.33, 3.2),
+ ( 3033, 32.67, 4.7), ( 3033, 32.67, 4.7),
+ ( 4367, 64.00, 4.9), ( 4367, 64.00, 4.9),
+ ( 6367, 129.33, 4.9), ( 6367, 129.33, 4.9),
+ ( 9367, 227.33, 4.9), ( 9367, 227.33, 4.9),
+ ('inf', 374.33, 4.9), ('inf', 374.33, 4.9),
+ ), ),
+ 'quarterly': ( 'quarterly': (
+ ( 3100, 0.00, 0.0), ( 3100, 0.00, 0.0),
+ ( 5100, 0.00, 1.7), ( 5100, 0.00, 1.7),
+ ( 7100, 34.00, 3.2), ( 7100, 34.00, 3.2),
+ ( 9100, 98.00, 4.7), ( 9100, 98.00, 4.7),
+ (13100, 192.00, 4.9), (13100, 192.00, 4.9),
+ (19100, 388.00, 4.9), (19100, 388.00, 4.9),
+ (28100, 682.00, 4.9), (28100, 682.00, 4.9),
+ ('inf', 1123.00, 4.9), ('inf', 1123.00, 4.9),
+ ), ),
+ 'semi-annual': ( 'semi-annual': (
+ ( 6200, 0.00, 0.0), ( 6200, 0.00, 0.0),
+ (10200, 0.00, 1.7), (10200, 0.00, 1.7),
+ (14200, 68.00, 3.2), (14200, 68.00, 3.2),
+ (18200, 196.00, 4.7), (18200, 196.00, 4.7),
+ (26200, 384.00, 4.9), (26200, 384.00, 4.9),
+ (38200, 776.00, 4.9), (38200, 776.00, 4.9),
+ (56200, 1364.00, 4.9), (56200, 1364.00, 4.9),
+ ('inf', 2246.00, 4.9), ('inf', 2246.00, 4.9),
+ ), ),
+ 'annually': ( 'annually': (
+ ( 12400, 0.00, 0.0), ( 12400, 0.00, 0.0),
+ ( 20400, 0.00, 1.7), ( 20400, 0.00, 1.7),
+ ( 28400, 136.00, 3.2), ( 28400, 136.00, 3.2),
+ ( 36400, 392.00, 4.7), ( 36400, 392.00, 4.7),
+ ( 52400, 768.00, 4.9), ( 52400, 768.00, 4.9),
+ ( 76400, 1552.00, 4.9), ( 76400, 1552.00, 4.9),
+ (112400, 2728.00, 4.9), (112400, 2728.00, 4.9),
+ ( 'inf', 4492.00, 4.9), ( 'inf', 4492.00, 4.9),
+ ), ),
}, },
'married_as_single': { 'married_as_single': {
+ 'weekly': ( 'weekly': (
+ ( 179, 0.00, 0.0), ( 179, 0.00, 0.0),
+ ( 333, 0.00, 1.7), ( 333, 0.00, 1.7),
+ ( 487, 2.62, 3.2), ( 487, 2.62, 3.2),
+ ( 641, 7.54, 4.7), ( 641, 7.54, 4.7),
+ ( 949, 14.77, 4.9), ( 949, 14.77, 4.9),
+ ( 1410, 29.85, 4.9), ( 1410, 29.85, 4.9),
+ ( 2102, 52.46, 4.9), ( 2102, 52.46, 4.9),
+ ('inf', 86.38, 4.9), ('inf', 86.38, 4.9),
+ ), ),
+ 'bi-weekly': ( 'bi-weekly': (
+ ( 359, 0.00, 0.0), ( 359, 0.00, 0.0),
+ ( 666, 0.00, 1.7), ( 666, 0.00, 1.7),
+ ( 974, 5.23, 3.2), ( 974, 5.23, 3.2),
+ ( 1282, 15.08, 4.7), ( 1282, 15.08, 4.7),
+ ( 1897, 29.54, 4.9), ( 1897, 29.54, 4.9),
+ ( 2820, 59.69, 4.9), ( 2820, 59.69, 4.9),
+ ( 4205, 104.92, 4.9), ( 4205, 104.92, 4.9),
+ ('inf', 172.77, 4.9), ('inf', 172.77, 4.9),
+ ), ),
+ 'semi-monthly': ( 'semi-monthly': (
+ ( 389, 0.00, 0.0), ( 389, 0.00, 0.0),
+ ( 722, 0.00, 1.7), ( 722, 0.00, 1.7),
+ ( 1055, 5.67, 3.2), ( 1055, 5.67, 3.2),
+ ( 1389, 16.33, 4.7), ( 1389, 16.33, 4.7),
+ ( 2055, 32.00, 4.9), ( 2055, 32.00, 4.9),
+ ( 3055, 64.67, 4.9), ( 3055, 64.67, 4.9),
+ ( 4555, 113.67, 4.9), ( 4555, 113.67, 4.9),
+ ('inf', 187.17, 4.9), ('inf', 187.17, 4.9),
+ ), ),
+ 'monthly': ( 'monthly': (
+ ( 777, 0.00, 0.0), ( 777, 0.00, 0.0),
+ ( 1444, 0.00, 1.7), ( 1444, 0.00, 1.7),
+ ( 2110, 11.33, 3.2), ( 2110, 11.33, 3.2),
+ ( 2777, 32.67, 4.7), ( 2777, 32.67, 4.7),
+ ( 4110, 64.00, 4.9), ( 4110, 64.00, 4.9),
+ ( 6110, 129.33, 4.9), ( 6110, 129.33, 4.9),
+ ( 9110, 227.33, 4.9), ( 9110, 227.33, 4.9),
+ ('inf', 374.33, 4.9), ('inf', 374.33, 4.9),
+ ), ),
+ 'quarterly': ( 'quarterly': (
+ ( 2331, 0.00, 0.0), ( 2331, 0.00, 0.0),
+ ( 4331, 0.00, 1.7), ( 4331, 0.00, 1.7),
+ ( 6331, 34.00, 3.2), ( 6331, 34.00, 3.2),
+ ( 8331, 98.00, 4.7), ( 8331, 98.00, 4.7),
+ ( 12331, 192.00, 4.9), ( 12331, 192.00, 4.9),
+ ( 18331, 388.00, 4.9), ( 18331, 388.00, 4.9),
+ ( 27331, 682.00, 4.9), ( 27331, 682.00, 4.9),
+ ( 'inf', 1123.00, 4.9), ( 'inf', 1123.00, 4.9),
+ ), ),
+ 'semi-annual': ( 'semi-annual': (
+ ( 4663, 0.00, 0.0), ( 4663, 0.00, 0.0),
+ ( 8663, 0.00, 1.7), ( 8663, 0.00, 1.7),
+ ( 12663, 68.00, 3.2), ( 12663, 68.00, 3.2),
+ ( 16663, 196.00, 4.7), ( 16663, 196.00, 4.7),
+ ( 24663, 384.00, 4.9), ( 24663, 384.00, 4.9),
+ ( 36663, 776.00, 4.9), ( 36663, 776.00, 4.9),
+ ( 54663, 1364.00, 4.9), ( 54663, 1364.00, 4.9),
+ ( 'inf', 2246.00, 4.9), ( 'inf', 2246.00, 4.9),
+ ), ),
+ 'annually': ( 'annually': (
+ ( 9325, 0.00, 0.0), ( 9325, 0.00, 0.0),
+ ( 17325, 0.00, 1.7), ( 17325, 0.00, 1.7),
+ ( 25325, 136.00, 3.2), ( 25325, 136.00, 3.2),
+ ( 33325, 392.00, 4.7), ( 33325, 392.00, 4.7),
+ ( 49325, 768.00, 4.9), ( 49325, 768.00, 4.9),
+ ( 73325, 1552.00, 4.9), ( 73325, 1552.00, 4.9),
+ (109325, 2728.00, 4.9), (109325, 2728.00, 4.9),
+ ( 'inf', 4492.00, 4.9), ( 'inf', 4492.00, 4.9),
+ ), ),
}, },
}</field> }</field>
<field name="date_from" eval="datetime(2020, 1, 1).date()"/> <field name="date_from" eval="datetime(2020, 1, 1).date()"/>

View File

@@ -163,7 +163,7 @@ class TestUsALPayslip(TestUsPayslip):
contract = self._createContract(employee, contract = self._createContract(employee,
wage=salary, wage=salary,
state_id=self.get_us_state('AL'), state_id=self.get_us_state('AL'),
al_a4_sit_exemptions='0', al_a4_sit_exemptions='',
state_income_tax_additional_withholding=0.0, state_income_tax_additional_withholding=0.0,
state_income_tax_exempt=True, state_income_tax_exempt=True,
al_a4_sit_dependents=dependents, al_a4_sit_dependents=dependents,

View File

@@ -114,7 +114,7 @@ class TestUsGAPayslip(TestUsPayslip):
salary = 25000.00 salary = 25000.00
schedule_pay = 'monthly' schedule_pay = 'monthly'
allowances = 2 allowances = 2
filing_status = 'exempt' filing_status = ''
additional_wh = 15.00 additional_wh = 15.00
employee = self._createEmployee() employee = self._createEmployee()