Files
suite/l10n_us_hr_payroll/models/hr_contract.py
Jared Kipe fe423e0d0b [MIG] l10n_us_hr_payroll: to Odoo 14.0
Require `hr_payroll_hibou`, remove a lot of 'fixes' and stuff that is useful for 'all' payroll.

Failing tests:

Deleware 2020 is low by ~0.1% in SIT only.
Pennsylvania 2019, 2020 is low by ~0.01% in SIT only.
I did not try to correct, only verify that the data and calculation is the same between versions. (which it is)

Washington 2019, 2020 hours was off  (183.99972222222223 != 184)
Fixed by turning it into assertAlmostEqual
2021-10-07 13:09:15 +00:00

24 lines
908 B
Python

# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
from odoo import api, fields, models
from .us_payroll_config import FUTA_TYPE_NORMAL, \
FUTA_TYPE_BASIC, \
FUTA_TYPE_EXEMPT
class USHRContract(models.Model):
_inherit = 'hr.contract'
FUTA_TYPE_NORMAL = FUTA_TYPE_NORMAL
FUTA_TYPE_BASIC = FUTA_TYPE_BASIC
FUTA_TYPE_EXEMPT = FUTA_TYPE_EXEMPT
us_payroll_config_id = fields.Many2one('hr.contract.us_payroll_config', 'Payroll Forms')
external_wages = fields.Float(string='External Existing Wages')
# Simplified fields for easier rules, state code will exempt based on contract's futa_type
futa_type = fields.Selection(related='us_payroll_config_id.fed_940_type')
def us_payroll_config_value(self, name):
return self.us_payroll_config_id[name]