diff --git a/yuthon_holiday/__manifest__.py b/yuthon_holiday/__manifest__.py index c36b433d7..831b070be 100644 --- a/yuthon_holiday/__manifest__.py +++ b/yuthon_holiday/__manifest__.py @@ -9,9 +9,10 @@ 'security/ir.model.access.csv', 'views/holiday_type_setting.xml', 'views/yuthon_holiday_type.xml', + 'views/yuthon_holiday_allocation.xml', ], 'demo': [], - 'depends': ['hr_holidays',], + 'depends': ['hr_holidays', 'soong_workflow'], 'installable': True, 'application': True, } diff --git a/yuthon_holiday/models/__init__.py b/yuthon_holiday/models/__init__.py index d4f91516b..49f54f77c 100644 --- a/yuthon_holiday/models/__init__.py +++ b/yuthon_holiday/models/__init__.py @@ -1,2 +1,3 @@ from . import holiday_type_setting -from . import yuthon_holiday_type \ No newline at end of file +from . import yuthon_holiday_type +from . import yuthon_holiday_allocation \ No newline at end of file diff --git a/yuthon_holiday/models/yuthon_holiday_allocation.py b/yuthon_holiday/models/yuthon_holiday_allocation.py new file mode 100644 index 000000000..23990e55c --- /dev/null +++ b/yuthon_holiday/models/yuthon_holiday_allocation.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +from odoo import models, fields, api + + +class HrLeaveAllocation(models.Model): + _inherit = 'hr.leave.allocation' + + holiday_type = fields.Selection(selection_add=[('role', '角色')]) + number_of_days_display = fields.Float(related='holiday_status_id.holiday_days') + users_role_ids = fields.Many2many('soong.user.role', string='角色范围') + + + + diff --git a/yuthon_holiday/models/yuthon_holiday_type.py b/yuthon_holiday/models/yuthon_holiday_type.py index a69cfa7e1..155de1012 100644 --- a/yuthon_holiday/models/yuthon_holiday_type.py +++ b/yuthon_holiday/models/yuthon_holiday_type.py @@ -9,6 +9,12 @@ class HrLeaveType(models.Model): holiday_days = fields.Float(string='假期天数') vacation_days_description = fields.Text(string='假期天数说明') vacation_type_id = fields.Many2one('holiday.type.setting', string='假期类型') + annual = fields.Char(string='年次') travel_leave = fields.Char(string='路程假') treated = fields.Text(string='待遇') remarks = fields.Text(string="备注") + + + + + diff --git a/yuthon_holiday/views/yuthon_holiday_allocation.xml b/yuthon_holiday/views/yuthon_holiday_allocation.xml new file mode 100644 index 000000000..0f4d4fadc --- /dev/null +++ b/yuthon_holiday/views/yuthon_holiday_allocation.xml @@ -0,0 +1,13 @@ + + + + yuthon.holiday.allocation.form + hr.leave.allocation + + + + + + + + \ No newline at end of file diff --git a/yuthon_holiday/views/yuthon_holiday_type.xml b/yuthon_holiday/views/yuthon_holiday_type.xml index ca32a352b..3bad8a6c2 100644 --- a/yuthon_holiday/views/yuthon_holiday_type.xml +++ b/yuthon_holiday/views/yuthon_holiday_type.xml @@ -8,6 +8,9 @@ + + 1 + @@ -26,6 +29,7 @@ + diff --git a/yuthon_hr_attendance/models/holiday_manage_balance.py b/yuthon_hr_attendance/models/holiday_manage_balance.py index 029783006..275bb553d 100644 --- a/yuthon_hr_attendance/models/holiday_manage_balance.py +++ b/yuthon_hr_attendance/models/holiday_manage_balance.py @@ -18,7 +18,7 @@ class HolidayManageBalance(models.Model): leave = fields.Char(string="事假") sick_leave = fields.Char(string="病假") - type_leave = fields.Char(string="请假类型") + type_leave = fields.Many2one('holiday.type.setting',string="请假类型") estimated_time = fields.Datetime(string="预计时长") actual_time = fields.Datetime(string="实际时长") used_time = fields.Datetime(string="已用时长") diff --git a/yuthon_hr_attendance/models/holidays_approval.py b/yuthon_hr_attendance/models/holidays_approval.py index d5e7c78e1..9ecc45a69 100644 --- a/yuthon_hr_attendance/models/holidays_approval.py +++ b/yuthon_hr_attendance/models/holidays_approval.py @@ -26,7 +26,7 @@ class HolidaysApprovalsLine(models.Model): leave_absence_id = fields.Many2one('hr.employee', string="请假人") main_text = fields.Text(string='事由') approvals_id = fields.Many2one('holidays.approval', string="管理请假审批") - leave_category = fields.Char( string="请假类型") + leave_category = fields.Many2one('holiday.type.setting',string="A请假类型") days_available = fields.Char(string="可用天数") applicants = fields.Selection([('hours', '按小时'),('days', '按天')], string="申请单位") date_start = fields.Datetime(string="开始时间", default=fields.Datetime.now) diff --git a/yuthon_property_approval/models/property_be_evaluated.py b/yuthon_property_approval/models/property_be_evaluated.py new file mode 100644 index 000000000..63a201b47 --- /dev/null +++ b/yuthon_property_approval/models/property_be_evaluated.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from odoo import models, fields, api, exceptions, _ + + +class PropertyBeEvaluated(models.Model): + _name = 'property.be.evaluated' + _description = '待评估物业信息' + + + name = fields.Char(string='名称') + owner = fields.Char(string="权属人") + property_address = fields.Char(string="物业地址") +