This commit is contained in:
李鹏宇
2026-02-05 11:19:52 +08:00
2 changed files with 20 additions and 7 deletions
@@ -28,6 +28,7 @@ class SoongWorkflowCommentWizard(models.TransientModel):
is_supervising = fields.Boolean(string="是否督办")
comment_note_id = fields.Many2one('soong.note', string="常用意见")
comment_note = fields.Text(string="意见")
illustrate = fields.Text(string="说明")
comment = fields.Char(compute='_compute_comment', store=True)
state_list = fields.Char(string="状态列表")
record_id = fields.Integer()
@@ -223,10 +224,16 @@ class SoongWorkflowCommentWizard(models.TransientModel):
button = False
if node.button_ids:
for btn_name in button_priority_list:
target_btn = next((btn for btn in node.button_ids if btn.name == btn_name), None)
if target_btn:
button = target_btn
break
for btn in node.button_ids:
if btn.name == btn_name:
expression_result = False
if btn.is_review_invisible:
domain = eval(btn.invisible_expression)
expression_result = record_id.search(domain + [('id', '=', record_id.id)])
if expression_result:
target_btn = btn
button = target_btn
break
if not button:
return self.env['hr.employee']
+9 -3
View File
@@ -464,15 +464,21 @@ class IssueLibrary(models.Model):
current_user = self.env.user
user_company_name = current_user.company_id.name if current_user.company_id else ""
for ras in issue_active_ids:
if ras.is_push_boss:
if ras.is_push_boss and not ras.boss_char:
if ras.issue_state_boss != 'will':
raise UserError('当前状态不允许上会')
elif ras.is_push_class:
else:
break
elif ras.is_push_class and not ras.class_char:
if ras.issue_state_class != 'will':
raise UserError('当前状态不允许上会')
elif ras.is_push_party:
else:
break
elif ras.is_push_party and not ras.party_char:
if ras.issue_state_party != 'will':
raise UserError('当前状态不允许上会')
else:
break
issue_details = []
target_meeting_type_id = False