diff --git a/soong_workflow/models/soong_workflow_mixin.py b/soong_workflow/models/soong_workflow_mixin.py index a526a0c93..a39492661 100644 --- a/soong_workflow/models/soong_workflow_mixin.py +++ b/soong_workflow/models/soong_workflow_mixin.py @@ -129,18 +129,14 @@ class SoongWorkflowMixin(models.AbstractModel): record.is_confirm = True record.is_end = True domain = [('done_by', '=', self.env.user.id), ('workflow_id', '=', record.workflow_id.id), - ('res_id', '=', record.id), ('approval_state', 'in', ['0', '1']), ('name', '!=', '归档')] + ('res_id', '=', record.id), ('approval_state', 'not in', ['0', '1']), ('name', '!=', '归档')] lg2 = record.log_ids2.search(domain) lg1 = record.log_ids.search(domain) if lg2 or lg1: record.is_confirm = False - if not lg1 and not lg2 and record.is_active == True: + if not lg1 and not lg2: record.is_end = False - if record.log_ids: - if record.log_ids[-1].name == '归档' and record.log_ids[-1].approval_state == '2': - record.is_end = True - @api.depends("node_id", "log_ids") def _compute_approval_sign_ids(self): for record in self: @@ -878,7 +874,7 @@ class SoongWorkflowMixin(models.AbstractModel): id_el = etree.Element("field") id_el.set("name", "log_ids") id_el.set("invisible", "1") - invisible += "or is_end" + invisible += "or not is_end" if button.name == "退回": id_el = etree.Element("field") id_el.set("name", "log_ids") diff --git a/yuthon_notice/controllers/main.py b/yuthon_notice/controllers/main.py index 9595d0206..15731c1e2 100644 --- a/yuthon_notice/controllers/main.py +++ b/yuthon_notice/controllers/main.py @@ -40,3 +40,18 @@ class YuthonNotice(http.Controller): 'code':200, 'message':'success' }) + + @http.route('/yuthon/notice/list', methods=['POST'], type='http', auth='none', csrf=False) + def yuthon_notice_list(self, **kwargs): + notice_ids = request.env['yuthon.notice'].sudo().search([('employee_id.id', "=", kwargs.get('employee_id'))]) + data_list = [] + for notice in notice_ids: + result = { + 'id': notice.id, + 'create_data1': notice.create_data1, + 'users_id': notice.users_id.name, + 'name': notice.name, + } + data_list.append(result) + return json.dumps({'data': data_list, 'code': 200, 'message': 'success'}) + diff --git a/yuthon_trade/report/business_approval_print_templates.xml b/yuthon_trade/report/business_approval_print_templates.xml index 21967d3f0..c97027029 100644 --- a/yuthon_trade/report/business_approval_print_templates.xml +++ b/yuthon_trade/report/business_approval_print_templates.xml @@ -7,139 +7,46 @@ - - -
- 业务审批单 -
- - -
- 部门: -
- - +
业务审批单
+
部门:
- - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - +
事项标题 - -
业务类型 - - 、 - -
事项说明 - -
用章类型 - - 、 - -
用章范围 - - 、 - -
附件清单 - -
-
-
事项标题
业务类型、
事项说明
用章类型、
用章范围、
附件清单
审批详情
- - - -
-