mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
IMP Allow FICA Exemption (e.g. for F1 Student Visa)
Additionally, improve requirements on `hr_workers_comp_payroll`
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'category': 'Human Resources',
|
'category': 'Human Resources',
|
||||||
'depends': [
|
'depends': [
|
||||||
'hr_contract',
|
'hr_payroll',
|
||||||
'hr_workers_comp',
|
'hr_workers_comp',
|
||||||
],
|
],
|
||||||
'version': '11.0.0.0.0',
|
'version': '11.0.0.0.0',
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'category': 'Localization',
|
'category': 'Localization',
|
||||||
'depends': ['hr_payroll'],
|
'depends': ['hr_payroll'],
|
||||||
'version': '11.0.2017.0.0',
|
'version': '11.0.2018.1.0',
|
||||||
'description': """
|
'description': """
|
||||||
USA Payroll Rules.
|
USA Payroll Rules.
|
||||||
==================
|
==================
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<field name="name">FICA Employee Social Security Wages (2018)</field>
|
<field name="name">FICA Employee Social Security Wages (2018)</field>
|
||||||
<field name="code">FICA_EMP_SS_WAGES_2018</field>
|
<field name="code">FICA_EMP_SS_WAGES_2018</field>
|
||||||
<field name="condition_select">python</field>
|
<field name="condition_select">python</field>
|
||||||
<field name="condition_python">result = (payslip.date_to[:4] == '2018')</field>
|
<field name="condition_python">result = (payslip.date_to[:4] == '2018') and not contract.fica_exempt</field>
|
||||||
<field name="amount_select">code</field>
|
<field name="amount_select">code</field>
|
||||||
<field name="amount_python_compute">
|
<field name="amount_python_compute">
|
||||||
###
|
###
|
||||||
@@ -32,7 +32,7 @@ else:
|
|||||||
<field name="name">FICA Employee Medicare Wages (2018)</field>
|
<field name="name">FICA Employee Medicare Wages (2018)</field>
|
||||||
<field name="code">FICA_EMP_M_WAGES_2018</field>
|
<field name="code">FICA_EMP_M_WAGES_2018</field>
|
||||||
<field name="condition_select">python</field>
|
<field name="condition_select">python</field>
|
||||||
<field name="condition_python">result = (payslip.date_to[:4] == '2018')</field>
|
<field name="condition_python">result = (payslip.date_to[:4] == '2018') and not contract.fica_exempt</field>
|
||||||
<field name="amount_select">code</field>
|
<field name="amount_select">code</field>
|
||||||
<field name="amount_python_compute">result = categories.GROSS</field>
|
<field name="amount_python_compute">result = categories.GROSS</field>
|
||||||
<field name="appears_on_payslip" eval="False"/>
|
<field name="appears_on_payslip" eval="False"/>
|
||||||
@@ -43,7 +43,7 @@ else:
|
|||||||
<field name="name">FICA Employee Medicare Additional Wages (2018)</field>
|
<field name="name">FICA Employee Medicare Additional Wages (2018)</field>
|
||||||
<field name="code">FICA_EMP_M_ADD_WAGES_2018</field>
|
<field name="code">FICA_EMP_M_ADD_WAGES_2018</field>
|
||||||
<field name="condition_select">python</field>
|
<field name="condition_select">python</field>
|
||||||
<field name="condition_python">result = (payslip.date_to[:4] == '2018')</field>
|
<field name="condition_python">result = (payslip.date_to[:4] == '2018') and not contract.fica_exempt</field>
|
||||||
<field name="amount_select">code</field>
|
<field name="amount_select">code</field>
|
||||||
<field name="amount_python_compute">
|
<field name="amount_python_compute">
|
||||||
###
|
###
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ class USHrContract(models.Model):
|
|||||||
|
|
||||||
external_wages = fields.Float(string='External Existing Wages', default=0.0)
|
external_wages = fields.Float(string='External Existing Wages', default=0.0)
|
||||||
|
|
||||||
|
fica_exempt = fields.Boolean(string='FICA Exempt', help="Exempt from Social Security and "
|
||||||
|
"Medicare e.g. F1 Student Visa")
|
||||||
futa_type = fields.Selection([
|
futa_type = fields.Selection([
|
||||||
(FUTA_TYPE_EXEMPT, 'Exempt (0%)'),
|
(FUTA_TYPE_EXEMPT, 'Exempt (0%)'),
|
||||||
(FUTA_TYPE_NORMAL, 'Normal Net Rate (0.6%)'),
|
(FUTA_TYPE_NORMAL, 'Normal Net Rate (0.6%)'),
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
<group string="Other" name="other">
|
<group string="Other" name="other">
|
||||||
<field name="external_wages" string="External YTD Wages"/>
|
<field name="external_wages" string="External YTD Wages"/>
|
||||||
<field name="futa_type" string="Unemployment Tax Type (FUTA)"/>
|
<field name="futa_type" string="Unemployment Tax Type (FUTA)"/>
|
||||||
|
<field name="fica_exempt"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
</page>
|
</page>
|
||||||
|
|||||||
@@ -342,3 +342,27 @@ class TestUsPayslip2018(TestUsPayslip):
|
|||||||
if 'FED_INC_WITHHOLD' in cats:
|
if 'FED_INC_WITHHOLD' in cats:
|
||||||
fed_inc_withhold = cats['FED_INC_WITHHOLD']
|
fed_inc_withhold = cats['FED_INC_WITHHOLD']
|
||||||
self.assertPayrollEqual(fed_inc_withhold, 0.0)
|
self.assertPayrollEqual(fed_inc_withhold, 0.0)
|
||||||
|
|
||||||
|
def test_2018_taxes_with_fica_exempt(self):
|
||||||
|
salary = 6000.0
|
||||||
|
schedule_pay = 'bi-weekly'
|
||||||
|
w4_allowances = 2
|
||||||
|
employee = self._createEmployee()
|
||||||
|
contract = self._createContract(employee, salary, schedule_pay, w4_allowances)
|
||||||
|
contract.fica_exempt = True
|
||||||
|
|
||||||
|
self._log('2018 tax w4 exempt payslip:')
|
||||||
|
payslip = self._createPayslip(employee, '2018-01-01', '2018-01-31')
|
||||||
|
|
||||||
|
payslip.compute_sheet()
|
||||||
|
|
||||||
|
cats = self._getCategories(payslip)
|
||||||
|
|
||||||
|
ss_wages = cats.get('FICA_EMP_SS_WAGES', 0.0)
|
||||||
|
med_wages = cats.get('FICA_EMP_M_WAGES', 0.0)
|
||||||
|
ss = cats.get('FICA_EMP_SS', 0.0)
|
||||||
|
med = cats.get('FICA_EMP_M', 0.0)
|
||||||
|
self.assertPayrollEqual(ss_wages, 0.0)
|
||||||
|
self.assertPayrollEqual(med_wages, 0.0)
|
||||||
|
self.assertPayrollEqual(ss, 0.0)
|
||||||
|
self.assertPayrollEqual(med, 0.0)
|
||||||
|
|||||||
Reference in New Issue
Block a user