diff --git a/soong_workflow/models/soong_workflow_node.py b/soong_workflow/models/soong_workflow_node.py
index 2791addac..cd0cba7d9 100644
--- a/soong_workflow/models/soong_workflow_node.py
+++ b/soong_workflow/models/soong_workflow_node.py
@@ -88,7 +88,9 @@ class SoongWorkflowNode(models.Model):
employee_ids = fields.Many2many('hr.employee', string='抄送/传阅人员')
is_end = fields.Boolean(string="结束", default=False)
department_id = fields.Many2many('hr.department', string='部门转入范围')
- is_concatenation = fields.Boolean(string="是否串并", default=False, help='并:任何人均给意见,最后一个完成的人转交到下一节点.串:都会收到消息,但任意一个人转交后,即到下一节点,其他人将不再显示,相当于收回.')
+ approval_concatenation = fields.Selection([('chuan', '串申'), ('bing', '并申')], string="审批形式", default="bing",
+ help='并:任何人均给意见,最后一个完成的人转交到下一节点.'
+ '串:都会收到消息,但任意一个人转交后,即到下一节点,其他人将不再显示,相当于收回.')
@api.onchange("is_apostille")
def onchange_is_apostille(self):
diff --git a/soong_workflow/views/soong_workflow_node_views.xml b/soong_workflow/views/soong_workflow_node_views.xml
index 8a89ed3dc..bc105d24f 100644
--- a/soong_workflow/views/soong_workflow_node_views.xml
+++ b/soong_workflow/views/soong_workflow_node_views.xml
@@ -43,7 +43,7 @@
-
+
diff --git a/soong_workflow/wizard/soong_workflow_comment_wizard.py b/soong_workflow/wizard/soong_workflow_comment_wizard.py
index d8eb4dc04..42023d41d 100644
--- a/soong_workflow/wizard/soong_workflow_comment_wizard.py
+++ b/soong_workflow/wizard/soong_workflow_comment_wizard.py
@@ -149,7 +149,7 @@ class SoongWorkflowCommentWizard(models.TransientModel):
record_id = self.env[self.res_model].search([('id', '=', self.res_id)])
for employee in self.employee_ids:
action_id = self.env['ir.actions.act_window'].search([('res_model', '=', self.res_model)])[0]
- url = f'https://oa.thtzjt.com/web?oauth_access_token={employee.user_id.oauth_access_token}&oauth_uid={employee.wecom_userid}#id={record_id.id}&cids=2&action={action_id.id}&model={record_id._name}&view_type=form'
+ url = f'https://oa.thtzjt.com/web?wecom_fields={employee.user_id.wecom_fields}&oauth_uid={employee.wecom_userid}#id={record_id.id}&cids=2&action={action_id.id}&model={record_id._name}&view_type=form'
self.sudo().env["wecom.apps"].sync_send_message_textcard(category='oa',
user_id=employee.wecom_userid,
title=record_id._description,
diff --git a/yuthon_holiday/models/yuthon_fixes_approval.py b/yuthon_holiday/models/yuthon_fixes_approval.py
index f30a10af3..6ea69653d 100644
--- a/yuthon_holiday/models/yuthon_fixes_approval.py
+++ b/yuthon_holiday/models/yuthon_fixes_approval.py
@@ -17,6 +17,8 @@ class YuthonFixesApproval(models.Model):
now_type = fields.Selection([('days', '按天'), ('hours', '按小时')], string="修正类型", default="hours")
now_days = fields.Float(string="现休假时长(天)")
now_hours = fields.Float(string="现休假时长(小时)", tracking=True)
+ increase = fields.Float(string="增加时长(小时)")
+ decrease = fields.Float(string="减少时长(小时)")
holiday_status = fields.Selection([('annual', '年假'), ('overtime', '加班时')], string="休假类型", default="annual")
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
is_issues = fields.Boolean(string='是否上会')
@@ -91,8 +93,5 @@ class YuthonFixesApproval(models.Model):
if self.users_id and self.now_type == 'hours':
if self.users_id and self.original_hours and self.now_hours and self.holiday_status_id:
self.name = self.users_id.name + f'原{self.holiday_status_id.name}'+ str(self.original_hours) + '小时' + '改为' + str(self.now_hours) + '小时'
- elif self.users_id and self.now_type == 'days':
- if self.users_id and self.original_days and self.now_days and self.holiday_status_id:
- self.name = self.users_id.name + f'原{self.holiday_status_id.name}'+ str(self.original_days) + '天' + '改为' + str(self.now_days) + '天'
diff --git a/yuthon_holiday/views/yuthon_fixes_approval_views.xml b/yuthon_holiday/views/yuthon_fixes_approval_views.xml
index ff374e578..7b75c2162 100644
--- a/yuthon_holiday/views/yuthon_fixes_approval_views.xml
+++ b/yuthon_holiday/views/yuthon_fixes_approval_views.xml
@@ -48,12 +48,9 @@
-
-
-
-
-
-
+
+
+
@@ -66,7 +63,6 @@
-
diff --git a/yuthon_hr_attendance/models/go_approval.py b/yuthon_hr_attendance/models/go_approval.py
index c0e11b8d8..caa871724 100644
--- a/yuthon_hr_attendance/models/go_approval.py
+++ b/yuthon_hr_attendance/models/go_approval.py
@@ -118,6 +118,22 @@ class GoApprovals(models.Model):
self.is_day = False
self.is_half = False
+ @api.onchange('days')
+ def _onchange_calculate_end_date(self):
+ """根据开始日期和天数计算结束日期"""
+ if self.statr_date and self.days:
+ # 计算结束日期
+ self.end_date = self.statr_date + timedelta(days=self.days)
+
+ @api.onchange('hours')
+ def _onchange_calculate_end_datetime(self):
+ """根据开始时间、天数和小时计算结束时间"""
+ if self.date_start and self.hours:
+ # 计算时间增量
+ delta = timedelta(hours=self.hours or 0)
+ # 计算结束时间
+ self.date_end = self.date_start + delta
+
diff --git a/yuthon_hr_attendance/models/hr_attendance.py b/yuthon_hr_attendance/models/hr_attendance.py
index db6f5525e..da8b6ca70 100644
--- a/yuthon_hr_attendance/models/hr_attendance.py
+++ b/yuthon_hr_attendance/models/hr_attendance.py
@@ -115,7 +115,7 @@ class HrAttendance(models.Model):
abnormal_employees.append(employee)
for emp in abnormal_employees:
- url = f'https://oa.thtzjt.com/web?oauth_access_token={emp.user_id.oauth_access_token}&oauth_uid={emp.wecom_userid}#id={self.id}&cids=2&action={menu_id.action.id}&model=hr.attendance&view_type=form&menu_id={menu_id.id}'
+ url = f'https://oa.thtzjt.com/web?wecom_fields={emp.user_id.wecom_fields}&oauth_uid={emp.wecom_userid}#id={self.id}&cids=2&action={menu_id.action.id}&model=hr.attendance&view_type=form&menu_id={menu_id.id}'
self.sudo().env["wecom.apps"].sync_send_message_textcard(category='attendance',
user_id=emp.wecom_userid,
title="打卡异常提醒",
diff --git a/yuthon_hr_attendance/views/go_approval.xml b/yuthon_hr_attendance/views/go_approval.xml
index a9b700482..7576dfd9f 100644
--- a/yuthon_hr_attendance/views/go_approval.xml
+++ b/yuthon_hr_attendance/views/go_approval.xml
@@ -88,10 +88,10 @@
-
+
diff --git a/yuthon_hr_employee_approval/models/yuthon_message_login.py b/yuthon_hr_employee_approval/models/yuthon_message_login.py
index 5b7a48dd6..c2ceb8a4f 100644
--- a/yuthon_hr_employee_approval/models/yuthon_message_login.py
+++ b/yuthon_hr_employee_approval/models/yuthon_message_login.py
@@ -69,19 +69,19 @@ class YuthonMessageLogin(models.Model):
is_relatives_work = fields.Boolean(string='本单位是否有亲属')
# 附件
image_1920 = fields.Image("一寸照")
- id_card_id = fields.Many2one('documents.document', string='身份证')
+ id_card_id = fields.Many2one('ir.attachment', string='身份证')
expirationDate = fields.Date(string='身份证有效期')
residence_permit = fields.Char(string='居住证(非本市提供的办理证明,截图也可)')
is_expertise = fields.Boolean(string='专业证书/职称')
- social_security_id = fields.Many2one('documents.document', string='社保清单')
+ social_security_id = fields.Many2one('ir.attachment', string='社保清单')
social_validity = fields.Date(string='截至到入职前')
is_bank_card = fields.Boolean(string='银行卡储蓄卡')
bank_name = fields.Char(string='开户行')
bank_phone = fields.Char(string='卡号')
is_driving_license = fields.Boolean(string='驾驶证')
- driving_license_id = fields.Many2one('documents.document', string='驾驶证')
+ driving_license_id = fields.Many2one('ir.attachment', string='驾驶证')
driving_license_validity = fields.Date(string='有效期')
- resignation_id = fields.Many2one('documents.document', string='离职证明')
+ resignation_id = fields.Many2one('ir.attachment', string='离职证明')
medical_exam_cost = fields.Float(string='体检费用(含乙肝)')
is_issues = fields.Boolean(string='是否上会')
issues_result = fields.Html(string="会议结果")
@@ -156,7 +156,7 @@ class EducationalDetailsLine(models.Model):
_description = '学历证(全日制)'
diploma_id = fields.Many2one('yuthon.message.login', string="关联个人信息")
- graduation_id = fields.Many2one('documents.document', string="毕业证书")
+ graduation_id = fields.Many2one('ir.attachment', string="毕业证书")
validation_reports = fields.Char(string="验证报告")
@@ -165,7 +165,7 @@ class EducationalDetailsLine1(models.Model):
_description = '学历证(非全日制)'
diploma_id = fields.Many2one('yuthon.message.login', string="关联个人信息")
- graduation_id = fields.Many2one('documents.document', string="毕业证书")
+ graduation_id = fields.Many2one('ir.attachment', string="毕业证书")
validation_reports = fields.Char(string="验证报告")
@@ -174,7 +174,7 @@ class EducationalDetailsLine2(models.Model):
_description = '学位证'
degree_id = fields.Many2one('yuthon.message.login', string="关联个人信息")
- graduation_id = fields.Many2one('documents.document', string="学位证")
+ graduation_id = fields.Many2one('ir.attachment', string="学位证")
class CertificateDetailLine(models.Model):
@@ -182,7 +182,7 @@ class CertificateDetailLine(models.Model):
_description = '专业证书'
certificate_id = fields.Many2one('yuthon.message.login', string="关联个人信息")
- professional_certificates_id = fields.Many2one('documents.document', string="专业证书/职称")
+ professional_certificates_id = fields.Many2one('ir.attachment', string="专业证书/职称")
professional_certificate_validity = fields.Date(string="有效期")
diff --git a/yuthon_hr_employee_approval/views/yuthon_message_login_views.xml b/yuthon_hr_employee_approval/views/yuthon_message_login_views.xml
index 18309a3a4..932dad411 100644
--- a/yuthon_hr_employee_approval/views/yuthon_message_login_views.xml
+++ b/yuthon_hr_employee_approval/views/yuthon_message_login_views.xml
@@ -70,7 +70,7 @@
-
+
@@ -208,15 +208,15 @@
-
-
+
+
-
+
@@ -224,7 +224,7 @@
-
+
@@ -232,28 +232,28 @@
-
+
-
+
-
+
-
+
diff --git a/yuthon_issue/views/inherit_room_booking.xml b/yuthon_issue/views/inherit_room_booking.xml
index 3e0eefac8..5bbe7979a 100644
--- a/yuthon_issue/views/inherit_room_booking.xml
+++ b/yuthon_issue/views/inherit_room_booking.xml
@@ -12,7 +12,7 @@
-
+
diff --git a/yuthon_maintain/data/yuthon_maintain_code_data.xml b/yuthon_maintain/data/yuthon_maintain_code_data.xml
index b1592b410..c750c0c52 100644
--- a/yuthon_maintain/data/yuthon_maintain_code_data.xml
+++ b/yuthon_maintain/data/yuthon_maintain_code_data.xml
@@ -5,5 +5,6 @@
property_report_repair_code
BX%(y)s%(month)s%(day)s
3
+
\ No newline at end of file
diff --git a/yuthon_maintain/models/property_report_repair.py b/yuthon_maintain/models/property_report_repair.py
index 3667b8ef5..6c9ac0302 100644
--- a/yuthon_maintain/models/property_report_repair.py
+++ b/yuthon_maintain/models/property_report_repair.py
@@ -12,11 +12,11 @@ class PropertyRentRelief(models.Model):
code = fields.Char(string="报修编号",
default=lambda self: self.env['ir.sequence'].next_by_code('property_report_repair_code'))
users_id = fields.Many2one('res.users', string="报修人", default=lambda self: self.env.user.id)
- repairer_date = fields.Date(string="报修时间", default=fields.Date.today())
- department_id = fields.Many2one(related='users_id.employee_id.department_id', string="报修部门")
+ repairer_date = fields.Date(string="报修日期", default=fields.Date.today())
+ department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
repairer_address = fields.Char(string="报修人地址")
picture_id = fields.Many2one('ir.attachment', string="图片上传")
- fault = fields.Text(string="故障信息")
+ fault = fields.Text(string="描述")
urgency = fields.Selection([('low', '低'), ('middle', '中'), ('high', '高')], string="紧急程度")
possible_causes = fields.Selection([('software', '软件问题'), ('hardware', '硬件问题')], string="可能原因")
diff --git a/yuthon_maintain/views/property_report_repair.xml b/yuthon_maintain/views/property_report_repair.xml
index ac9d97bfb..6565aa224 100644
--- a/yuthon_maintain/views/property_report_repair.xml
+++ b/yuthon_maintain/views/property_report_repair.xml
@@ -47,27 +47,29 @@
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yuthon_notice/models/yuthon_notice.py b/yuthon_notice/models/yuthon_notice.py
index 76e3731c8..3556eaedf 100644
--- a/yuthon_notice/models/yuthon_notice.py
+++ b/yuthon_notice/models/yuthon_notice.py
@@ -112,7 +112,7 @@ class YuthonNotice(models.Model):
menu_id = self.env['ir.ui.menu'].search([('name', '=', '通知公告'), ('parent_id', '!=', False)])
conf_old = self.env['yuthon.confirm.users'].search([('notice_id', '=', self.id), ('employee_id', 'in', self.users_ids.ids)])
for user_id in self.users_ids:
- url = f'https://oa.thtzjt.com/web?oauth_access_token={user_id.oauth_access_token}&oauth_uid={user_id.employee_id.wecom_userid}#id={self.id}&cids=2&action={menu_id.action.id}&model=yuthon.notice&view_type=form&menu_id={menu_id.id}'
+ url = f'https://oa.thtzjt.com/web?wecom_fields={user_id.wecom_fields}&oauth_uid={user_id.employee_id.wecom_userid}#id={self.id}&cids=2&action={menu_id.action.id}&model=yuthon.notice&view_type=form&menu_id={menu_id.id}'
if conf_old:
for co in conf_old:
co.write({'state': 'no'})
diff --git a/yuthon_salary/wizard/payslip_send_wizard.py b/yuthon_salary/wizard/payslip_send_wizard.py
index 10da364d6..829943988 100644
--- a/yuthon_salary/wizard/payslip_send_wizard.py
+++ b/yuthon_salary/wizard/payslip_send_wizard.py
@@ -18,7 +18,7 @@ class PayslipSendWizard(models.Model):
if not employee_id.wecom_userid:
raise UserError("请同步{}的企业微信".format(employee_id.name))
menu_id = self.env['ir.ui.menu'].search([('name', '=', '我的薪资')])
- url = f'https://oa.thtzjt.com/web?oauth_uid={employee_id.wecom_userid}#id={self.id}&cids=2&action={menu_id.action.id}&model=hr.payslip&view_type=form&menu_id={menu_id.id}'
+ url = f'https://oa.thtzjt.com/web?wecom_fields={employee_id.user_id.wecom_fields}#id={self.id}&cids=2&action={menu_id.action.id}&model=hr.payslip&view_type=form&menu_id={menu_id.id}'
self.sudo().env["wecom.apps"].sync_send_message_textcard(category='task',
user_id=employee_id.wecom_userid,
title="薪资确认",
@@ -30,7 +30,7 @@ class PayslipSendWizard(models.Model):
if not employee_id.wecom_userid:
raise UserError("请同步{}的企业微信".format(employee_id.name))
menu_id = self.env['ir.ui.menu'].search([('name', '=', '我的薪资')])
- url = f'https://oa.thtzjt.com/web?oauth_uid={employee_id.wecom_userid}#id={self.id}&cids=2&action={menu_id.action.id}&model=hr.payslip&view_type=form&menu_id={menu_id.id}'
+ url = f'https://oa.thtzjt.com/web?wecom_fields={employee_id.user_id.wecom_fields}#id={self.id}&cids=2&action={menu_id.action.id}&model=hr.payslip&view_type=form&menu_id={menu_id.id}'
self.sudo().env["wecom.apps"].sync_send_message_textcard(category='task',
user_id=employee_id.wecom_userid,
title="薪资确认",
diff --git a/yuthon_wechat/views/res_users_views.xml b/yuthon_wechat/views/res_users_views.xml
index ee83ef8c4..f8275a9ed 100644
--- a/yuthon_wechat/views/res_users_views.xml
+++ b/yuthon_wechat/views/res_users_views.xml
@@ -6,9 +6,11 @@
-
-
-
+
+
+
+
+
diff --git a/yuthon_will_task/models/yuthon_will_task.py b/yuthon_will_task/models/yuthon_will_task.py
index 416468a2d..f9524a3d6 100644
--- a/yuthon_will_task/models/yuthon_will_task.py
+++ b/yuthon_will_task/models/yuthon_will_task.py
@@ -102,7 +102,7 @@ class YuthonWillTask(models.Model):
self.users_ids = [(6, 0, user_ids)]
def read_number(self):
- return self.search_count([('state', '=', 'will'), ('users_ids', 'in', self.env.user.id)])
+ return self.search_count([('task_state', '=', 'will'), ('users_ids', 'in', self.env.user.id)])
def will_task_time(self):
# 任务状态判断