mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[IMP] l10n_us_hr_payroll: new WA Cares 2022
This commit is contained in:
@@ -70,6 +70,18 @@
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
|
||||
<record id="rule_parameter_us_wa_cares_rate_ee" model="hr.rule.parameter">
|
||||
<field name="name">US WA Washington Cares (Employee)</field>
|
||||
<field name="code">us_wa_cares_rate_ee</field>
|
||||
<field name="country_id" ref="base.us"/>
|
||||
</record>
|
||||
<!-- didn't exist but helpful to back date for tests -->
|
||||
<record id="rule_parameter_us_wa_cares_rate_ee_2020" model="hr.rule.parameter.value">
|
||||
<field name="parameter_value">0.0</field>
|
||||
<field name="rule_parameter_id" ref="rule_parameter_us_wa_cares_rate_ee"/>
|
||||
<field name="date_from" eval="datetime(2020, 1, 1).date()"/>
|
||||
</record>
|
||||
|
||||
<!-- Partners and Contribution Registers -->
|
||||
<record id="res_partner_us_wa_dor" model="res.partner">
|
||||
<field name="name">US Washington - Employment Security Department (Unemployment)</field>
|
||||
@@ -137,6 +149,21 @@
|
||||
<field name="partner_id" ref="res_partner_us_wa_dor_fml"/>
|
||||
<field name="appears_on_payslip" eval="True"/>
|
||||
</record>
|
||||
<record id="hr_payroll_rule_ee_us_wa_cares" model="hr.salary.rule">
|
||||
<field name="sequence" eval="197"/>
|
||||
<field name="struct_id" ref="hr_payroll_structure"/>
|
||||
<field name="category_id" ref="hr_payroll.DED"/>
|
||||
<field name="name">EE: US WA Washington State Cares</field>
|
||||
<field name="code">EE_US_WA_CARES</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="condition_python">result, _ = wa_washington_cares_ee(payslip, categories, worked_days, inputs)
|
||||
</field>
|
||||
<field name="amount_select">code</field>
|
||||
<field name="amount_python_compute">result, result_rate = wa_washington_cares_ee(payslip, categories, worked_days, inputs)
|
||||
</field>
|
||||
<field name="partner_id" ref="res_partner_us_wa_dor_fml"/>
|
||||
<field name="appears_on_payslip" eval="True"/>
|
||||
</record>
|
||||
|
||||
<!-- LNI May need to be updated depending on hours worked (or drywall laid) -->
|
||||
<record id="hr_payroll_rule_er_us_wa_lni" model="hr.salary.rule">
|
||||
|
||||
@@ -48,7 +48,8 @@ from .state.ut_utah import ut_utah_state_income_withholding
|
||||
from .state.vt_vermont import vt_vermont_state_income_withholding
|
||||
from .state.va_virginia import va_virginia_state_income_withholding
|
||||
from .state.wa_washington import wa_washington_fml_er, \
|
||||
wa_washington_fml_ee
|
||||
wa_washington_fml_ee, \
|
||||
wa_washington_cares_ee
|
||||
from .state.wi_wisconsin import wi_wisconsin_state_income_withholding
|
||||
from .state.wv_west_virginia import wv_west_virginia_state_income_withholding
|
||||
|
||||
@@ -119,6 +120,7 @@ class HRPayslip(models.Model):
|
||||
'va_virginia_state_income_withholding': va_virginia_state_income_withholding,
|
||||
'wa_washington_fml_er': wa_washington_fml_er,
|
||||
'wa_washington_fml_ee': wa_washington_fml_ee,
|
||||
'wa_washington_cares_ee': wa_washington_cares_ee,
|
||||
'wi_wisconsin_state_income_withholding': wi_wisconsin_state_income_withholding,
|
||||
'wv_west_virginia_state_income_withholding': wv_west_virginia_state_income_withholding,
|
||||
})
|
||||
|
||||
@@ -25,3 +25,9 @@ def wa_washington_fml_er(payslip, categories, worked_days, inputs):
|
||||
|
||||
def wa_washington_fml_ee(payslip, categories, worked_days, inputs):
|
||||
return _wa_washington_fml(payslip, categories, worked_days, inputs, inner_rate='us_wa_fml_rate_ee')
|
||||
|
||||
def wa_washington_cares_ee(payslip, categories, worked_days, inputs):
|
||||
wage = categories.GROSS
|
||||
rate = payslip.rule_parameter('us_wa_cares_rate_ee')
|
||||
# Rate assumed positive percentage!
|
||||
return wage, -rate
|
||||
|
||||
Reference in New Issue
Block a user