diff --git a/soong_workflow/templates/soong_workflow_templates.xml b/soong_workflow/templates/soong_workflow_templates.xml
index 556684af9..ae14f50cb 100644
--- a/soong_workflow/templates/soong_workflow_templates.xml
+++ b/soong_workflow/templates/soong_workflow_templates.xml
@@ -33,6 +33,7 @@
+
@@ -42,7 +43,7 @@
-
+
@@ -90,6 +91,7 @@
+
@@ -99,7 +101,7 @@
-
+
diff --git a/soong_workflow/views/soong_workflow_record.xml b/soong_workflow/views/soong_workflow_record.xml
index db6d33978..a464daa07 100644
--- a/soong_workflow/views/soong_workflow_record.xml
+++ b/soong_workflow/views/soong_workflow_record.xml
@@ -86,7 +86,7 @@
+ create="false" default_order="display_end_time" expand="1" limit="10">
@@ -139,7 +139,7 @@
+ create="false" default_order="display_end_time" expand="1" limit="10">
@@ -412,7 +412,7 @@
+ create="false" default_order="display_end_time" limit="10">
diff --git a/soong_workflow/wizard/soong_workflow_comment_wizard_view.xml b/soong_workflow/wizard/soong_workflow_comment_wizard_view.xml
index b01077f0c..9b3f269c2 100644
--- a/soong_workflow/wizard/soong_workflow_comment_wizard_view.xml
+++ b/soong_workflow/wizard/soong_workflow_comment_wizard_view.xml
@@ -34,9 +34,10 @@
+
-
+
@@ -82,11 +83,11 @@
-
+
-
+
diff --git a/yuthon_hr_employee/views/yuthon_medical_manage_views.xml b/yuthon_hr_employee/views/yuthon_medical_manage_views.xml
index 162727c62..124fba646 100644
--- a/yuthon_hr_employee/views/yuthon_medical_manage_views.xml
+++ b/yuthon_hr_employee/views/yuthon_medical_manage_views.xml
@@ -10,7 +10,7 @@
-
+
diff --git a/yuthon_issue/views/issue_library_views.xml b/yuthon_issue/views/issue_library_views.xml
index 7304c3ffc..33c482e5d 100644
--- a/yuthon_issue/views/issue_library_views.xml
+++ b/yuthon_issue/views/issue_library_views.xml
@@ -238,6 +238,7 @@
+
@@ -246,7 +247,7 @@
-
+
@@ -457,6 +458,7 @@
+
@@ -465,7 +467,7 @@
-
+
@@ -627,6 +629,7 @@
+
@@ -635,7 +638,7 @@
-
+
@@ -786,6 +789,7 @@
+
@@ -794,7 +798,7 @@
-
+
diff --git a/yuthon_official/models/yuthon_official_incoming_normal.py b/yuthon_official/models/yuthon_official_incoming_normal.py
index 75f2fd54e..4b9abbfc1 100644
--- a/yuthon_official/models/yuthon_official_incoming_normal.py
+++ b/yuthon_official/models/yuthon_official_incoming_normal.py
@@ -44,6 +44,31 @@ class YuthonOfficialIncomingNormal(models.Model):
room_booking_ids = fields.One2many('room.booking', 'incoming_normal_id', string="会议关联")
issue_library_ids = fields.One2many('issue.library', 'incoming_normal_id', string="议题关联")
related_issues_id = fields.Many2one('issue.library', string="关联议题")
+
+ # 显示用的办结时间(如果有审批日志,取最后一条日志的时间;否则使用write_date)
+ display_end_time = fields.Datetime(
+ string="办结时间",
+ compute='_compute_display_end_time',
+ store=True
+ )
+
+ @api.depends('log_ids', 'write_date')
+ def _compute_display_end_time(self):
+ """
+ 计算显示用的办结时间
+ 逻辑:如果有审批日志,取最后一条日志的时间;否则使用write_date
+ """
+ for record in self:
+ if record.log_ids:
+ # 按ID排序,取最后一条日志的时间
+ sorted_logs = record.log_ids.sorted(lambda l: l.id)
+ if sorted_logs and hasattr(sorted_logs[-1], 'lase_click_date') and sorted_logs[-1].lase_click_date:
+ record.display_end_time = sorted_logs[-1].lase_click_date
+ else:
+ record.display_end_time = record.write_date
+ else:
+ record.display_end_time = record.write_date
+
def _get_default_name_title(self):
return self._description if self._description else self._name
diff --git a/yuthon_official/views/yuthon_official_incoming_normal_views.xml b/yuthon_official/views/yuthon_official_incoming_normal_views.xml
index 7dcfd7933..2bf37eb7d 100644
--- a/yuthon_official/views/yuthon_official_incoming_normal_views.xml
+++ b/yuthon_official/views/yuthon_official_incoming_normal_views.xml
@@ -4,10 +4,11 @@
yuthon.official.incoming.normal.tree
yuthon.official.incoming.normal
-
+
+
@@ -57,13 +58,13 @@
-
+