From 03b342eab66cfe24eb6c02a10cac45649843387a Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Fri, 2 Nov 2018 12:24:49 -0700 Subject: [PATCH] IMP `l10n_us_ca_hr_payroll` to use a single contribution register. Migration in the README --- l10n_us_ca_hr_payroll/README.rst | 16 +++++++++ l10n_us_ca_hr_payroll/__manifest__.py | 2 +- l10n_us_ca_hr_payroll/data/base.xml | 42 +++++++++++++---------- l10n_us_ca_hr_payroll/data/rules_2018.xml | 6 ++-- 4 files changed, 44 insertions(+), 22 deletions(-) diff --git a/l10n_us_ca_hr_payroll/README.rst b/l10n_us_ca_hr_payroll/README.rst index f5549551..1bb76362 100644 --- a/l10n_us_ca_hr_payroll/README.rst +++ b/l10n_us_ca_hr_payroll/README.rst @@ -41,6 +41,22 @@ New Payslip Categories for: * California Unemployment Insurance Tax * California Employee Training Tax +Upgrading to 11.0.2018.1.0 +========================== + +If you were using this prior to November 2018, then you have more Contribution registers +and partners than you need! Simply run the following before installing the new code and upgrading. + +Odoo Shell code:: + + main_cr = env.ref('l10n_us_ca_hr_payroll.contrib_register_cador_uit') + old_1 = env.ref('l10n_us_ca_hr_payroll.contrib_register_cador_withhold') + old_2 = env.ref('l10n_us_ca_hr_payroll.contrib_register_cador_ett') + old_3 = env.ref('l10n_us_ca_hr_payroll.contrib_register_cador_sdi') + lines = env['hr.payslip.line'].search([('register_id', 'in', [old_1.id, old_2.id, old_3.id])]) + lines.write({'register_id': main_cr.id}) + env.cr.commit() + ======= License diff --git a/l10n_us_ca_hr_payroll/__manifest__.py b/l10n_us_ca_hr_payroll/__manifest__.py index c038486a..b712cbae 100755 --- a/l10n_us_ca_hr_payroll/__manifest__.py +++ b/l10n_us_ca_hr_payroll/__manifest__.py @@ -4,7 +4,7 @@ 'license': 'AGPL-3', 'category': 'Localization', 'depends': ['l10n_us_hr_payroll'], - 'version': '11.0.2018.0.0', + 'version': '11.0.2018.1.0', 'description': """ USA::California Payroll Rules. ============================== diff --git a/l10n_us_ca_hr_payroll/data/base.xml b/l10n_us_ca_hr_payroll/data/base.xml index 93ac0a62..6ec2431a 100755 --- a/l10n_us_ca_hr_payroll/data/base.xml +++ b/l10n_us_ca_hr_payroll/data/base.xml @@ -3,7 +3,7 @@ - California Department of Taxation - Unemployment Insurance Tax + California Department of Taxation (CA DE88) 1 @@ -11,38 +11,44 @@ California Department of Taxation - Income Tax Withholding 1 + California Department of Taxation - Employment Training Tax 1 + California Department of Taxation - State Disability Insurance 1 + - California Unemployment Insurance Tax - California Department of Taxation - Unemployment Insurance Tax + California (CA DE88) + California Department of Taxation (CA DE88) - - California Income Tax Withholding - California Department of Taxation - Income Tax Withholding - - - - Employment Training Tax - California Department of Taxation - Employment Training Tax - - - - State Disability Insurance - California Department of Taxation - State Disability Insurance - - + + + + + + + + + + + + + + + + + + diff --git a/l10n_us_ca_hr_payroll/data/rules_2018.xml b/l10n_us_ca_hr_payroll/data/rules_2018.xml index e74376a1..8602b1bc 100755 --- a/l10n_us_ca_hr_payroll/data/rules_2018.xml +++ b/l10n_us_ca_hr_payroll/data/rules_2018.xml @@ -87,7 +87,7 @@ result = categories.CA_ETT_WAGES if result_rate == 0.0: result = 0.0 - + @@ -131,7 +131,7 @@ result = categories.CA_SDI_WAGES if result_rate == 0.0: result = 0.0 - + @@ -569,7 +569,7 @@ if not low_income: result = -tax - +