@@ -257,15 +257,14 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
"default_res_model": self._name,
|
||||
"default_log_ids": logs.ids,
|
||||
"default_node_btn_id": btn_rec.id,
|
||||
"default_node_link_len": '转交2' if len(
|
||||
btn_rec.node_id.out_link_ids) > 1 and btn_rec.name == '转交' else '',
|
||||
"default_node_link_len": '转交2' if len(btn_rec.node_id.out_link_ids) > 1 and btn_rec.name == '转交' else '',
|
||||
},
|
||||
}
|
||||
# 下一个节点
|
||||
next_state = btn_rec.workflow_id.node_ids[self_state + 1].button_ids[0]
|
||||
if btn_rec.name == '转交' and len(btn_rec.node_id.out_link_ids) > 1:
|
||||
if btn_rec.name == '转交' and len(btn_rec.node_id.out_link_ids) >= 1:
|
||||
for state in btn_rec.node_id.out_link_ids:
|
||||
self.env['trans.link'].create({
|
||||
trans_link_id = self.env['trans.link'].create({
|
||||
'node_button_id': btn_rec.id,
|
||||
'name': state.name.split('-> ')[1],
|
||||
'link_type': 'trans',
|
||||
@@ -301,6 +300,7 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
"default_is_automatic": next_state.is_automatic,
|
||||
"default_employee_ids": employee_ids,
|
||||
"default_node_btn_id": btn_rec.id,
|
||||
"default_trans_link_id": trans_link_id.id,
|
||||
"default_node_link_len": '转交2' if len(btn_rec.node_id.out_link_ids) > 1 and btn_rec.name == '转交' else '',
|
||||
},
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<!-- 退回意见退回类型 -->
|
||||
<field name="return_link_id" invisible="node_btn_name != '退回'" string="退回节点"/>
|
||||
<!-- 转交人员 -->
|
||||
<field name="trans_link_id" invisible="not node_link_len" string="转交节点"/>
|
||||
<field name="trans_link_id" string="转交节点"/>
|
||||
<field name="employee_ids" widget="many2many_tags" string="人员范围"/>
|
||||
</group>
|
||||
<group string="流程选择" invisible="node_btn_name != '分发'">
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<field name="is_billing"/>
|
||||
<field name="is_reconciliation"/>
|
||||
<button name="unlink" type="object" class="btn-primary" string="删除"/>
|
||||
<button name="button_push" type="object" class="btn-primary" string="推送" invisible="is_push"/>
|
||||
<button name="button_push" type="object" class="btn-primary" string="推送" column_invisible="is_push"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user