mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
Initial commit of hr_workers_comp and hr_workers_comp_payroll for 11.0
This commit is contained in:
1
hr_workers_comp_payroll/__init__.py
Executable file
1
hr_workers_comp_payroll/__init__.py
Executable file
@@ -0,0 +1 @@
|
|||||||
|
from . import payslip
|
||||||
21
hr_workers_comp_payroll/__manifest__.py
Executable file
21
hr_workers_comp_payroll/__manifest__.py
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
'name': 'Workers\' Compensation Class - Payroll',
|
||||||
|
'author': 'Hibou Corp. <hello@hibou.io>',
|
||||||
|
'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
|
||||||
|
}
|
||||||
8
hr_workers_comp_payroll/payslip.py
Normal file
8
hr_workers_comp_payroll/payslip.py
Normal file
@@ -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)
|
||||||
14
hr_workers_comp_payroll/payslip_views.xml
Normal file
14
hr_workers_comp_payroll/payslip_views.xml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<odoo>
|
||||||
|
<!-- Inherited -->
|
||||||
|
<record id="view_hr_payslip_form_inherit" model="ir.ui.view">
|
||||||
|
<field name="name">hr.payslip.form.inherit</field>
|
||||||
|
<field name="model">hr.payslip</field>
|
||||||
|
<field name="inherit_id" ref="hr_payroll.view_hr_payslip_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[@name='contract_id']" position="after">
|
||||||
|
<field name="contract_wc_code_id" readonly="1"/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
</odoo>
|
||||||
Reference in New Issue
Block a user