diff --git a/yuthon_hr_attendance/models/overtime_approval.py b/yuthon_hr_attendance/models/overtime_approval.py
index 4545321de..e49d846cf 100644
--- a/yuthon_hr_attendance/models/overtime_approval.py
+++ b/yuthon_hr_attendance/models/overtime_approval.py
@@ -6,7 +6,6 @@ from datetime import datetime, time, timedelta
class OvertimeApprovals(models.Model):
_name = 'overtime.approval'
_description = "加班审批"
- # _inherit = ['mail.thread.main.attachment', 'mail.activity.mixin', 'soong.workflow.mixin']
_inherit = ['mail.thread.main.attachment', 'mail.activity.mixin','soong.workflow.mixin']
_rec_name = 'name'
@@ -61,7 +60,10 @@ class OvertimeUserLine(models.Model):
department_id = fields.Many2one('hr.department', string="部门")
overtime_hours = fields.Float(string="本月加班时长")
documents_ids = fields.Many2many('documents.document', string="附件")
-
+ start_time = fields.Datetime(string="开始时间")
+ end_time = fields.Datetime(string="结束时间")
+ hours = fields.Float(string="加班时长")
+ type_overtime = fields.Selection([('work', '工作日加班'), ('weekend', '周末加班'), ('holiday', '节假日加班')], string="加班类型")
# def attendance_button(self):
# return {
# 'type': 'ir.actions.client',
diff --git a/yuthon_hr_attendance/views/overtime_approval.xml b/yuthon_hr_attendance/views/overtime_approval.xml
index 330883370..16f29c1d1 100644
--- a/yuthon_hr_attendance/views/overtime_approval.xml
+++ b/yuthon_hr_attendance/views/overtime_approval.xml
@@ -44,7 +44,11 @@
+
+
+
+
@@ -58,7 +62,6 @@
-
加班
overtime.approval
diff --git a/yuthon_hr_employee/models/inherit_hr_applicant.py b/yuthon_hr_employee/models/inherit_hr_applicant.py
index b6b6b37fa..b45a56f6a 100644
--- a/yuthon_hr_employee/models/inherit_hr_applicant.py
+++ b/yuthon_hr_employee/models/inherit_hr_applicant.py
@@ -3,7 +3,7 @@ import datetime
class HrApplicant(models.Model):
_inherit = "hr.applicant"
-
+ _rec_name = 'partner_name'
#基础信息
name = fields.Char(string="标题")
takes_time = fields.Date(string="需要时间")
diff --git a/yuthon_hr_employee_approval/models/inherit_hr_applicant.py b/yuthon_hr_employee_approval/models/inherit_hr_applicant.py
index 1e86b08e6..bc3e4ca8b 100644
--- a/yuthon_hr_employee_approval/models/inherit_hr_applicant.py
+++ b/yuthon_hr_employee_approval/models/inherit_hr_applicant.py
@@ -54,9 +54,7 @@ class HrApplicant(models.Model):
def write(self, vals):
- # 调用父类的 write 方法更新记录
res = super(HrApplicant, self).write(vals)
- # 检查是否修改了 'stage_id' 字段
if 'stage_id' in vals:
self.is_interview_status = False
return res
@@ -78,5 +76,6 @@ class HrApplicant(models.Model):
'type': 'ir.actions.act_window',
'res_model': 'yuthon.onboard.approval',
"views": [[form_id, "form"]],
- 'target': 'current',
- }
+ 'context': {
+ 'onboard_id': self.id, },
+ }
\ No newline at end of file
diff --git a/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py b/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py
index 4ec21fe84..815b516d0 100644
--- a/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py
+++ b/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py
@@ -20,12 +20,9 @@ class YuthonOnboardApproval(models.Model):
name = fields.Char(string='标题',defualt='人事合同')
code = fields.Char(string="编号",
default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_onboard_approval_code'))
- worker_name = fields.Char(string='姓名')
- department_id = fields.Many2one('hr.department', string="部门")
- job_id = fields.Many2one('hr.job', string="岗位")
-
+ onboard_id = fields.Many2one('hr.applicant',string='姓名')
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
- ('thlc', '天河粮储'), ('tctj', '天投城建')], string="甲方")
+ ('thlc', '天河粮储'), ('tctj', '天投城建')], string="甲方")
grades_id = fields.Many2one('yuthon.job.lv', string='职级')
account = fields.Char(string='账号')
bank = fields.Char(string='开户行')
@@ -38,14 +35,11 @@ class YuthonOnboardApproval(models.Model):
oter = fields.Text(string='其他约定')
social_security = fields.Char(string='社保时长')
documents_ids = fields.Many2many('documents.document', string="附件")
-
- details_personal_information_form = fields.Many2one('yuthon.message.login', string="个人信息表详情")
- details_recruitment_needs_form = fields.Many2one('yuthon.recruitment.approval', string="招聘需求详情")
- details_interview_form = fields.Many2one('yuthon.interview.approval', string="面试详情")
+ details_personal_information_form_id = fields.Many2one('yuthon.message.login', string="个人信息表详情")
+ details_recruitment_needs_form_id = fields.Many2one('yuthon.recruitment.approval', string="招聘需求详情")
+ details_interview_form_id = fields.Many2one('yuthon.interview.approval', string="面试详情")
is_issues = fields.Boolean(string='是否上会')
related_issues_id = fields.Many2one('issue.library', string="关联议题")
-
-
- #合同
+ # 合同
contract_code = fields.Char(string='合同编号')
contracted_status = fields.Selection([('first', '首签'), ('renew', '续签')], string='合同状态')
diff --git a/yuthon_hr_employee_approval/views/yuthon_onboard_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_onboard_approval_views.xml
index 901b8e909..5b389b25b 100644
--- a/yuthon_hr_employee_approval/views/yuthon_onboard_approval_views.xml
+++ b/yuthon_hr_employee_approval/views/yuthon_onboard_approval_views.xml
@@ -35,7 +35,7 @@
-
+
@@ -72,9 +72,9 @@
-
-
-
+
+
+
diff --git a/yuthon_property/models/yuthon_property.py b/yuthon_property/models/yuthon_property.py
index 0a5f7ec51..e9bcb6e64 100644
--- a/yuthon_property/models/yuthon_property.py
+++ b/yuthon_property/models/yuthon_property.py
@@ -318,6 +318,6 @@ class DisassemblyInformationLine(models.Model):
yuthon_property_id = fields.Many2one('yuthon.property', string="关联物业信息")
property_id = fields.Many2one('yuthon.property', string="物业名称")
rent_area = fields.Float(related='property_id.rentable_area', string="可租面积")
- start_time = fields.Date(string="生效日期")
- end_date = fields.Date(string="失效日期")
+ start_time = fields.Date(related='property_id.start_time',string="生效日期")
+ end_date = fields.Date(related='property_id.end_date',string="失效日期")
diff --git a/yuthon_property_approval/models/property_merge_approval.py b/yuthon_property_approval/models/property_merge_approval.py
index cc539f25c..f33110b93 100644
--- a/yuthon_property_approval/models/property_merge_approval.py
+++ b/yuthon_property_approval/models/property_merge_approval.py
@@ -36,7 +36,6 @@ class PropertyMergeApproval(models.Model):
self.merge_building_area = merge_building_area
self.merge_rent_area = merge_rent_area
-
def put_merge_message(self):
property_list = []
property_id = self.env['yuthon.property'].create({
diff --git a/yuthon_property_approval/models/property_split_approval.py b/yuthon_property_approval/models/property_split_approval.py
index 5da47a667..b47d5d652 100644
--- a/yuthon_property_approval/models/property_split_approval.py
+++ b/yuthon_property_approval/models/property_split_approval.py
@@ -41,12 +41,12 @@ class PropertySplitApproval(models.Model):
def put_split_message(self):
property_list = []
- for i in self.property_split_approval_line_ids:
+ for property_split in self.property_split_approval_line_ids:
property_id = self.env['yuthon.property'].create({
- 'name': i.split_property,
- 'building_area': i.split_building_area,
- 'rentable_area': i.split_rent_area,
- 'asset_type_id': i.split_asset_type_id.id,
+ 'name': property_split.split_property,
+ 'building_area': property_split.split_building_area,
+ 'rentable_area': property_split.split_rent_area,
+ 'asset_type_id': property_split.split_asset_type_id.id,
'property_merge_approval_id':self.property_id.id,
'is_done_merge': True
})
diff --git a/yuthon_property_approval/views/property_split_approval_views.xml b/yuthon_property_approval/views/property_split_approval_views.xml
index a6becb5e4..b1d7cb99b 100644
--- a/yuthon_property_approval/views/property_split_approval_views.xml
+++ b/yuthon_property_approval/views/property_split_approval_views.xml
@@ -21,6 +21,8 @@
@@ -37,8 +39,6 @@
-
-