流程 增加 经办人
This commit is contained in:
@@ -329,6 +329,7 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
"res_id": rec.id,
|
||||
"workflow_id": rec.workflow_id.id,
|
||||
"node_id": rec.node_id.id,
|
||||
"done_by": self.env.uid,
|
||||
"users_ids": [(4, current_user_id)],
|
||||
})
|
||||
user_ids_list = []
|
||||
@@ -337,6 +338,7 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
user_ids_list.append((4, employee.user_id.id))
|
||||
record_obj.update({"workflow_id": rec.workflow_id.id,
|
||||
"node_id": rec.node_id.id,
|
||||
"done_by": self.env.uid,
|
||||
"users_ids": user_ids_list,
|
||||
})
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ class SoongWorkflowRecord(models.Model):
|
||||
node_id = fields.Many2one(comodel_name="soong.workflow.node", string="当前节点")
|
||||
approve_state = fields.Selection([("start", "开始"), ("pending", "审批中"), ("end", "结束")], default="start", string="审批状态", compute="_compute_node_id")
|
||||
reclaim_state = fields.Boolean(string="回收")
|
||||
done_by = fields.Many2one(comodel_name="res.users", string="经办人")
|
||||
|
||||
def reclaim_record(self):
|
||||
for rec in self:
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
<field name="workflow_id" string="审批类型"/>
|
||||
<field name="node_id" string="当前节点"/>
|
||||
<field name="approve_state" string="审批状态"/>
|
||||
<field name="done_by" />
|
||||
<field name="write_date"/>
|
||||
<field name="reclaim_state" column_invisible="1"/>
|
||||
<button name="reclaim_record" type="object" string="删除" class="btn-primary" groups="soong_workflow.group_soong_workflow_manager"/>
|
||||
|
||||
Reference in New Issue
Block a user