diff --git a/soong_workflow/wizard/soong_workflow_comment_wizard.py b/soong_workflow/wizard/soong_workflow_comment_wizard.py
index 85804efe5..e451d6445 100644
--- a/soong_workflow/wizard/soong_workflow_comment_wizard.py
+++ b/soong_workflow/wizard/soong_workflow_comment_wizard.py
@@ -85,7 +85,7 @@ class SoongWorkflowCommentWizard(models.TransientModel):
url = "https://oa.thtzjt.com/mail/view?model={}&res_id={}".format(self.res_model, record_id.id)
self.sudo().env["wecom.apps"].sync_send_message_textcard(category='oa',
user_id=employee.wecom_userid,
- title="审批抄送提醒",
+ title=record_id.name + "审批抄送提醒",
description="您有新的抄送提醒请及时查看",
url=url, btntxt="详细信息")
# 转交逻辑--单线
@@ -98,7 +98,7 @@ class SoongWorkflowCommentWizard(models.TransientModel):
url = 'https://oa.thtzjt.com/mail/view?model={}&res_id={}'.format(self.res_model, self.res_id)
for employee in self.employee_ids:
self.sudo().env["wecom.apps"].sync_send_message_textcard(category='oa', user_id=employee.wecom_userid,
- title=self.name,
+ title=record_id.name,
description="您有新的审批单请及时处理",
url=url, btntxt="详情")
return self.node_btn_id.with_context(cx).run()
@@ -107,7 +107,7 @@ class SoongWorkflowCommentWizard(models.TransientModel):
url = 'https://oa.thtzjt.com/mail/view?model={}&res_id={}'.format(self.res_model, self.res_id)
for employee in self.employee_ids:
self.sudo().env["wecom.apps"].sync_send_message_textcard(category='oa', user_id=employee.wecom_userid,
- title=self.name,
+ title=record_id.name,
description="您的审批单已被退回,请查看详情",
url=url, btntxt="详情")
return self.node_btn_id.with_context(cx).run()
diff --git a/yuthon_holiday/models/inherit_hr_leave_type.py b/yuthon_holiday/models/inherit_hr_leave_type.py
index 6744ba092..c1a55b020 100644
--- a/yuthon_holiday/models/inherit_hr_leave_type.py
+++ b/yuthon_holiday/models/inherit_hr_leave_type.py
@@ -10,5 +10,4 @@ class HrLeaveType(models.Model):
request_unit = fields.Selection([('day', '天'), ('hour', '小时'), ('half_day', '半天')], string="请假单位", default='hour')
employee_requests = fields.Selection([('yes', '允许的额外天数要求'), ('no', '不允许')], string='员工要求', default='yes')
allocation_validation_type = fields.Selection(defalt='no')
- yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储'),
- ('tctj', '天投城建')], string='公司')
\ No newline at end of file
+ yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')], string='公司')
\ No newline at end of file
diff --git a/yuthon_hr_attendance/models/hr_attendance.py b/yuthon_hr_attendance/models/hr_attendance.py
index 9cf766b1a..93588fe65 100644
--- a/yuthon_hr_attendance/models/hr_attendance.py
+++ b/yuthon_hr_attendance/models/hr_attendance.py
@@ -29,9 +29,9 @@ class HrAttendance(models.Model):
def add_comment(self):
self.ensure_one()
- if not self.wecom_userid:
+ if not self.wecom_userid:
raise ("请同步{}的企业微信".format(self.name))
- url = "https://oa.thtzjt.com/mail/view?model={}&res_id={}".format(self.hr_attendance, self.employee_id.id)
+ url = "https://oa.thtzjt.com/mail/view?model={}&res_id={}".format(self._name, self.id)
self.sudo().env["wecom.apps"].sync_send_message_textcard(category='attendance', user_id=self.wecom_userid,
title="打卡异常提醒", description="测试消息请忽略",
url=url, btntxt="详细信息")
diff --git a/yuthon_hr_attendance/models/overtime_page.py b/yuthon_hr_attendance/models/overtime_page.py
index d192106d1..dae9a8c6c 100644
--- a/yuthon_hr_attendance/models/overtime_page.py
+++ b/yuthon_hr_attendance/models/overtime_page.py
@@ -6,8 +6,7 @@ class OvertimePage(models.Model):
_name = 'overtime.page'
_description = '加班说明配置'
- yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储'),
- ('tctj', '天投城建')], string='公司')
+ yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')], string='公司')
department_id = fields.Many2one("hr.department", string="部门")
day_time = fields.Char(string="每日加班时长不得超过")
month_time = fields.Char(string="每月加班时长不得超过")
diff --git a/yuthon_hr_attendance/models/yuthon_duty_arrangement.py b/yuthon_hr_attendance/models/yuthon_duty_arrangement.py
index c5f40309a..503310edc 100644
--- a/yuthon_hr_attendance/models/yuthon_duty_arrangement.py
+++ b/yuthon_hr_attendance/models/yuthon_duty_arrangement.py
@@ -26,22 +26,6 @@ class YuthonDutyArrangement(models.Model):
is_abnormal = fields.Boolean(string='是否异常')
weekday_count = fields.Float(string='值班次数')
- @api.model_create_multi
- def create(self, vals_list):
- performance_records = super().create(vals_list)
- for performance in performance_records:
- summary = self.env['yuthon.duty.summary'].search([
- ('employee_id', '=', performance.employee_id.id),
- ])
- if summary:
- pass
- else:
- summary = self.env['yuthon.duty.summary'].create({
- 'employee_id': performance.employee_id.id,
- 'duty_arrangement_id': performance.id,
- })
- return performance_records
-
@api.depends('duration', 'duration_two', 'duration_three')
def _compute_is_photo(self):
for record in self:
diff --git a/yuthon_hr_attendance/models/yuthon_duty_summary.py b/yuthon_hr_attendance/models/yuthon_duty_summary.py
index 1ca592029..03076f54a 100644
--- a/yuthon_hr_attendance/models/yuthon_duty_summary.py
+++ b/yuthon_hr_attendance/models/yuthon_duty_summary.py
@@ -7,13 +7,33 @@ class YuthonDutySummary(models.Model):
employee_id = fields.Many2one('hr.employee', string='员工')
duty_weekdays = fields.Float(string='周一至周五值班次数')
- subtotal_weekdays = fields.Float(string='小计')
+ subtotal_weekdays = fields.Float(string='小计', compute='_compute_subtotal_weekdays')
duty_weekends = fields.Float(string='周六日值班次数(不调休)')
- subtotal_weekends = fields.Float(string='小计')
+ subtotal_weekends = fields.Float(string='小计', compute='_compute_subtotal_weekends')
duty_weekends_leave = fields.Float(string='周六日值班次数(调休)')
subtotal_weekends_leave = fields.Float(string='小计')
- total_duty_shifts = fields.Float(string='值班合计')
+ total_duty_shifts = fields.Float(string='值班合计', compute='_compute_total_duty_shifts')
holidays = fields.Float(string='节假日值班费(元)')
- total = fields.Float(string='总合计')
+ total = fields.Float(string='总合计', compute='_compute_total')
remake = fields.Text(string='备注')
- duty_arrangement_id = fields.Many2one('yuthon.duty.arrangement', string='关联值班安排')
\ No newline at end of file
+ duty_arrangement_id = fields.Many2one('yuthon.duty.arrangement', string='关联值班安排')
+
+ @api.depends('subtotal_weekdays', 'subtotal_weekends', 'subtotal_weekends_leave')
+ def _compute_total_duty_shifts(self):
+ for record in self:
+ record.total_duty_shifts = record.subtotal_weekdays + record.subtotal_weekends + record.subtotal_weekends_leave
+
+ @api.depends('duty_weekdays')
+ def _compute_subtotal_weekdays(self):
+ for record in self:
+ record.subtotal_weekdays = record.duty_weekdays * 60
+
+ @api.depends('duty_weekends')
+ def _compute_subtotal_weekends(self):
+ for record in self:
+ record.subtotal_weekends = record.duty_weekends * 160
+
+ @api.depends('subtotal_weekdays', 'subtotal_weekends', 'subtotal_weekends_leave','holidays')
+ def _compute_total(self):
+ for record in self:
+ record.total = record.subtotal_weekdays + record.subtotal_weekends + record.subtotal_weekends_leave + record.holidays
\ No newline at end of file
diff --git a/yuthon_hr_attendance/security/ir.model.access.csv b/yuthon_hr_attendance/security/ir.model.access.csv
index 5d155b7c3..9f5273462 100644
--- a/yuthon_hr_attendance/security/ir.model.access.csv
+++ b/yuthon_hr_attendance/security/ir.model.access.csv
@@ -15,3 +15,4 @@ access_yuthon_adjustments_approval,yuthon.adjustments.approval,model_yuthon_adju
access_yuthon_duty_arrangement,yuthon.duty.arrangement,model_yuthon_duty_arrangement,base.group_user,1,1,1,1
access_yuthon_duty_setting,yuthon.duty.setting,model_yuthon_duty_setting,base.group_user,1,1,1,1
access_yuthon_duty_arrangement_wizard,yuthon.duty.arrangement.wizard,model_yuthon_duty_arrangement_wizard,base.group_user,1,1,1,1
+access_yuthon_duty_summary_wizard,yuthon.duty.summary.wizard,model_yuthon_duty_summary_wizard,base.group_user,1,1,1,1
\ No newline at end of file
diff --git a/yuthon_hr_attendance/wizard/yuthon_duty_arrangement_wizard.py b/yuthon_hr_attendance/wizard/yuthon_duty_arrangement_wizard.py
index 4daf94bf6..c2792b279 100644
--- a/yuthon_hr_attendance/wizard/yuthon_duty_arrangement_wizard.py
+++ b/yuthon_hr_attendance/wizard/yuthon_duty_arrangement_wizard.py
@@ -14,7 +14,13 @@ class YuthonDutyArrangementWizard(models.TransientModel):
num_people = self.number_personnel
available_people = self.env['hr.employee'].search([('department_id.name', '=', '仓储组')])
selected_people = random.sample(available_people, num_people)
- self.env['yuthon.duty.arrangement'].search([]).unlink()
+ today = date.today()
+ first_day_of_month = today.replace(day=1)
+ last_day_of_month = (today.replace(day=1) + timedelta(days=32)).replace(day=1) - timedelta(days=1)
+ self.env['yuthon.duty.arrangement'].search([
+ ('start_time', '>=', first_day_of_month),
+ ('start_time', '<=', last_day_of_month),
+ ]).unlink()
today = date.today()
next_month = (today.replace(day=1) + timedelta(days=32)).replace(day=1)
current_date = today
diff --git a/yuthon_hr_attendance/wizard/yuthon_duty_summary_wizard.py b/yuthon_hr_attendance/wizard/yuthon_duty_summary_wizard.py
index b9041998c..64978ea21 100644
--- a/yuthon_hr_attendance/wizard/yuthon_duty_summary_wizard.py
+++ b/yuthon_hr_attendance/wizard/yuthon_duty_summary_wizard.py
@@ -1,5 +1,7 @@
+from dateutil.relativedelta import relativedelta
+
from odoo import api, fields, models, tools, _
-from datetime import datetime
+from datetime import date, timedelta, datetime
class YuthonDutySummaryWizard(models.TransientModel):
_name = 'yuthon.duty.summary.wizard'
@@ -31,21 +33,4 @@ class YuthonDutySummaryWizard(models.TransientModel):
}
def confirm(self):
- employees = self.env['hr.employee'].search([])
- for employee in employees:
- duty_arrangements = self.env['yuthon.duty.arrangement'].search([
- ('employee_id', '=', employee.id),
- ])
- weekday_count = 0
- weekend_count = 0
- for arrangement in duty_arrangements:
- if 0 <= arrangement.start_time.weekday() <= 4:
- weekday_count += 1
- elif arrangement.start_time.weekday() in (5, 6):
- weekend_count += 1
- summary = self.env['yuthon.duty.summary'].search([
- ('employee_id', '=', employee.id),
- ], limit=1)
- if summary:
- summary.duty_weekdays = weekday_count
- summary.duty_weekends = weekend_count
\ No newline at end of file
+ pass
\ No newline at end of file
diff --git a/yuthon_hr_attendance/wizard/yuthon_duty_summary_wizard_views.xml b/yuthon_hr_attendance/wizard/yuthon_duty_summary_wizard_views.xml
index 419e845c0..338525c16 100644
--- a/yuthon_hr_attendance/wizard/yuthon_duty_summary_wizard_views.xml
+++ b/yuthon_hr_attendance/wizard/yuthon_duty_summary_wizard_views.xml
@@ -15,11 +15,11 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+ 值班汇总计算
+
+ code
+ action = model.action_duty_summary_wizard()
+
+
+
diff --git a/yuthon_hr_employee/models/inherit_hr_job.py b/yuthon_hr_employee/models/inherit_hr_job.py
index 968caa5b3..58e71e9ba 100644
--- a/yuthon_hr_employee/models/inherit_hr_job.py
+++ b/yuthon_hr_employee/models/inherit_hr_job.py
@@ -14,7 +14,7 @@ class HrJob(models.Model):
number = fields.Char(string="序号")
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
- ('thlc', '天河粮储'), ('tctj', '天投城建'),('thtjbb', '天河投资本部')], string="所属公司")
+ ('thlc', '天河粮储'), ('thtjbb', '天河投资本部')], string="所属公司")
job_type_id = fields.Many2one('hr.job.type', string="岗位类别")
job_lv_id = fields.Many2one('yuthon.job.lv', string="职级")
start_date = fields.Date(string="生效日期", default=lambda self: fields.Date.today())
diff --git a/yuthon_hr_employee/models/yuthon_hr_employee.py b/yuthon_hr_employee/models/yuthon_hr_employee.py
index 585886c1a..a8644db3b 100644
--- a/yuthon_hr_employee/models/yuthon_hr_employee.py
+++ b/yuthon_hr_employee/models/yuthon_hr_employee.py
@@ -33,8 +33,7 @@ class YuthonHrEmployee(models.Model):
job_lv_id = fields.Many2one('yuthon.job.lv', string="最新职级")
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
- ('thlc', '天河粮储'), ('tctj', '天投城建')],
- default='thtz', store=True, compute="compute_company", string="所属公司")
+ ('thlc', '天河粮储')], default='thtz', store=True, compute="compute_company", string="所属公司")
# 个人信息
user_salary = fields.Float(string="基本工资")
job_lv_salary = fields.Float(string="职级工资")
@@ -117,7 +116,6 @@ class YuthonHrEmployee(models.Model):
company_mapping = {'天河投资集团': 'thtz',
'天河物管': 'thwg',
'天河粮储': 'thlc',
- '天投城建': 'tctj',
'天河投资本部': 'thtjbb'}
for record in self:
visited_departments = set()
diff --git a/yuthon_hr_employee/models/yuthon_job_lv.py b/yuthon_hr_employee/models/yuthon_job_lv.py
index 435d43500..025dd8427 100644
--- a/yuthon_hr_employee/models/yuthon_job_lv.py
+++ b/yuthon_hr_employee/models/yuthon_job_lv.py
@@ -22,7 +22,7 @@ class YuthonJobLv(models.Model):
all_wage = fields.Float(string="应发工资", group_operator=None)
comprehensive_subsidy = fields.Float(string="综合补贴", group_operator=None)
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
- ('thlc', '天河粮储'), ('tctj', '天投城建')], string="所属公司")
+ ('thlc', '天河粮储')], string="所属公司")
create_time = fields.Datetime(string="生效日期", default=fields.Datetime.now)
end_time = fields.Datetime(string="失效日期")
diff --git a/yuthon_hr_employee_approval/models/yuthon_interview_approval.py b/yuthon_hr_employee_approval/models/yuthon_interview_approval.py
index dcd1401fb..852b114e4 100644
--- a/yuthon_hr_employee_approval/models/yuthon_interview_approval.py
+++ b/yuthon_hr_employee_approval/models/yuthon_interview_approval.py
@@ -18,7 +18,7 @@ class YuthonInterviewApproval(models.Model):
applicant_ids = fields.One2many('interview.approval.line', 'interview_approval_id', string='应聘面试信息')
is_issues = fields.Boolean(string='是否上会')
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
- ('thlc', '天河粮储'), ('tctj', '天投城建')], string="公司")
+ ('thlc', '天河粮储')], string="公司")
related_issues_id = fields.Many2one('issue.library', string="关联议题")
def scheduling_of_meetings(self):
diff --git a/yuthon_hr_employee_approval/models/yuthon_leaving_approval.py b/yuthon_hr_employee_approval/models/yuthon_leaving_approval.py
index aaae174e2..5c6a1100f 100644
--- a/yuthon_hr_employee_approval/models/yuthon_leaving_approval.py
+++ b/yuthon_hr_employee_approval/models/yuthon_leaving_approval.py
@@ -13,7 +13,7 @@ class YuthonLeavingApproval(models.Model):
code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_leaving_approval_code'))
phone = fields.Char(related='users_id.employee_id.work_phone',string='手机号')
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
- ('thlc', '天河粮储'), ('tctj', '天投城建')], string="任职单位")
+ ('thlc', '天河粮储')], string="任职单位")
job_id = fields.Many2one(related='users_id.employee_id.job_id', string="主岗")
duties = fields.Char(string="职务")
diff --git a/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py b/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py
index ede25a418..3a75eaef0 100644
--- a/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py
+++ b/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py
@@ -27,7 +27,7 @@ class YuthonOnboardApproval(models.Model):
users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
- ('thlc', '天河粮储'), ('tctj', '天投城建')], string="甲方")
+ ('thlc', '天河粮储')], string="甲方")
grades_id = fields.Many2one('yuthon.job.lv', string='职级')
account = fields.Char(string='账号')
bank = fields.Char(string='开户行')
diff --git a/yuthon_hr_employee_approval/models/yuthon_prepare_approval.py b/yuthon_hr_employee_approval/models/yuthon_prepare_approval.py
index 5ae657901..f4d88199e 100644
--- a/yuthon_hr_employee_approval/models/yuthon_prepare_approval.py
+++ b/yuthon_hr_employee_approval/models/yuthon_prepare_approval.py
@@ -10,7 +10,7 @@ class YuthonPrepareApproval(models.Model):
users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_prepare_approval_code'))
- yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储'), ('tctj', '天投城建')], string="所属公司")
+ yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')], string="所属公司")
name = fields.Char(string='标题')
reason = fields.Html(string="正文")
is_issues = fields.Boolean(string='是否上会')
@@ -82,7 +82,7 @@ class PrepareApprovalLine(models.Model):
hr_job_id = fields.Many2one('hr.job', string='工作岗位')
department_id = fields.Many2one("hr.department", string="部门")
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
- ('thlc', '天河粮储'), ('tctj', '天投城建')], string="所属公司")
+ ('thlc', '天河粮储')], string="所属公司")
job_type_id = fields.Many2one('hr.job.type', string="岗位类型")
compiling_external = fields.Integer(string="编制外人数")
job_lv_id = fields.Many2one('yuthon.job.lv', string="职级")
@@ -139,7 +139,7 @@ class NewPrepareApprovalLine(models.Model):
hr_job_id = fields.Many2one('hr.job', string='工作岗位')
department_id = fields.Many2one("hr.department", string="部门")
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
- ('thlc', '天河粮储'), ('tctj', '天投城建')], string="所属公司")
+ ('thlc', '天河粮储')], string="所属公司")
job_type_id = fields.Many2one('hr.job.type', string="岗位类型")
compiling_external = fields.Integer(string="编制外人数")
job_lv_id = fields.Many2one('yuthon.job.lv', string="职级")
diff --git a/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py b/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py
index 467a22e19..ccb385bad 100644
--- a/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py
+++ b/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py
@@ -13,7 +13,7 @@ class YuthonReassignmentApproval(models.Model):
default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_reassignment_approval_code'))
phone = fields.Char(related='users_id.employee_id.work_phone',string='联系电话')
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
- ('thlc', '天河粮储'), ('tctj', '天投城建')], string="任职单位")
+ ('thlc', '天河粮储')], string="任职单位")
job_id = fields.Many2one(related='users_id.employee_id.job_id', string="主岗")
duties = fields.Char(string="职务")
job_lv_id = fields.Many2one(related='users_id.employee_id.job_lv_id', string='职级')
diff --git a/yuthon_hr_employee_approval/models/yuthon_recruitment_approval.py b/yuthon_hr_employee_approval/models/yuthon_recruitment_approval.py
index 2874e07a3..0a9499e2f 100644
--- a/yuthon_hr_employee_approval/models/yuthon_recruitment_approval.py
+++ b/yuthon_hr_employee_approval/models/yuthon_recruitment_approval.py
@@ -19,7 +19,7 @@ class YuthonRecruitmentApproval(models.Model):
notice_documents_ids = fields.Many2many('ir.attachment', string='议题附件')
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
- ('thlc', '天河粮储'), ('tctj', '天投城建')], string="所属公司")
+ ('thlc', '天河粮储')], string="所属公司")
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
@api.onchange('is_issues')
diff --git a/yuthon_hr_employee_approval/models/yuthon_regularization_approval.py b/yuthon_hr_employee_approval/models/yuthon_regularization_approval.py
index f8578a2de..110697f02 100644
--- a/yuthon_hr_employee_approval/models/yuthon_regularization_approval.py
+++ b/yuthon_hr_employee_approval/models/yuthon_regularization_approval.py
@@ -15,7 +15,7 @@ class YuthonRegularizationPrepareApproval(models.Model):
phone = fields.Char(string='手机号')
job = fields.Char(string="职务")
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
- ('thlc', '天河粮储'), ('tctj', '天投城建')], string="任职单位")
+ ('thlc', '天河粮储')], string="任职单位")
job_type_id = fields.Many2one('hr.job.type', string="岗位类别")
job_lv_id = fields.Many2one(related='users_id.employee_id.job_lv_id', string='职级')
onboarding_time = fields.Date(related='users_id.employee_id.entry_date',string="入职日期")
diff --git a/yuthon_hr_employee_approval/models/yuthon_reward_approval.py b/yuthon_hr_employee_approval/models/yuthon_reward_approval.py
index 40e7a1a1b..94720755d 100644
--- a/yuthon_hr_employee_approval/models/yuthon_reward_approval.py
+++ b/yuthon_hr_employee_approval/models/yuthon_reward_approval.py
@@ -13,7 +13,7 @@ class YuthonRewardApproval(models.Model):
code = fields.Char(string="编号",
default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_salary_approval_code'))
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
- ('thlc', '天河粮储'), ('tctj', '天投城建')], string="所属公司")
+ ('thlc', '天河粮储')], string="所属公司")
users_id = fields.Many2one('res.users', string="录入人", default=lambda self: self.env.user.id)
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
entrant_date = fields.Date(string="录入日期")
diff --git a/yuthon_hr_employee_approval/models/yuthon_transfer_approval.py b/yuthon_hr_employee_approval/models/yuthon_transfer_approval.py
index f66dae2ed..a1d892d35 100644
--- a/yuthon_hr_employee_approval/models/yuthon_transfer_approval.py
+++ b/yuthon_hr_employee_approval/models/yuthon_transfer_approval.py
@@ -14,7 +14,7 @@ class YutransferApproval(models.Model):
users_id = fields.Many2one('res.users', string="录入人", default=lambda self: self.env.user.id)
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
- ('thlc', '天河粮储'), ('tctj', '天投城建')], string="所属公司")
+ ('thlc', '天河粮储')], string="所属公司")
main_post = fields.Many2one("hr.job", string="主岗")
duties = fields.Char(string="职务")
grades = fields.Many2one('yuthon.job.lv', string='职级')
diff --git a/yuthon_issue/models/issue_approval.py b/yuthon_issue/models/issue_approval.py
index 1270b5deb..b14fcfd7f 100644
--- a/yuthon_issue/models/issue_approval.py
+++ b/yuthon_issue/models/issue_approval.py
@@ -15,7 +15,7 @@ class IssueApproval(models.Model):
employee_id = fields.Many2one('hr.employee', string="经办人", default=lambda self: self.env.user.employee_id)
department_id = fields.Many2one(related='employee_id.department_id', string="部门")
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储'),
- ('tctj', '天投城建'), ('thtjbb', '天河投资本部')],
+ ('thtjbb', '天河投资本部')],
related='employee_id.yuthon_company', string="所属公司")
user_id = fields.Many2one('res.users', string="经办人", default=lambda self: self.env.user)
meeting_details = fields.Char(string="会议详情")
diff --git a/yuthon_issue/models/issue_approval_decision.py b/yuthon_issue/models/issue_approval_decision.py
index c5a3bfaf1..6463ac994 100644
--- a/yuthon_issue/models/issue_approval_decision.py
+++ b/yuthon_issue/models/issue_approval_decision.py
@@ -16,7 +16,7 @@ class IssueApprovalDecision(models.Model):
board_meet = fields.Selection([('approval', '审'), ('decide', '决'), ('commission', '授权投决会')], string='董事会', compute='_compute_board_meet', readonly=False)
district_bureau = fields.Selection([('record', '备案'), ('approved', '核准'), ('record_approved', '备案、核准')], string='上级单位')
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
- ('thlc', '天河粮储'), ('tctj', '天投城建')], string="所属公司")
+ ('thlc', '天河粮储')], string="所属公司")
department_id = fields.Many2one('hr.department', string="部门")
start_date = fields.Date(string="生效日期")
end_date = fields.Date(string="失效日期")
diff --git a/yuthon_issue/models/issue_library.py b/yuthon_issue/models/issue_library.py
index 226678bd2..ac2c0d608 100644
--- a/yuthon_issue/models/issue_library.py
+++ b/yuthon_issue/models/issue_library.py
@@ -37,7 +37,7 @@ class IssueLibrary(models.Model):
employee_id = fields.Many2one('hr.employee', string='创建人', default=lambda self: self.env.user.employee_id)
department_id = fields.Many2one('hr.department', string='部门', related='employee_id.department_id')
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
- ('thlc', '天河粮储'), ('tctj', '天投城建')], string="所属公司", related='employee_id.yuthon_company')
+ ('thlc', '天河粮储')], string="所属公司", related='employee_id.yuthon_company')
users_role_ids = fields.Many2many('soong.user.role', string='角色范围', related='employee_id.user_role_ids')
approval_name = fields.Char(string="审批标题")
meeting_place = fields.Char(string="会议地点")
diff --git a/yuthon_lessee_service/__manifest__.py b/yuthon_lessee_service/__manifest__.py
index d396aac6c..0b5048f4c 100644
--- a/yuthon_lessee_service/__manifest__.py
+++ b/yuthon_lessee_service/__manifest__.py
@@ -14,7 +14,8 @@
'views/all_menu.xml'
],
'demo': [],
- 'depends': ['hr','mail', 'base', 'survey', 'soong_workflow', 'yuthon_wechat', 'documents','yuthon_property_approval'],
+ 'depends': ['hr', 'mail', 'base', 'survey', 'soong_workflow',
+ 'yuthon_wechat', 'documents', 'yuthon_property_approval'],
'installable': True,
'application': True,
}
diff --git a/yuthon_lessee_service/models/yuthon_lessee_notice.py b/yuthon_lessee_service/models/yuthon_lessee_notice.py
index 7d8b5d338..b7c255c72 100644
--- a/yuthon_lessee_service/models/yuthon_lessee_notice.py
+++ b/yuthon_lessee_service/models/yuthon_lessee_notice.py
@@ -108,17 +108,6 @@ class YuthonLesseeNotice(models.Model):
data = "您有新的通知公告请及时确认\n" + "
{}".format(str, self.name)
we_id = self.env['hr.employee'].search([('id', '=', user)]).wecom_userid
self.sudo().env["wecom.apps"].sync_send_message(we_id, data)
- # # 待办关联
- # self.env['project.task'].create({
- # 'name': '新的通知公告' + self.name + "请及时确认",
- # 'user_ids': [(4, user)],
- # 'notice_origin_id': self.id,
- # })
-
- # 普通用户权限是否打开,可能需要配置权限
- # 关联待办和不关联待办
- # partner_ids = self.sudo().env['res.users'].search([('id', 'in', publish_user_list)]).mapped('partner_id').ids
- # self.sudo().with_context(lang=self.env.lang)._message_auto_subscribe_notify(partner_ids, 'yuthon_notice.message_yuthon_confirm_users_data')
self.write({"notice_state": 'yes'})
def look_up_notice_users(self):
diff --git a/yuthon_lessee_service/views/yuthon_lessee_notice.xml b/yuthon_lessee_service/views/yuthon_lessee_notice.xml
index ec1cf8d70..7c96dbded 100644
--- a/yuthon_lessee_service/views/yuthon_lessee_notice.xml
+++ b/yuthon_lessee_service/views/yuthon_lessee_notice.xml
@@ -11,8 +11,8 @@
-
-
+
+