添加功能
This commit is contained in:
@@ -24,7 +24,6 @@ class SoongWorkflowLink(models.Model):
|
||||
_name = "soong.workflow.link"
|
||||
_description = "Soong Workflow Links"
|
||||
|
||||
sequence = fields.Integer(string="序号")
|
||||
name = fields.Char(
|
||||
string="Name", help="Enter friendly link name that describe the process."
|
||||
)
|
||||
|
||||
@@ -539,18 +539,13 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
actual_path_links = []
|
||||
for node in actual_path_nodes[1:]:
|
||||
if node.name not in skipped_node_names:
|
||||
for out_link in node.out_link_ids:
|
||||
target_node = out_link.node_to
|
||||
if not target_node:
|
||||
continue
|
||||
link = self.env['trans.link'].create({
|
||||
'node_button_id': btn_rec.id,
|
||||
'name': target_node.name,
|
||||
'sequence': out_link.sequence,
|
||||
'link_type': 'trans',
|
||||
'record_id': self.id,
|
||||
})
|
||||
actual_path_links.append(link)
|
||||
link = self.env['trans.link'].create({
|
||||
'node_button_id': btn_rec.id,
|
||||
'name': node.name,
|
||||
'link_type': 'trans',
|
||||
'record_id': self.id,
|
||||
})
|
||||
actual_path_links.append(link)
|
||||
|
||||
if actual_path_links:
|
||||
trans_link_ids = [link.id for link in actual_path_links]
|
||||
|
||||
@@ -32,8 +32,7 @@
|
||||
<field name="name">soong.workflow.link.tree</field>
|
||||
<field name="model">soong.workflow.link</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="bottom">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<tree>
|
||||
<field name="name" required="1"/>
|
||||
<field name="node_from" required="1"/>
|
||||
<field name="node_to" required="1"/>
|
||||
|
||||
Reference in New Issue
Block a user