mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
IMP l10n_us_ca_hr_payroll to use a single contribution register.
Migration in the README
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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.
|
||||
==============================
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<data>
|
||||
<!-- CONTRIBUTION REGISTERS -->
|
||||
<record id="res_partner_cador_uit" model="res.partner">
|
||||
<field name="name">California Department of Taxation - Unemployment Insurance Tax</field>
|
||||
<field name="name">California Department of Taxation (CA DE88)</field>
|
||||
<field name="supplier">1</field>
|
||||
<field eval="0" name="customer"/>
|
||||
</record>
|
||||
@@ -11,38 +11,44 @@
|
||||
<field name="name">California Department of Taxation - Income Tax Withholding</field>
|
||||
<field name="supplier">1</field>
|
||||
<field eval="0" name="customer"/>
|
||||
<field eval="False" name="active"/>
|
||||
</record>
|
||||
<record id="res_partner_cador_ett" model="res.partner">
|
||||
<field name="name">California Department of Taxation - Employment Training Tax</field>
|
||||
<field name="supplier">1</field>
|
||||
<field eval="0" name="customer"/>
|
||||
<field eval="False" name="active"/>
|
||||
</record>
|
||||
<record id="res_partner_cador_sdi" model="res.partner">
|
||||
<field name="name">California Department of Taxation - State Disability Insurance</field>
|
||||
<field name="supplier">1</field>
|
||||
<field eval="0" name="customer"/>
|
||||
<field eval="False" name="active"/>
|
||||
</record>
|
||||
|
||||
<record id="contrib_register_cador_uit" model="hr.contribution.register">
|
||||
<field name="name">California Unemployment Insurance Tax</field>
|
||||
<field name="note">California Department of Taxation - Unemployment Insurance Tax</field>
|
||||
<field name="name">California (CA DE88)</field>
|
||||
<field name="note">California Department of Taxation (CA DE88)</field>
|
||||
<field name="partner_id" ref="res_partner_cador_uit"/>
|
||||
</record>
|
||||
<record id="contrib_register_cador_withhold" model="hr.contribution.register">
|
||||
<field name="name">California Income Tax Withholding</field>
|
||||
<field name="note">California Department of Taxation - Income Tax Withholding</field>
|
||||
<field name="partner_id" ref="res_partner_cador_withhold"/>
|
||||
</record>
|
||||
<record id="contrib_register_cador_ett" model="hr.contribution.register">
|
||||
<field name="name">Employment Training Tax</field>
|
||||
<field name="note">California Department of Taxation - Employment Training Tax</field>
|
||||
<field name="partner_id" ref="res_partner_cador_ett"/>
|
||||
</record>
|
||||
<record id="contrib_register_cador_sdi" model="hr.contribution.register">
|
||||
<field name="name">State Disability Insurance</field>
|
||||
<field name="note">California Department of Taxation - State Disability Insurance</field>
|
||||
<field name="partner_id" ref="res_partner_cador_sdi"/>
|
||||
</record>
|
||||
|
||||
<!-- These are deprecated in favor of a single grouped register for CA DE88 -->
|
||||
<!-- They are left here in case their details or structure is needed later. -->
|
||||
<!--<record id="contrib_register_cador_withhold" model="hr.contribution.register">-->
|
||||
<!--<field name="name">California Income Tax Withholding</field>-->
|
||||
<!--<field name="note">California Department of Taxation - Income Tax Withholding</field>-->
|
||||
<!--<field name="partner_id" ref="res_partner_cador_withhold"/>-->
|
||||
<!--</record>-->
|
||||
<!--<record id="contrib_register_cador_ett" model="hr.contribution.register">-->
|
||||
<!--<field name="name">Employment Training Tax</field>-->
|
||||
<!--<field name="note">California Department of Taxation - Employment Training Tax</field>-->
|
||||
<!--<field name="partner_id" ref="res_partner_cador_ett"/>-->
|
||||
<!--</record>-->
|
||||
<!--<record id="contrib_register_cador_sdi" model="hr.contribution.register">-->
|
||||
<!--<field name="name">State Disability Insurance</field>-->
|
||||
<!--<field name="note">California Department of Taxation - State Disability Insurance</field>-->
|
||||
<!--<field name="partner_id" ref="res_partner_cador_sdi"/>-->
|
||||
<!--</record>-->
|
||||
|
||||
|
||||
<!-- HR SALARY RULE CATEGORIES-->
|
||||
|
||||
@@ -87,7 +87,7 @@ result = categories.CA_ETT_WAGES
|
||||
if result_rate == 0.0:
|
||||
result = 0.0
|
||||
</field>
|
||||
<field name="register_id" ref="contrib_register_cador_ett"/>
|
||||
<field name="register_id" ref="contrib_register_cador_uit"/>
|
||||
<field name="appears_on_payslip" eval="False"/>
|
||||
</record>
|
||||
|
||||
@@ -131,7 +131,7 @@ result = categories.CA_SDI_WAGES
|
||||
if result_rate == 0.0:
|
||||
result = 0.0
|
||||
</field>
|
||||
<field name="register_id" ref="contrib_register_cador_sdi"/>
|
||||
<field name="register_id" ref="contrib_register_cador_uit"/>
|
||||
<field name="appears_on_payslip" eval="False"/>
|
||||
</record>
|
||||
|
||||
@@ -569,7 +569,7 @@ if not low_income:
|
||||
|
||||
result = -tax
|
||||
</field>
|
||||
<field name="register_id" ref="contrib_register_cador_withhold"/>
|
||||
<field name="register_id" ref="contrib_register_cador_uit"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
|
||||
Reference in New Issue
Block a user