IMP l10n_us_hr_payroll Refactor to simply tax exempt deductions.

Additionally, it is possible (from testing on other databases) to have contracts without an employee, resulting in a failed migration.  Avoid this by filtering for employees on the contract and log if something (maybe a record rule) prevents you from seeing it instead of failing the migration itself.
This commit is contained in:
Jared Kipe
2020-01-10 06:34:15 -08:00
parent b2e610c746
commit 3ec63381b2
14 changed files with 59 additions and 47 deletions

View File

@@ -20,4 +20,29 @@
<field name="parent_id" ref="hr_payroll.DED"/>
</record>
<!-- Tax Exempt Deductions -->
<!-- Deductions that reduce the wage for Federal Income Tax (e.g. 401k) -->
<record id="hr_payroll_category_ded_fit_exempt" model="hr.salary.rule.category">
<field name="name">Deduction: Federal Income Tax Exempt</field>
<field name="code">DED_US_FIT_EXEMPT</field>
</record>
<!-- Generally speaking, deductions to FICA and FUTA should probably reduce GROSS itself, there may be special or rare cases -->
<!-- Deductions that reduce the wage for FICA -->
<record id="hr_payroll_category_ded_fica_exempt" model="hr.salary.rule.category">
<field name="name">Deduction: FICA Exempt</field>
<field name="code">DED_FICA_EXEMPT</field>
<field name="parent_id" ref="hr_payroll.DED"/>
</record>
<!-- Deductions that reduce the wage for Unemployment Insurance/Tax -->
<record id="hr_payroll_category_ded_futa_exempt" model="hr.salary.rule.category">
<field name="name">Deduction: FUTA Exempt</field>
<field name="code">DED_FUTA_EXEMPT</field>
<field name="parent_id" ref="hr_payroll.DED"/>
</record>
</odoo>

View File

@@ -17,12 +17,6 @@
<field name="parent_id" ref="hr_payroll.COMP"/>
</record>
<!-- Category to increase when reducing wage for Unemployment Insurance/Tax -->
<record id="hr_payroll_category_wage_fed_940_futa_exempt" model="hr.salary.rule.category">
<field name="name">WAGE: Federal 940 FUTA Exempt</field>
<field name="code">WAGE_US_940_FUTA_EXEMPT</field>
</record>
<record id="hr_payroll_rule_er_fed_940" model="hr.salary.rule">
<field name="sequence" eval="440"/>
<field name="category_id" ref="hr_payroll_category_er_fed_940"/>

View File

@@ -23,12 +23,6 @@
<field name="parent_id" ref="hr_payroll.COMP"/>
</record>
<!-- Category to increase when reducing wage for FICA -->
<record id="hr_payroll_category_wage_fed_941_fica_exempt" model="hr.salary.rule.category">
<field name="name">WAGE: Federal 941 FICA Exempt</field>
<field name="code">WAGE_US_941_FICA_EXEMPT</field>
</record>
<!-- Social Security -->
<record id="hr_payroll_rule_ee_fed_941_ss" model="hr.salary.rule">

View File

@@ -1,10 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- Category to increase when reducing wage for Federal Income Tax (e.g. 401k) -->
<record id="hr_payroll_category_wage_fed_941_fit_exempt" model="hr.salary.rule.category">
<field name="name">WAGE: Federal 941 Income Tax Exempt</field>
<field name="code">WAGE_US_941_FIT_EXEMPT</field>
</record>
<record id="hr_payroll_category_ee_fed_941_fit" model="hr.salary.rule.category">
<field name="name">EE: Federal 941 Income Tax Withholding</field>