diff --git a/yuthon_holiday/__manifest__.py b/yuthon_holiday/__manifest__.py
index 0c03d7cad..c6599c339 100644
--- a/yuthon_holiday/__manifest__.py
+++ b/yuthon_holiday/__manifest__.py
@@ -9,6 +9,7 @@
'security/ir.model.access.csv',
'views/inherit_hr_type_views.xml',
'views/inherit_hr_leave_allocation_views.xml',
+ 'views/inherit_hr_leave_accrual_plan_views.xml',
'views/hr_leave_batch.xml',
],
'demo': [],
diff --git a/yuthon_holiday/models/__init__.py b/yuthon_holiday/models/__init__.py
index c779f383e..31e67f00d 100644
--- a/yuthon_holiday/models/__init__.py
+++ b/yuthon_holiday/models/__init__.py
@@ -1,4 +1,5 @@
from . import inherit_hr_leave_allocation
from . import inherit_hr_leave_type
from . import inherit_hr_leave
+from . import inherit_hr_leave_accrual_plan
diff --git a/yuthon_holiday/models/inherit_hr_leave.py b/yuthon_holiday/models/inherit_hr_leave.py
index 5989d4ff6..09d80331c 100644
--- a/yuthon_holiday/models/inherit_hr_leave.py
+++ b/yuthon_holiday/models/inherit_hr_leave.py
@@ -4,9 +4,9 @@ from odoo.exceptions import ValidationError
class HrLeave(models.Model):
- _inherit = 'hr.leave'
+ _inherit = 'hr.leave'
- batch_id = fields.Many2one(string='批量', comodel_name='hr.leave.batch', required=True, ondelete='cascade')
+ batch_id = fields.Many2one(string='批量', comodel_name='hr.leave.batch', required=True, ondelete='cascade')
class HolidaysRequestBatch(models.Model):
@@ -21,18 +21,14 @@ class HolidaysRequestBatch(models.Model):
return emp
name = fields.Char(string='标题')
- employee_id = fields.Many2one(string='员工', comodel_name='hr.employee', required=True, default=_get_default_emp, index=True)
+ employee_id = fields.Many2one(string='员工', comodel_name='hr.employee', required=True, default=_get_default_emp,
+ index=True)
leave_ids = fields.One2many(string='详情', comodel_name='hr.leave', inverse_name='batch_id')
- state = fields.Selection(string='状态', selection=[
- ('draft', '撤回'),
- ('confirm', '转交'),
- ('refuse', '拒绝'),
- ('validate', '审批')
- ], default='draft', tracking=True, copy=False)
- company_page = fields.Selection([('tz', '天河投资'), ('wg', '天河物管'), ('lc', '天河粮储')], string="公司")
- users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
- leave_id = fields.Many2one('res.users', string="请假人")
- department_id = fields.Many2one('hr.department', string="部门")
+ state = fields.Selection(string='状态', selection=[('draft', '撤回'), ('confirm', '转交'),
+ ('refuse', '拒绝'), ('validate', '审批')
+ ], default='draft', tracking=True, copy=False)
+ leave_id = fields.Many2one('res.users', string="请假人", default=lambda self: self.env.user.id)
+ department_id = fields.Many2one(related='leave_id.employee_id.department_id', string="部门")
days = fields.Float(string='天数')
hours = fields.Float(string='小时')
text = fields.Html(string='申请事由')
@@ -65,14 +61,15 @@ class HolidaysRequestBatch(models.Model):
self.state = 'draft'
self.leave_ids.action_draft()
+
class HrLeaveLine(models.Model):
_name = 'hr.leave.line'
leave_batch_id = fields.Many2one('hr.leave.batch', string="关联请假审批")
- leave_type_id = fields.Many2one('hr.leave.type',string="请假类型")
- available_days = fields.Integer(related='leave_type_id.available_days',string="可用天数")
- applicants = fields.Selection(related='leave_type_id.request_unit',string="申请单位")
- leave_documents_ids = fields.Many2many(related='leave_type_id.leave_documents_id',string="假期详情说明")
+ leave_type_id = fields.Many2one('hr.leave.type', string="请假类型")
+ available_days = fields.Integer(related='leave_type_id.available_days', string="可用天数")
+ applicants = fields.Selection(related='leave_type_id.request_unit', string="申请单位")
+ leave_documents_ids = fields.Many2many(related='leave_type_id.leave_documents_id', string="假期详情说明")
start_time = fields.Date(string="开始时间")
end_time = fields.Date(string="结束时间")
days = fields.Float(string="天数")
diff --git a/yuthon_holiday/models/inherit_hr_leave_accrual_plan.py b/yuthon_holiday/models/inherit_hr_leave_accrual_plan.py
new file mode 100644
index 000000000..54be28581
--- /dev/null
+++ b/yuthon_holiday/models/inherit_hr_leave_accrual_plan.py
@@ -0,0 +1,8 @@
+# -*- coding: utf-8 -*-
+from odoo import models, fields, api
+
+
+class HrLeaveAccrualPlan(models.Model):
+ _inherit = 'hr.leave.accrual.plan'
+
+ documents_id = fields.Many2many('ir.attachment', string="假期详细说明")
diff --git a/yuthon_holiday/views/hr_leave_batch.xml b/yuthon_holiday/views/hr_leave_batch.xml
index dadabf6b7..5a87ff96e 100644
--- a/yuthon_holiday/views/hr_leave_batch.xml
+++ b/yuthon_holiday/views/hr_leave_batch.xml
@@ -1,8 +1,8 @@
-
-
-
+
+
+
hr.leave.batch.tree
hr.leave.batch
@@ -10,150 +10,149 @@
-
-
-
-
-
+
+
+
+
-
-
-
+
+
+
-
-
+
+
hr.leave.batch.form
hr.leave.batch
-
-
- hr.leave.batch
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ hr.leave.batch
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
- 我的休假
- hr.leave.batch
- tree,form
- {}
-
- [('employee_id.user_id', '=', uid)]
-
+
+
+ 我的休假
+ hr.leave.batch
+ tree,form
+ {}
+
+ [('employee_id.user_id', '=', uid)]
+
-
+
-
-
- 所有休息时间
- hr.leave.batch
- tree,form
- {}
-
- []
-
+
+
+ 所有休息时间
+ hr.leave.batch
+ tree,form
+ {}
+
+ []
+
-
+
-
+
\ No newline at end of file
diff --git a/yuthon_holiday/views/inherit_hr_leave_accrual_plan_views.xml b/yuthon_holiday/views/inherit_hr_leave_accrual_plan_views.xml
new file mode 100644
index 000000000..209c19fbb
--- /dev/null
+++ b/yuthon_holiday/views/inherit_hr_leave_accrual_plan_views.xml
@@ -0,0 +1,13 @@
+
+
+
+ inherit.hr.leave.accrual.plan.form
+ hr.leave.accrual.plan
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/yuthon_property_approval/models/property_rental_form.py b/yuthon_property_approval/models/property_rental_form.py
index ab82b8abb..03604da82 100644
--- a/yuthon_property_approval/models/property_rental_form.py
+++ b/yuthon_property_approval/models/property_rental_form.py
@@ -13,16 +13,17 @@ class PropertyRentalForm(models.Model):
code = fields.Char(string="编号",
default=lambda self: self.env['ir.sequence'].next_by_code('property_rental_form_code'))
+
class PropertyRentalFormLine(models.Model):
_name = 'property.rental.form.line'
_description = '出租申报表明细行'
property_rental_form_id = fields.Many2one('property.rental.form', string="关联出租申报表")
- property_id = fields.Many2one('yuthon.property',string='物业名称',required=True)
- property_address = fields.Text(related='property_id.address',string='物业地址')
- registered_use = fields.Char(related='property_id.registered_use',string='证载用途')
- evaluation_area = fields.Float(related='property_id.evaluation_area',string='出租面积(m²)')
- current_status = fields.Date(related='property_id.current_status',string='租聘到期日')
+ property_id = fields.Many2one('yuthon.property', string='物业名称', required=True)
+ property_address = fields.Text(related='property_id.address', string='物业地址')
+ registered_use = fields.Char(related='property_id.registered_use', string='证载用途')
+ evaluation_area = fields.Float(related='property_id.evaluation_area', string='出租面积(m²)')
+ current_status = fields.Date(related='property_id.current_status', string='租聘到期日')
owner_id = fields.Many2one(related='property_id.owner_id',string='原租户')
now_rent_price = fields.Float(related='property_id.rental_unit_price',string='现租价(元/m² •月)')
evaluate_rent_price = fields.Float(string='评估租(元/m² •月)')
diff --git a/yuthon_work_brand/views/hr_menus.xml b/yuthon_work_brand/views/hr_menus.xml
index 2bcfe1b3c..eac5456aa 100644
--- a/yuthon_work_brand/views/hr_menus.xml
+++ b/yuthon_work_brand/views/hr_menus.xml
@@ -400,7 +400,7 @@
action="hr_holidays.open_view_holiday_status"
sequence="1"/>