@@ -0,0 +1 @@
|
||||
from . import models
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
'name': "yuthon holiday",
|
||||
'summary': "假期管理",
|
||||
'description': """""",
|
||||
'author': 'zhou',
|
||||
'version': '0.1',
|
||||
'license': 'LGPL-3',
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
'views/holiday_type_setting.xml',
|
||||
'views/yuthon_holiday_type.xml',
|
||||
],
|
||||
'demo': [],
|
||||
'depends': ['hr_holidays',],
|
||||
'installable': True,
|
||||
'application': True,
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
from . import holiday_type_setting
|
||||
from . import yuthon_holiday_type
|
||||
@@ -0,0 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from odoo import models, fields, api
|
||||
|
||||
|
||||
class HolidayTypeSetting(models.Model):
|
||||
_name = 'holiday.type.setting'
|
||||
_description = '假期类别配置'
|
||||
|
||||
|
||||
name = fields.Char(string='名称', required=True)
|
||||
@@ -0,0 +1,13 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from odoo import models, fields, api
|
||||
|
||||
|
||||
class HrLeaveType(models.Model):
|
||||
_inherit = 'hr.leave.type'
|
||||
|
||||
|
||||
holiday_days = fields.Char(string='假期天数', required=True)
|
||||
vacation_type_id = fields.Many2one('holiday.type.setting', string='假期类型')
|
||||
travel_leave = fields.Char(string='路程假')
|
||||
treated = fields.Text(string='待遇')
|
||||
remarks = fields.Text(string="备注")
|
||||
@@ -0,0 +1,6 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_holiday_type_setting,access_holiday_type_setting,model_holiday_type_setting,base.group_system,1,1,1,1
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="view_holiday_type_setting_tree" model="ir.ui.view">
|
||||
<field name="name">holiday.type.setting.tree</field>
|
||||
<field name="model">holiday.type.setting</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="假期类别配置">
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_holiday_type_setting_form" model="ir.ui.view">
|
||||
<field name="name">holiday.type.setting.form</field>
|
||||
<field name="model">holiday.type.setting</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="假期类别配置">
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_holiday_type_setting_action" model="ir.actions.act_window">
|
||||
<field name="name">假期类别配置</field>
|
||||
<field name="res_model">holiday.type.setting</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id ="view_yuthon_holiday_type_tree" model="ir.ui.view">
|
||||
<field name="name">yuthon.holiday.type.tree</field>
|
||||
<field name="model">hr.leave.type</field>
|
||||
<field name="inherit_id" ref="hr_holidays.view_holiday_status_normal_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='allocation_validation_type']" position="after">
|
||||
<field name="holiday_days"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id ="view_yuthon_holiday_type_form" model="ir.ui.view">
|
||||
<field name="name">yuthon.holiday.type.form</field>
|
||||
<field name="model">hr.leave.type</field>
|
||||
<field name="inherit_id" ref="hr_holidays.edit_holiday_status_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='time_type']" position="attributes">
|
||||
<attribute name="required">0</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//group[@name='leave_validation']" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//group[@name='leave_validation']" position="after">
|
||||
<group string="假期需求及待遇">
|
||||
<field name="vacation_type_id"/>
|
||||
<field name="holiday_days" string="假期天数"/>
|
||||
<field name="travel_leave" string="路程假"/>
|
||||
<field name="treated" string="待遇"/>
|
||||
<field name="remarks" string="备注"/>
|
||||
</group>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='allocation_validation_type']" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -16,6 +16,7 @@
|
||||
'room',
|
||||
'hr_recruitment',
|
||||
'hr',
|
||||
'yuthon_holiday',
|
||||
'hr_attendance',
|
||||
'hr_holidays',
|
||||
'hr_payroll',
|
||||
|
||||
@@ -465,6 +465,12 @@
|
||||
parent="holiday_set_menu_board"
|
||||
action="hr_holidays.open_view_holiday_status"
|
||||
sequence="1"/>
|
||||
<menuitem
|
||||
id="menu_holiday_type_setting_board"
|
||||
name="假期类别配置"
|
||||
parent="holiday_set_menu_board"
|
||||
action="yuthon_holiday.view_holiday_type_setting_action"
|
||||
sequence="2"/>
|
||||
<menuitem id="holiday_set_scheme_board"
|
||||
name="应计方案"
|
||||
parent="holiday_set_menu_board"
|
||||
@@ -476,7 +482,7 @@
|
||||
action="hr_holidays.open_view_public_holiday"
|
||||
sequence="5"/>
|
||||
<menuitem id="holiday_set_compulsory_board"
|
||||
name="必修日"
|
||||
name="国定假日"
|
||||
parent="holiday_set_menu_board"
|
||||
action="hr_holidays.hr_leave_mandatory_day_action"
|
||||
sequence="7"/>
|
||||
|
||||
Reference in New Issue
Block a user