@@ -332,7 +332,7 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
index = 20 # 防止死循环
|
||||
break
|
||||
current_department = self.department_id
|
||||
if btn_rec.link_id and btn_rec.link_id in current_node.out_link_ids:
|
||||
if btn_rec.link_id in current_node.out_link_ids and len(current_node.out_link_ids) == 1:
|
||||
matched_link = btn_rec.link_id
|
||||
next_node = matched_link.node_to
|
||||
matched_key = next_node.name
|
||||
@@ -341,14 +341,27 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
# 筛选与当前节点部门匹配的后续节点
|
||||
valid_nodes = []
|
||||
for link in current_node.out_link_ids:
|
||||
target_node = link.node_to
|
||||
# 如果目标节点有部门限制,且与当前节点部门匹配
|
||||
if target_node.department_id and any(
|
||||
dept in current_department or
|
||||
current_department in self.get_all_sub_departments(dept)
|
||||
for dept in target_node.department_id
|
||||
):
|
||||
valid_nodes.append((target_node, link))
|
||||
if self.name_title == '业务审批':
|
||||
category_names = self.information_categories_ids.mapped('name')
|
||||
target_name = link.name.split('->')[-1].strip()
|
||||
if '工会活动' in category_names:
|
||||
if target_name == '工会主席':
|
||||
target_node = link.node_to
|
||||
valid_nodes.append((target_node, link))
|
||||
else:
|
||||
if target_name == '复核':
|
||||
target_node = link.node_to
|
||||
valid_nodes.append((target_node, link))
|
||||
|
||||
else:
|
||||
target_node = link.node_to
|
||||
# 如果目标节点有部门限制,且与当前节点部门匹配
|
||||
if target_node.department_id and any(
|
||||
dept in current_department or
|
||||
current_department in self.get_all_sub_departments(dept)
|
||||
for dept in target_node.department_id
|
||||
):
|
||||
valid_nodes.append((target_node, link))
|
||||
|
||||
# 尝试父部门匹配
|
||||
if not valid_nodes and current_department and current_department.parent_id:
|
||||
|
||||
@@ -11,6 +11,8 @@ class IssueApprovalDecision(models.Model):
|
||||
decision_type_on_id = fields.Many2one('issue.approval.decision.type', string='事项类别上级')
|
||||
sequence = fields.Char(string='序号', store=True)
|
||||
specifics = fields.Text(string='具体事项')
|
||||
by_law = fields.Selection([('yes', '是'), ('no', '否')], string='是否经过法律审核')
|
||||
is_filing = fields.Selection([('yes', '备'), ('no', '否')], string='是否备案')
|
||||
council_id = fields.Many2one('issue.library.type', string='党总委员会')
|
||||
team_meet_id = fields.Many2one('issue.library.type', string='经营班子会')
|
||||
board_meet_id = fields.Many2one('issue.library.type', string='董事会')
|
||||
|
||||
@@ -10,12 +10,14 @@
|
||||
<field name="decision_type_id" optional="hide"/>
|
||||
<field name="decision_type_on_id" column_invisible="1"/>
|
||||
<field name="management_matters_id" optional="hide"/>
|
||||
<field name="by_law"/>
|
||||
<field name="council_id"/>
|
||||
<field name="team_meet_id"/>
|
||||
<field name="board_meet_id"/>
|
||||
<field name="district_state_id"/>
|
||||
<field name="district_government_id"/>
|
||||
<field name="district_party_id"/>
|
||||
<field name="is_filing"/>
|
||||
<field name="remarks"/>
|
||||
<field name="scope"/>
|
||||
<field name="company_id" optional="hide"/>
|
||||
@@ -45,6 +47,8 @@
|
||||
</group>
|
||||
<group>
|
||||
<field name="specifics" required="1"/>
|
||||
<field name="by_law"/>
|
||||
<field name="is_filing"/>
|
||||
<field name="team_meet_id"/>
|
||||
</group>
|
||||
<group>
|
||||
|
||||
Reference in New Issue
Block a user