@@ -605,7 +605,10 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
comment_note_id = btn_rec.node_id[target_field].id
|
||||
|
||||
trans_link_id = self.env['trans.link'].search(trans_domain, limit=1).sorted('sequence').id if btn_rec.name == '转交' else False
|
||||
return_link_id = self.env['trans.link'].search([('link_type', '=', 'return'), ('record_id', '=', self.id)], limit=1).sorted('sequence').id if btn_rec.name == '退回' else False,
|
||||
return_link_id = self.env['trans.link'].search(
|
||||
[('link_type', '=', 'return'), ('record_id', '=', self.id)],
|
||||
limit=1
|
||||
).sorted('sequence')[:1].id if btn_rec.name == '退回' else False
|
||||
return {
|
||||
"name": _("评论"),
|
||||
"type": "ir.actions.act_window",
|
||||
@@ -615,6 +618,7 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
"view_id": wizard.id,
|
||||
"target": "new",
|
||||
"context": {
|
||||
"default_return_link_id": return_link_id,
|
||||
"default_res_id": self.id,
|
||||
'default_comment_note_id': comment_note_id,
|
||||
"default_code": self.code,
|
||||
@@ -625,7 +629,6 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
"default_is_supervising": is_supervising,
|
||||
"default_trans_link_id": trans_link_id,
|
||||
"all_workflow_links": trans_link_ids,
|
||||
"default_return_link_id": return_link_id,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user