!3294 添加功能

Merge pull request !3294 from 李鹏宇/dev_zhou
This commit is contained in:
李鹏宇
2025-06-13 07:54:42 +00:00
committed by Gitee
2 changed files with 6 additions and 6 deletions
@@ -133,7 +133,7 @@ class SoongWorkflowMixin(models.AbstractModel):
button_ids = record.sudo().workflow_id.node_ids.button_ids.search([('workflow_id', '=', res.workflow_id.id), ('sequence', '=', 1)])
for button_id in button_ids:
if record.env.user.employee_id.department_id:
if not button_id.node_id.department_id:
if not button_id.is_automatic:
if button_id.users_role_id:
employee_ids = record.sudo().env['hr.employee'].search(
['|', ('user_role_id', '=', button_id.users_role_id.id),
@@ -148,12 +148,12 @@ class SoongWorkflowMixin(models.AbstractModel):
if button_id.users_role_id:
employee_ids = record.sudo().env['hr.employee'].search(
['|', ('user_role_id', '=', button_id.users_role_id.id), ('user_role_ids', 'in', button_id.users_role_id.id),
'|', ('department_id', '=', button_id.node_id.department_id.id), ('department_ids', 'in', button_id.node_id.department_id.id),
'|', ('department_id', '=', record.env.user.employee_id.department_id.id), ('department_ids', 'in', record.env.user.employee_id.department_id.id),
])
else:
employee_ids = record.sudo().env['hr.employee'].search([
'|', ('user_role_id', 'in', button_id.users_role_group_ids.user_role_ids.ids), ('user_role_ids', 'in', button_id.users_role_group_ids.user_role_ids.ids),
'|', ('department_id', '=', button_id.node_id.department_id.id), ('department_ids', 'in', button_id.node_id.department_id.id),])
'|', ('department_id', '=', record.env.user.employee_id.department_id.id), ('department_ids', 'in', record.env.user.employee_id.department_id.id),])
if record.env.user.employee_id.id in employee_ids.ids:
record.state = button_id.node_id.node_name
@@ -309,7 +309,8 @@ class SoongWorkflowMixin(models.AbstractModel):
break
# 获取当前节点的部门
current_department = self.department_id
current_department = self.department_id.id
if len(current_node.out_link_ids) > 1:
# 筛选与当前节点部门匹配的后续节点
+1 -2
View File
@@ -106,7 +106,6 @@ class InheritHrPayslip(models.Model):
# 物管常用项
seniority_allowance = fields.Float(string='工龄补贴')
monthly_base_salary = fields.Float(string='月基本工资')
safety_subsidy = fields.Float(string='安全生产管理补贴')
job_performance = fields.Float(string='岗位绩效')
excellent_employees = fields.Float(string='优秀部门经理/员工奖励')
@@ -262,7 +261,7 @@ class InheritHrPayslip(models.Model):
@api.depends('year_compute', 'year_jie', 'year_gong', 'jing_te', 'study_on', 'post_salary',
'seniority_salary','commuting_allowance', 'base_salary' , 'performance_bonuses',
'full_attendance_award', 'overtime_pay', 'based_pay', 'january_performance',
'temporary_performance_bonus', 'performance_deduction', 'commuting_deduction', 'base_salary_deduction')
'temporary_performance_bonus', 'performance_deduction', 'commuting_deduction', 'base_salary_deduction', 'last_year_performance_evaluation')
def _compute_total_before_tax(self):
for record in self:
record.total_before_tax = (