Initial commit of hr_workers_comp and hr_workers_comp_payroll for 11.0

This commit is contained in:
Jared Kipe
2018-07-26 13:01:21 -07:00
parent 6587768281
commit 4634bc9f40
4 changed files with 44 additions and 0 deletions

View File

@@ -0,0 +1 @@
from . import payslip

View 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
}

View 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)

View 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>