This commit is contained in:
gsinghpal
2026-04-07 22:03:20 -04:00
parent f4c6dca171
commit c30a61c93f
7 changed files with 59 additions and 81 deletions

View File

@@ -53,7 +53,7 @@ Built for Odoo Enterprise Payroll (hr_payroll).
'website': '',
'license': 'OPL-1',
'depends': [
'hr_payroll', # Core payroll functionality
'hr_payroll', # Core payroll functionality (includes hr.version for contracts)
'hr_work_entry_enterprise', # For payroll menu structure (Odoo 19)
'hr_holidays', # For vacation/leave reports
'hr_attendance', # For punch-in/out time tracking
@@ -93,13 +93,13 @@ Built for Odoo Enterprise Payroll (hr_payroll).
'reports/payroll_report_pdf.xml',
# Data (order matters!)
# 1. Rule parameters (CPP, EI, Federal, Provincial rates - Odoo native approach)
# 1. Rule parameters (CPP, EI, Federal, Provincial rates)
'data/hr_rule_parameter_data.xml',
# 2. Input types for additional pay (OT, Stat, Bonus)
'data/hr_payslip_input_type_data.xml',
# 3. Payroll structure (creates structure and category)
# 2. Payroll structure + categories (must be before rules and input types)
'data/hr_payroll_structure.xml',
# 5. Canadian salary rules (references structure and parameters)
# 3. Input types (references structure)
'data/hr_payslip_input_type_data.xml',
# 4. Canadian salary rules (references structure and parameters)
'data/hr_salary_rules.xml',
# 6. Sequences
'data/ir_sequence_data.xml',

View File

@@ -1,7 +1,8 @@
# -*- coding: utf-8 -*-
from . import hr_employee
from . import hr_contract
# hr_contract.py is not imported: hr.contract model does not exist in Odoo 19
# (replaced by hr.version in Enterprise payroll)
from . import hr_payslip
from . import hr_roe
from . import hr_tax_remittance

View File

@@ -293,14 +293,3 @@ class HrTaxRemittance(models.Model):
remittance.action_calculate_amounts()
return remittance
class HrTaxRemittanceSequence(models.Model):
"""Create sequence for tax remittance"""
_name = 'hr.tax.remittance.sequence'
_description = 'Tax Remittance Sequence Setup'
_auto = False
def init(self):
# This will be handled by ir.sequence data instead
pass

View File

@@ -49,7 +49,6 @@ access_cheque_layout_settings_user,cheque.layout.settings user,model_cheque_layo
access_cheque_layout_settings_manager,cheque.layout.settings manager,model_cheque_layout_settings,hr.group_hr_manager,1,1,1,1
access_cheque_layout_preview_wizard_user,cheque.layout.preview.wizard user,model_cheque_layout_preview_wizard,hr.group_hr_user,1,1,1,1
access_payroll_cheque_number_wizard_user,payroll.cheque.number.wizard user,model_payroll_cheque_number_wizard,hr.group_hr_user,1,1,1,1
access_hr_tax_remittance_sequence,hr.tax.remittance.sequence,model_hr_tax_remittance_sequence,hr.group_hr_manager,1,1,1,1
access_fusion_payroll_migration_user,fusion.payroll.migration user,model_fusion_payroll_migration,hr.group_hr_user,1,0,0,0
access_fusion_payroll_migration_manager,fusion.payroll.migration manager,model_fusion_payroll_migration,hr.group_hr_manager,1,1,1,1
access_fusion_payroll_migration_log_user,fusion.payroll.migration.log user,model_fusion_payroll_migration_log,hr.group_hr_user,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
49 access_cheque_layout_settings_manager cheque.layout.settings manager model_cheque_layout_settings hr.group_hr_manager 1 1 1 1
50 access_cheque_layout_preview_wizard_user cheque.layout.preview.wizard user model_cheque_layout_preview_wizard hr.group_hr_user 1 1 1 1
51 access_payroll_cheque_number_wizard_user payroll.cheque.number.wizard user model_payroll_cheque_number_wizard hr.group_hr_user 1 1 1 1
access_hr_tax_remittance_sequence hr.tax.remittance.sequence model_hr_tax_remittance_sequence hr.group_hr_manager 1 1 1 1
52 access_fusion_payroll_migration_user fusion.payroll.migration user model_fusion_payroll_migration hr.group_hr_user 1 0 0 0
53 access_fusion_payroll_migration_manager fusion.payroll.migration manager model_fusion_payroll_migration hr.group_hr_manager 1 1 1 1
54 access_fusion_payroll_migration_log_user fusion.payroll.migration.log user model_fusion_payroll_migration_log hr.group_hr_user 1 0 0 0

View File

@@ -142,11 +142,7 @@
<field name="domain">[('country_id.code', '=', 'CA')]</field>
</record>
<record id="action_fusion_yearly_rates" model="ir.actions.act_window">
<field name="name">Yearly Rates (Legacy)</field>
<field name="res_model">tax.yearly.rates</field>
<field name="view_mode">list,form</field>
</record>
<!-- Legacy yearly rates action removed: tax.yearly.rates model no longer exists -->
<!-- ============================================================ -->
<!-- MAIN MENU: FUSION PAYROLL -->
@@ -494,12 +490,6 @@
action="action_fusion_input_types"
sequence="40"/>
<menuitem id="menu_fusion_config_yearly"
name="Yearly Rates (Legacy)"
parent="menu_fusion_config"
action="action_fusion_yearly_rates"
sequence="50"/>
<menuitem id="menu_fusion_work_locations"
name="Work Locations"
parent="menu_fusion_config"
@@ -525,6 +515,12 @@
action="action_cheque_layout_settings"
sequence="75"/>
<menuitem id="menu_fusion_cheques"
name="Cheques"
parent="menu_fusion_payroll_root"
action="action_payroll_cheque"
sequence="25"/>
<menuitem id="menu_fusion_migration"
name="Import from QuickBooks"
parent="menu_fusion_config"

View File

@@ -47,17 +47,6 @@
<!-- Note: Payslip batch view extension moved to hr_payslip_views.xml -->
<!-- The cheque buttons can be added once the correct view ID is identified -->
<!-- ============================================================ -->
<!-- ADD CHEQUE MENU ITEMS -->
<!-- ============================================================ -->
<!-- Cheques menu under Fusion Payroll -->
<menuitem id="menu_fusion_cheques"
name="Cheques"
parent="menu_fusion_payroll_root"
action="action_payroll_cheque"
sequence="25"/>
<!-- Removed duplicate menu - use cheque_layout_settings_views.xml instead -->
<!-- Menu items moved to fusion_payroll_menus.xml -->
</odoo>

View File

@@ -1,6 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- ============================================================ -->
<!-- PAYROLL CHEQUE ACTIONS (must be before views that reference) -->
<!-- ============================================================ -->
<!-- Cheque Search View -->
<record id="payroll_cheque_view_search" model="ir.ui.view">
<field name="name">payroll.cheque.search</field>
<field name="model">payroll.cheque</field>
<field name="arch" type="xml">
<search string="Search Cheques">
<field name="cheque_number"/>
<field name="employee_id"/>
<field name="payslip_id"/>
<field name="payslip_run_id"/>
<filter name="draft" string="Draft" domain="[('state', '=', 'draft')]"/>
<filter name="printed" string="Printed" domain="[('state', '=', 'printed')]"/>
<filter name="cashed" string="Cashed" domain="[('state', '=', 'cashed')]"/>
<filter name="voided" string="Voided" domain="[('state', '=', 'voided')]"/>
<filter name="group_employee" string="Employee" context="{'group_by': 'employee_id'}"/>
<filter name="group_batch" string="Payslip Batch" context="{'group_by': 'payslip_run_id'}"/>
<filter name="group_state" string="Status" context="{'group_by': 'state'}"/>
<filter name="group_date" string="Date" context="{'group_by': 'cheque_date:month'}"/>
</search>
</field>
</record>
<!-- Cheque Action -->
<record id="action_payroll_cheque" model="ir.actions.act_window">
<field name="name">Cheques</field>
<field name="res_model">payroll.cheque</field>
<field name="view_mode">list,form</field>
<field name="search_view_id" ref="payroll_cheque_view_search"/>
<field name="context">{'search_default_draft': 1}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
No cheques found
</p>
<p>
Cheques are created when you process payroll for employees with payment method set to "Cheque".
</p>
</field>
</record>
<!-- ============================================================ -->
<!-- PAYROLL CHEQUE VIEWS -->
<!-- ============================================================ -->
@@ -137,45 +180,6 @@
</field>
</record>
<!-- Cheque Search View -->
<record id="payroll_cheque_view_search" model="ir.ui.view">
<field name="name">payroll.cheque.search</field>
<field name="model">payroll.cheque</field>
<field name="arch" type="xml">
<search string="Search Cheques">
<field name="cheque_number"/>
<field name="employee_id"/>
<field name="payslip_id"/>
<field name="payslip_run_id"/>
<filter name="draft" string="Draft" domain="[('state', '=', 'draft')]"/>
<filter name="printed" string="Printed" domain="[('state', '=', 'printed')]"/>
<filter name="cashed" string="Cashed" domain="[('state', '=', 'cashed')]"/>
<filter name="voided" string="Voided" domain="[('state', '=', 'voided')]"/>
<filter name="group_employee" string="Employee" context="{'group_by': 'employee_id'}"/>
<filter name="group_batch" string="Payslip Batch" context="{'group_by': 'payslip_run_id'}"/>
<filter name="group_state" string="Status" context="{'group_by': 'state'}"/>
<filter name="group_date" string="Date" context="{'group_by': 'cheque_date:month'}"/>
</search>
</field>
</record>
<!-- Cheque Action -->
<record id="action_payroll_cheque" model="ir.actions.act_window">
<field name="name">Cheques</field>
<field name="res_model">payroll.cheque</field>
<field name="view_mode">list,form</field>
<field name="search_view_id" ref="payroll_cheque_view_search"/>
<field name="context">{'search_default_draft': 1}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
No cheques found
</p>
<p>
Cheques are created when you process payroll for employees with payment method set to "Cheque".
</p>
</field>
</record>
<!-- ============================================================ -->
<!-- CHEQUE VOID WIZARD VIEW -->
<!-- ============================================================ -->