diff --git a/hr_workers_comp_payroll/__init__.py b/hr_workers_comp_payroll/__init__.py new file mode 100755 index 00000000..305e17f9 --- /dev/null +++ b/hr_workers_comp_payroll/__init__.py @@ -0,0 +1 @@ +from . import payslip diff --git a/hr_workers_comp_payroll/__manifest__.py b/hr_workers_comp_payroll/__manifest__.py new file mode 100755 index 00000000..2ccbb78d --- /dev/null +++ b/hr_workers_comp_payroll/__manifest__.py @@ -0,0 +1,21 @@ +{ + 'name': 'Workers\' Compensation Class - Payroll', + 'author': 'Hibou Corp. ', + 'license': 'AGPL-3', + 'category': 'Human Resources', + 'depends': ['hr_contract'], + 'version': '11.0.0.0.0', + 'description': """ +Workers' Compensation Class - Payroll +===================================== + +Links Payslips with Contract's WC Codes. Useful for reporting and grouping payslips. +Salary Rules can now make use of the Workers Comp code and rate. + """, + 'auto_install': True, + 'website': 'https://hibou.io/', + 'data':[ + 'payslip_views.xml', + ], + 'installable': True +} diff --git a/hr_workers_comp_payroll/payslip.py b/hr_workers_comp_payroll/payslip.py new file mode 100644 index 00000000..31833a83 --- /dev/null +++ b/hr_workers_comp_payroll/payslip.py @@ -0,0 +1,8 @@ +from odoo import api,fields,models + + +class Payslip(models.Model): + _inherit = 'hr.payslip' + + contract_wc_code_id = fields.Many2one('hr.wc_code', string='Workers Comp. Code', + related='contract_id.wc_code_id', store=True) diff --git a/hr_workers_comp_payroll/payslip_views.xml b/hr_workers_comp_payroll/payslip_views.xml new file mode 100644 index 00000000..0264404f --- /dev/null +++ b/hr_workers_comp_payroll/payslip_views.xml @@ -0,0 +1,14 @@ + + + + + hr.payslip.form.inherit + hr.payslip + + + + + + + + \ No newline at end of file