Merge pull request !5298 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2025-09-22 10:15:57 +00:00
committed by Gitee
3 changed files with 7 additions and 2 deletions
@@ -394,6 +394,10 @@ class SoongWorkflowMixin(models.AbstractModel):
if self._module in ['yuthon_official']:
is_supervising = self.is_supervising
is_first_node = (self_state == 0)
if is_first_node:
comment_note_id = self.env['soong.note'].search([('name', '=', '妥否,呈领导审批。')], limit=1).id
else:
comment_note_id = False
return {
"name": _("评论"),
"type": "ir.actions.act_window",
@@ -404,7 +408,7 @@ class SoongWorkflowMixin(models.AbstractModel):
"target": "new",
"context": {
"default_res_id": self.id,
'default_comment_note': "妥否,呈领导审批" if is_first_node else "",
'default_comment_note_id': comment_note_id,
"default_code": self.code,
"default_res_model": self._name,
"default_log_ids": logs.ids,
@@ -23,7 +23,7 @@ class SoongWorkflowCommentWizard(models.TransientModel):
user_role_ids = fields.Many2many('soong.user.role', string="角色", compute='_compute_user_role_ids', store=True)
node_link_len = fields.Char(string="转交2")
is_supervising = fields.Boolean(string="是否督办")
comment_note_id = fields.Many2one('soong.note', string="常用意见", default='妥否,呈领导审批')
comment_note_id = fields.Many2one('soong.note', string="常用意见")
comment_note = fields.Char(string="意见")
comment = fields.Char(compute='_compute_comment', store=True)
state_list = fields.Char(string="状态列表")
@@ -286,6 +286,7 @@ class YuthonProperty(models.Model):
'default_property_id': self.id
}
}
def put_property_handover(self):
property_ids = self.env["yuthon.property"].browse(
self._context.get('active_ids', self._context.get('active_id')))