添加功能

This commit is contained in:
李鹏宇
2025-09-08 11:32:44 +08:00
parent 5a7cf8d7c2
commit daaffc148e
2 changed files with 4 additions and 2 deletions
@@ -138,6 +138,8 @@ class SoongWorkflowMixin(models.AbstractModel):
if target_role_id in current_user_role_ids:
continue
for button_id in button_ids:
if button_id.node_id.node_name == '结束':
continue
allowed_departments = button_id.node_id.department_id
if allowed_departments and employee.department_id.id not in allowed_departments.ids:
continue
@@ -61,7 +61,7 @@
<field name="model">soong.workflow.record</field>
<field name="arch" type="xml">
<tree string="流程查询" action="open_record" type="object"
decoration-danger="approve_state == 'end'"
decoration-danger="approve_state == 'end'" delete="false"
create="false" default_order="write_date2 desc, id desc" expand="1">
<header>
<button name="admin_end" type="object" string="管理员强制结束" class="oe_highlight"/>
@@ -85,7 +85,7 @@
<field name="member_of_department" optional="hide"/>
<field name="is_manager" column_invisible="1"/>
<button name="delete_record" type="object" string="删除" class="btn-primary" confirm="你确定要删除吗?"
invisible="not (is_manager or approve_state == 'draft')"/>
invisible="not is_manager or approve_state != 'draft'"/>
<button name="reminders_record" type="object" string="催办" class="btn-primary"
groups="soong_workflow.group_soong_workflow_manager"/>
<button name="revoke_record" type="object" string="撤销" class="btn-primary"