From ccf0682f359fbad88bc1c3d40522aea9b5c39c9c Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Thu, 13 Mar 2025 15:59:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/soong_workflow_record.xml | 13 +++++--- yuthon_property/models/yuthon_property.py | 32 ++++++++++--------- .../models/property_evaluate_application.py | 1 - .../property_evaluate_application_views.xml | 2 +- 4 files changed, 27 insertions(+), 21 deletions(-) diff --git a/soong_workflow/views/soong_workflow_record.xml b/soong_workflow/views/soong_workflow_record.xml index ec9813075..f826879a3 100644 --- a/soong_workflow/views/soong_workflow_record.xml +++ b/soong_workflow/views/soong_workflow_record.xml @@ -8,7 +8,12 @@ - + + + + + + @@ -99,13 +104,13 @@ - 流程查询 ir.actions.act_window soong.workflow.record - tree,kanban - [('users_ids', 'in', [uid]), ('reclaim_state', '=', False)] + tree,kanban,search + [('reclaim_state', '=', False)] + diff --git a/yuthon_property/models/yuthon_property.py b/yuthon_property/models/yuthon_property.py index b2753ec4f..df54b306e 100644 --- a/yuthon_property/models/yuthon_property.py +++ b/yuthon_property/models/yuthon_property.py @@ -216,28 +216,30 @@ class YuthonProperty(models.Model): raise UserError("当前状态不允许提交") form_id = self.env.ref('yuthon_property_approval.property_evaluate_application_form').id property_list = [] - if not property_ids: - property_ids = self - for i in property_ids: - i.write({'state': 'ing'}) # for record in property_ids: - # owner_id = False - # if record.title_information_ids: - # first_title_info = record.title_information_ids[0].owner_id.id - # if first_title_info.owner_id: - # owner_id = first_title_info.owner_id.id - # property_list.append([0, 0, { - # 'owner_id': owner_id - # }]) + # if record.title_information_ids: + # first_title_info = record.title_information_ids[0] + # if first_title_info.owner_id: + # owner_id = first_title_info.owner_id.id + # else: + # owner_id = None + # else: + # owner_id = None + # + # property_list.append([0, 0, { + # 'yuthon_property_id': record.id, + # 'owner_id': owner_id + # }]) + # record.write({'state': 'ing'}) return { 'name': '提交物业评估', 'view_mode': 'form', 'res_model': 'property.evaluate.application', 'type': 'ir.actions.act_window', 'views': [(form_id, 'form')], - # "context": { - # 'default_evaluate_application_ids': property_list - # } + "context": { + 'default_evaluate_application_ids': property_list + } } # 拆分 def put_split_approval(self): diff --git a/yuthon_property_approval/models/property_evaluate_application.py b/yuthon_property_approval/models/property_evaluate_application.py index 6a6150a2a..49f47e6f1 100644 --- a/yuthon_property_approval/models/property_evaluate_application.py +++ b/yuthon_property_approval/models/property_evaluate_application.py @@ -19,7 +19,6 @@ class PropertyEvaluateApplication(models.Model): related_issues_id = fields.Many2one('issue.library', string="关联议题") is_experts = fields.Boolean(string="是否需要专家评审") notice_documents_ids = fields.Many2many('ir.attachment', string='议题附件') - issue_library_id = fields.Many2one('issue.library', string='关联议题') evaluate_application_ids = fields.One2many('evaluate.application.line', 'property_message_id', string='物业信息明细行') urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度', default='normal') diff --git a/yuthon_property_approval/views/property_evaluate_application_views.xml b/yuthon_property_approval/views/property_evaluate_application_views.xml index e77e4251d..a90d545ae 100644 --- a/yuthon_property_approval/views/property_evaluate_application_views.xml +++ b/yuthon_property_approval/views/property_evaluate_application_views.xml @@ -46,7 +46,7 @@ - + premises_id