From 22bd20c5202790073c194e957c046ffea1cac902 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Wed, 17 Dec 2025 15:25:42 +0800
Subject: [PATCH 01/43] =?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
---
soong_workflow/models/soong_workflow_record.py | 4 ++--
yuthon_hr_attendance/views/go_approval.xml | 4 ++--
.../views/yuthon_message_login_views.xml | 2 +-
.../views/yuthon_onboard_approval_views.xml | 6 +++---
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/soong_workflow/models/soong_workflow_record.py b/soong_workflow/models/soong_workflow_record.py
index 36b6d7c50..74d7e599b 100644
--- a/soong_workflow/models/soong_workflow_record.py
+++ b/soong_workflow/models/soong_workflow_record.py
@@ -353,8 +353,8 @@ class SoongWorkflowRecord(models.Model):
for record in record_ids:
record_id = record.env[record.res_model].search([('id', '=', record.res_id)])
record_list.append(record.id)
- if record_id.log_ids and self.env.user.name != "Administrator":
- raise UserError("当前流程不可删除")
+ # if record_id.log_ids and self.env.user.name != "Administrator":
+ # raise UserError("当前流程不可删除")
wizard = self.env.ref("soong_workflow.view_soong_workflow_record_delete_wizard")
return {
"name": _("删除确认"),
diff --git a/yuthon_hr_attendance/views/go_approval.xml b/yuthon_hr_attendance/views/go_approval.xml
index 001234a1a..86fb60055 100644
--- a/yuthon_hr_attendance/views/go_approval.xml
+++ b/yuthon_hr_attendance/views/go_approval.xml
@@ -67,8 +67,8 @@
-
-
+
+
diff --git a/yuthon_hr_employee_approval/views/yuthon_message_login_views.xml b/yuthon_hr_employee_approval/views/yuthon_message_login_views.xml
index 3b2d269dd..f7de9a13a 100644
--- a/yuthon_hr_employee_approval/views/yuthon_message_login_views.xml
+++ b/yuthon_hr_employee_approval/views/yuthon_message_login_views.xml
@@ -92,7 +92,7 @@
-
+
diff --git a/yuthon_hr_employee_approval/views/yuthon_onboard_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_onboard_approval_views.xml
index 7a1118ad7..488881b76 100644
--- a/yuthon_hr_employee_approval/views/yuthon_onboard_approval_views.xml
+++ b/yuthon_hr_employee_approval/views/yuthon_onboard_approval_views.xml
@@ -34,15 +34,15 @@
+
+
+
-
-
-
From f6b5e3bc31708dc17e7f07d82e2ca87573b55011 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Wed, 17 Dec 2025 16:15:02 +0800
Subject: [PATCH 02/43] =?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
---
soong_workflow/wizard/soong_workflow_comment_wizard.py | 4 ++--
yuthon_notice/views/yuthon_notice_views.xml | 2 +-
yuthon_report/views/att_report_view.xml | 6 +++---
yuthon_will_task/models/inherit_room_booking.py | 2 +-
yuthon_work_brand/views/hr_menus.xml | 6 +++---
5 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/soong_workflow/wizard/soong_workflow_comment_wizard.py b/soong_workflow/wizard/soong_workflow_comment_wizard.py
index 8138c458f..987fd467a 100644
--- a/soong_workflow/wizard/soong_workflow_comment_wizard.py
+++ b/soong_workflow/wizard/soong_workflow_comment_wizard.py
@@ -425,7 +425,7 @@ class SoongWorkflowCommentWizard(models.TransientModel):
for employee in self.employee_ids:
action_id = self.env['ir.actions.act_window'].search([('res_model', '=', self.res_model)])[0]
- url = f'https://oa.thtzjt.com/web?login={employee.user_id.login}&oauth_uid={employee.wecom_userid}#id={record_id.id}&cids=2&action={action_id.id}&model={record_id._name}&view_type=form&menu_id=10104'
+ url = f'https://oa.thtzjt.com/web#id={record_id.id}&cids=2&active_id={action_id.id}&model={record_id._name}&view_type=form'
self.sudo().env["wecom.apps"].sync_send_message_textcard(category='oa',
user_id=employee.wecom_userid,
title=record_id._description,
@@ -623,7 +623,7 @@ class SoongWorkflowCommentWizard(models.TransientModel):
employees = self.node_btn_id.workflow_id.employee_ids
recipients = [emp for emp in employees]
for employee in recipients:
- url = f'https://oa.thtzjt.com/web?login={employee.user_id.login}&oauth_uid={employee.wecom_userid}#id={record_id.id}&cids=2&action={action_id.id}&model={record_id._name}&view_type=form&menu_id=10104'
+ url = f'https://oa.thtzjt.com/web#id={record_id.id}&cids=2&active_id={action_id.id}&model={record_id._name}&view_type=form'
self.sudo().env["wecom.apps"].sync_send_message_textcard(category='oa',
user_id=employee.wecom_userid,
title=record_id._description,
diff --git a/yuthon_notice/views/yuthon_notice_views.xml b/yuthon_notice/views/yuthon_notice_views.xml
index 0c355020c..f760ae790 100644
--- a/yuthon_notice/views/yuthon_notice_views.xml
+++ b/yuthon_notice/views/yuthon_notice_views.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/yuthon_report/views/att_report_view.xml b/yuthon_report/views/att_report_view.xml
index 87154dddd..db7dd9cdd 100644
--- a/yuthon_report/views/att_report_view.xml
+++ b/yuthon_report/views/att_report_view.xml
@@ -2,7 +2,7 @@
- 请假扣款报表
+ 请假报表
att_report_client
{
@@ -22,7 +22,7 @@
- 误餐费报表
+ 误餐报表
att_report_client
{
@@ -42,7 +42,7 @@
- 加班费报表
+ 加班报表
att_report_client
{
diff --git a/yuthon_will_task/models/inherit_room_booking.py b/yuthon_will_task/models/inherit_room_booking.py
index 5f8ae438a..95c6b86f2 100644
--- a/yuthon_will_task/models/inherit_room_booking.py
+++ b/yuthon_will_task/models/inherit_room_booking.py
@@ -47,7 +47,7 @@ class InheritRoomBooking(models.Model):
start_datetime = new_record.start_datetime
start_date = start_datetime.date()
request_hour_from = get_hour_selection(new_record.start_datetime)
- request_hour_to = get_hour_selection(new_record.end_datetime)
+ request_hour_to = get_hour_selection(new_record.stop_datetime)
self.env['yuthon.will.task'].sudo().create({
'name': new_record.name,
'users_ids': [(6, 0, new_record.room_users_ids.ids)],
diff --git a/yuthon_work_brand/views/hr_menus.xml b/yuthon_work_brand/views/hr_menus.xml
index c5f70b46c..e8d2d1562 100644
--- a/yuthon_work_brand/views/hr_menus.xml
+++ b/yuthon_work_brand/views/hr_menus.xml
@@ -207,21 +207,21 @@
sequence="90"/>
-
- 我的流程
- ir.actions.act_window
- soong.workflow.record
- tree,kanban,search
-
- {'header_search_default_approve_state': 1, 'header_search_default_to_do':1, 'check_employee': 1}
- [('users_ids', 'in', uid), ('reclaim_state', '=', False)]
-
-
-
+
+
+
+
+
+
+
+
+
+
+
待办
ir.actions.act_window
diff --git a/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py b/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py
index 8d146cc39..f38fb3f21 100644
--- a/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py
+++ b/yuthon_hr_employee_approval/models/yuthon_reassignment_approval.py
@@ -43,7 +43,7 @@ class YuthonReassignmentApproval(models.Model):
#异动信息
change_kind = fields.Selection([('promoted', '晋升'), ('demoted', '降职'), ('leveling', '平级调整'), ('seconded', '借调')], default="promoted", string="异动类型")
change_reason = fields.Text(string="异动原因")
- change_company_id = fields.Many2one('res.company', string="异动公司", default=lambda self: self.env.user.company_id)
+ change_company_id = fields.Many2one('res.company', string="异动公司")
change_date = fields.Date(string="调动日期", default=lambda self: fields.Date.today())
handover_date = fields.Date(string="移交日期", default=lambda self: fields.Date.today())
handover_person_id = fields.Many2one("hr.employee", string="工作交接人")
diff --git a/yuthon_purchase/data/process_code_data.xml b/yuthon_purchase/data/process_code_data.xml
new file mode 100644
index 000000000..19cda0b0e
--- /dev/null
+++ b/yuthon_purchase/data/process_code_data.xml
@@ -0,0 +1,10 @@
+
+
+
+ 采购订单-编号
+ purchase_workflow_approval_code
+ CGOU%(y)s%(month)s%(day)s
+ 3
+
+
+
diff --git a/yuthon_purchase/models/purchase_workflow.py b/yuthon_purchase/models/purchase_workflow.py
index a75507a7a..5ea9e7a37 100644
--- a/yuthon_purchase/models/purchase_workflow.py
+++ b/yuthon_purchase/models/purchase_workflow.py
@@ -7,7 +7,7 @@ class PurchaseWorkflow(models.Model):
_description = '采购审批单'
_inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin']
- code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('purchase_order_sequence_code'))
+ code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('purchase_workflow_approval_code'))
name = fields.Char(string="标题")
name_title = fields.Char(string="默认标题", default=lambda self: self._description, readonly=True)
user_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user, required=True)
diff --git a/yuthon_work_brand/views/hr_menus.xml b/yuthon_work_brand/views/hr_menus.xml
index e8d2d1562..839106392 100644
--- a/yuthon_work_brand/views/hr_menus.xml
+++ b/yuthon_work_brand/views/hr_menus.xml
@@ -671,21 +671,21 @@
parent="holiday_manage_menu_root_board"
action="soong_workflow.action_kklw_workflow_approval_request"
sequence="1"/>
-
+
+
+
+
+
+ sequence="4"/>
+ sequence="4"/>
\ No newline at end of file
diff --git a/yuthon_will_task/views/yuthon_will_task_views.xml b/yuthon_will_task/views/yuthon_will_task_views.xml
index 047654fd8..66d85a92a 100644
--- a/yuthon_will_task/views/yuthon_will_task_views.xml
+++ b/yuthon_will_task/views/yuthon_will_task_views.xml
@@ -26,6 +26,7 @@
+
@@ -254,7 +255,7 @@
领导日程
yuthon.will.task
tree,calendar,form
- [('user_role_ids.name', 'in', ['董事长', '分管领导', '总经理', '部门副经理', '部门经理', '副总经理', '司机'])]
+ [('user_role_ids.name', 'in', ['董事长', '分管领导', '总经理', '部门副经理', '副总经理'])]
{'search_default_next_seven_days': 1}
From 6133ef9a2dcc66fc925d438c08d9cdc55b6386c1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Thu, 18 Dec 2025 11:22:53 +0800
Subject: [PATCH 08/43] =?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
---
yuthon_will_task/models/yuthon_dates_task.py | 2 +-
yuthon_will_task/views/yuthon_dates_task_views.xml | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/yuthon_will_task/models/yuthon_dates_task.py b/yuthon_will_task/models/yuthon_dates_task.py
index 58e67b239..a1de3d2c2 100644
--- a/yuthon_will_task/models/yuthon_dates_task.py
+++ b/yuthon_will_task/models/yuthon_dates_task.py
@@ -15,6 +15,6 @@ class YuthonDatesTask(models.Model):
reminder_time = fields.Datetime(string='提醒时间')
yuthon_will_task_id = fields.Many2one('yuthon.will.task', string='关联日程管理')
- employee_ids = fields.Many2many('hr.employee', string='提醒单位')
+ employee_ids = fields.Many2many('hr.employee', string='提醒人员')
task_state = fields.Selection([('to_do', '待提醒'), ('done', '已提醒')], string='状态')
diff --git a/yuthon_will_task/views/yuthon_dates_task_views.xml b/yuthon_will_task/views/yuthon_dates_task_views.xml
index b95f921e4..34e84375a 100644
--- a/yuthon_will_task/views/yuthon_dates_task_views.xml
+++ b/yuthon_will_task/views/yuthon_dates_task_views.xml
@@ -5,10 +5,10 @@
yuthon.dates.task
-
-
-
-
+
+
+
+
From e0c5d49a2547d788755eac5eab296bdf76b45ceb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Thu, 18 Dec 2025 11:28:24 +0800
Subject: [PATCH 09/43] =?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
---
yuthon_will_task/models/yuthon_will_task.py | 6 +++---
yuthon_will_task/views/yuthon_will_task_views.xml | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/yuthon_will_task/models/yuthon_will_task.py b/yuthon_will_task/models/yuthon_will_task.py
index 8828d8cf6..14926792f 100644
--- a/yuthon_will_task/models/yuthon_will_task.py
+++ b/yuthon_will_task/models/yuthon_will_task.py
@@ -246,9 +246,9 @@ class YuthonWillTask(models.Model):
self.sudo().env["wecom.apps"].sync_send_message_textcard(category='oa', user_id=employee_id.wecom_userid,
title="日程事项提醒", description="事项名称: " + self.name + '\t' + '该事项已取消',
url=url, btntxt="详细信息")
- for record in self:
- partner_ids = record.employee_ids.user_id.partner_id.ids
- record.with_context(lang=record.env.lang)._message_auto_subscribe_notify(partner_ids, 'yuthon_will_task.mail_action_yuthon_will_task_add_comment')
+ # for record in self:
+ # partner_ids = record.employee_ids.user_id.partner_id.ids
+ # record.with_context(lang=record.env.lang)._message_auto_subscribe_notify(partner_ids, 'yuthon_will_task.mail_action_yuthon_will_task_add_comment')
return {
'type': 'ir.actions.client',
'tag': 'display_notification',
diff --git a/yuthon_will_task/views/yuthon_will_task_views.xml b/yuthon_will_task/views/yuthon_will_task_views.xml
index 66d85a92a..102ef78d0 100644
--- a/yuthon_will_task/views/yuthon_will_task_views.xml
+++ b/yuthon_will_task/views/yuthon_will_task_views.xml
@@ -26,7 +26,7 @@
-
+
From 41081d81d95a68bcf3c9829f9bb3e4502ca53cc8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Thu, 18 Dec 2025 11:32:03 +0800
Subject: [PATCH 10/43] =?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
---
yuthon_will_task/models/yuthon_will_task.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/yuthon_will_task/models/yuthon_will_task.py b/yuthon_will_task/models/yuthon_will_task.py
index 14926792f..1adc54d85 100644
--- a/yuthon_will_task/models/yuthon_will_task.py
+++ b/yuthon_will_task/models/yuthon_will_task.py
@@ -241,8 +241,7 @@ class YuthonWillTask(models.Model):
for employee_id in self.env['hr.employee'].search([('id', 'in', employee_list)]):
if not employee_id.wecom_userid:
raise UserError("请同步{}的企业微信".format(employee_id.name))
- menu_id = self.env['ir.ui.menu'].search([('name', '=', '我的日程')])
- url = f'https://oa.thtzjt.com/web#id={self.id}&cids=2&action={menu_id.action.id}&model=yuthon.will.task&view_type=list&menu_id={menu_id.id}'
+ url = f'https://oa.thtzjt.com/webh5#/journey?id={self.id}'
self.sudo().env["wecom.apps"].sync_send_message_textcard(category='oa', user_id=employee_id.wecom_userid,
title="日程事项提醒", description="事项名称: " + self.name + '\t' + '该事项已取消',
url=url, btntxt="详细信息")
From 60eaa214ccb2db37212ec1ddf5b77cb6da908d9a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Thu, 18 Dec 2025 11:34:12 +0800
Subject: [PATCH 11/43] =?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
---
yuthon_will_task/models/yuthon_will_task.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/yuthon_will_task/models/yuthon_will_task.py b/yuthon_will_task/models/yuthon_will_task.py
index 511b80633..120524e35 100644
--- a/yuthon_will_task/models/yuthon_will_task.py
+++ b/yuthon_will_task/models/yuthon_will_task.py
@@ -242,7 +242,7 @@ class YuthonWillTask(models.Model):
if not employee_id.wecom_userid:
raise UserError("请同步{}的企业微信".format(employee_id.name))
url = f'https://oa.thtzjt.com/webh5#/journey?id={self.id}'
- self.sudo().env["wecom.apps"].sync_send_message_textcard(category='oa', user_id=employee_id.wecom_userid,
+ self.sudo().env["wecom.apps"].sync_send_message_textcard(category='task', user_id=employee_id.wecom_userid,
title="日程事项提醒", description="事项名称: " + self.name + '\t' + '该事项已取消',
url=url, btntxt="详细信息")
# for record in self:
From 66f8a1fffd0c7209308a58379de030984fd2f114 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Thu, 18 Dec 2025 11:41:48 +0800
Subject: [PATCH 12/43] =?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
---
yuthon_will_task/models/yuthon_will_task.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/yuthon_will_task/models/yuthon_will_task.py b/yuthon_will_task/models/yuthon_will_task.py
index 120524e35..279f0923a 100644
--- a/yuthon_will_task/models/yuthon_will_task.py
+++ b/yuthon_will_task/models/yuthon_will_task.py
@@ -206,7 +206,7 @@ class YuthonWillTask(models.Model):
self.ensure_one()
employee_list = []
for task in self.env['yuthon.dates.task'].search([('task_state', '=', 'to_do')]):
- now = datetime.now()
+ now = datetime.now() - timedelta(hours=8)
if task.reminder_time == now:
task.task_state = 'done'
for task_time in task.employee_ids:
From bcc68b37f1b47a03fb5669c12392e59d92117ef9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Thu, 18 Dec 2025 11:52:30 +0800
Subject: [PATCH 13/43] =?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
---
yuthon_will_task/models/yuthon_will_task.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/yuthon_will_task/models/yuthon_will_task.py b/yuthon_will_task/models/yuthon_will_task.py
index 279f0923a..4f6cbffb4 100644
--- a/yuthon_will_task/models/yuthon_will_task.py
+++ b/yuthon_will_task/models/yuthon_will_task.py
@@ -203,7 +203,6 @@ class YuthonWillTask(models.Model):
return timedelta.max
def add_comment(self):
- self.ensure_one()
employee_list = []
for task in self.env['yuthon.dates.task'].search([('task_state', '=', 'to_do')]):
now = datetime.now() - timedelta(hours=8)
From 75ab959379239e3017015fb68cef559e3ebb7c55 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Thu, 18 Dec 2025 11:59:46 +0800
Subject: [PATCH 14/43] =?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
---
yuthon_will_task/models/yuthon_will_task.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/yuthon_will_task/models/yuthon_will_task.py b/yuthon_will_task/models/yuthon_will_task.py
index 4f6cbffb4..80664dbf6 100644
--- a/yuthon_will_task/models/yuthon_will_task.py
+++ b/yuthon_will_task/models/yuthon_will_task.py
@@ -204,9 +204,11 @@ class YuthonWillTask(models.Model):
def add_comment(self):
employee_list = []
+ now = datetime.now() - timedelta(hours=8)
+ now_hour_minute = now.strftime("%H:%M")
for task in self.env['yuthon.dates.task'].search([('task_state', '=', 'to_do')]):
- now = datetime.now() - timedelta(hours=8)
- if task.reminder_time == now:
+ reminder_hour_minute = task.reminder_time.strftime("%H:%M")
+ if reminder_hour_minute == now_hour_minute:
task.task_state = 'done'
for task_time in task.employee_ids:
employee_list.append(task_time.employee_id)
From 1df598b0e31f128628dddaaa8a47b76e53de2941 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Thu, 18 Dec 2025 12:01:23 +0800
Subject: [PATCH 15/43] =?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
---
yuthon_will_task/models/yuthon_will_task.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/yuthon_will_task/models/yuthon_will_task.py b/yuthon_will_task/models/yuthon_will_task.py
index 80664dbf6..7f08c319f 100644
--- a/yuthon_will_task/models/yuthon_will_task.py
+++ b/yuthon_will_task/models/yuthon_will_task.py
@@ -205,10 +205,10 @@ class YuthonWillTask(models.Model):
def add_comment(self):
employee_list = []
now = datetime.now() - timedelta(hours=8)
- now_hour_minute = now.strftime("%H:%M")
+ now_truncated = now.replace(second=0, microsecond=0)
for task in self.env['yuthon.dates.task'].search([('task_state', '=', 'to_do')]):
- reminder_hour_minute = task.reminder_time.strftime("%H:%M")
- if reminder_hour_minute == now_hour_minute:
+ reminder_truncated = task.reminder_time.replace(second=0, microsecond=0)
+ if reminder_truncated == now_truncated:
task.task_state = 'done'
for task_time in task.employee_ids:
employee_list.append(task_time.employee_id)
From b441253db9064e7aef7038962a126b225b9ae0cf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Thu, 18 Dec 2025 12:08:58 +0800
Subject: [PATCH 16/43] =?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
---
yuthon_will_task/models/yuthon_will_task.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/yuthon_will_task/models/yuthon_will_task.py b/yuthon_will_task/models/yuthon_will_task.py
index 7f08c319f..052c8538a 100644
--- a/yuthon_will_task/models/yuthon_will_task.py
+++ b/yuthon_will_task/models/yuthon_will_task.py
@@ -210,8 +210,8 @@ class YuthonWillTask(models.Model):
reminder_truncated = task.reminder_time.replace(second=0, microsecond=0)
if reminder_truncated == now_truncated:
task.task_state = 'done'
- for task_time in task.employee_ids:
- employee_list.append(task_time.employee_id)
+ for employee_id in task.employee_ids:
+ employee_list.append(employee_id)
for employee_id in employee_list:
if not employee_id.wecom_userid:
raise UserError("请同步{}的企业微信".format(employee_id.name))
From dbe831d26d3235c0b80936cff448e71899e5d25a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Thu, 18 Dec 2025 12:23:54 +0800
Subject: [PATCH 17/43] =?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
---
yuthon_will_task/models/yuthon_will_task.py | 50 +++++----------------
1 file changed, 10 insertions(+), 40 deletions(-)
diff --git a/yuthon_will_task/models/yuthon_will_task.py b/yuthon_will_task/models/yuthon_will_task.py
index 052c8538a..309fa270d 100644
--- a/yuthon_will_task/models/yuthon_will_task.py
+++ b/yuthon_will_task/models/yuthon_will_task.py
@@ -163,35 +163,6 @@ class YuthonWillTask(models.Model):
def read_number(self):
return self.search_count([('task_state', '=', 'will'), ('users_ids', 'in', self.env.user.id)])
- def will_task_time(self):
- # 任务状态判断
- for task in self.search([('task_state', '=', 'will')]):
- # 计算开始时间(将日期和时间选择转换为datetime对象)
- hour_from = float(task.request_hour_from)
- start_hour = int(hour_from)
- start_minute = int((hour_from - start_hour) * 60)
- start_datetime = datetime.combine(fields.Date.from_string(task.start_date), time(start_hour, start_minute))
- if task.request_hour_to:
- hour_to = float(task.request_hour_to)
- end_hour = int(hour_to)
- end_minute = int((hour_to - end_hour) * 60)
- end_datetime = start_datetime.replace(hour=end_hour, minute=end_minute)
- else:
- end_datetime = start_datetime + timedelta(hours=1)
- now = datetime.now() + timedelta(hours=8)
- if now > end_datetime:
- task.write({'task_state': 'done'})
- continue
- _logger.info(f"日程消息提醒定时任务判断\n当前时间:{now} --- 任务开始时间:{start_datetime}")
- if now <= start_datetime:
- if task.task_time_ids:
- for task_time in task.task_time_ids:
- duration = self._compute_duration(task_time)
- trigger_time = now + duration
- _logger.info(f"判断可否发送消息\n任务天:-{trigger_time.day}时:-{trigger_time.hour}分:-{trigger_time.minute}\n当前天:-{start_datetime.day}时:-{start_datetime.hour}分:-{start_datetime.minute}")
- if (trigger_time.day == start_datetime.day and trigger_time.hour == start_datetime.hour and trigger_time.minute == start_datetime.minute):
- task.add_comment()
-
def _compute_duration(self, task_time):
if task_time.task_unit == 'min':
return timedelta(minutes=task_time.number)
@@ -207,22 +178,21 @@ class YuthonWillTask(models.Model):
now = datetime.now() - timedelta(hours=8)
now_truncated = now.replace(second=0, microsecond=0)
for task in self.env['yuthon.dates.task'].search([('task_state', '=', 'to_do')]):
+ will_id = task.yuthon_will_task_id.id
reminder_truncated = task.reminder_time.replace(second=0, microsecond=0)
if reminder_truncated == now_truncated:
task.task_state = 'done'
for employee_id in task.employee_ids:
employee_list.append(employee_id)
- for employee_id in employee_list:
- if not employee_id.wecom_userid:
- raise UserError("请同步{}的企业微信".format(employee_id.name))
- url = f'https://oa.thtzjt.com/webh5#/journey?id={self.id}'
- data_name = "事项名称: " + self.name + '\n'
- data_user_ids = '参与人: ' + ', '.join(self.employee_ids.mapped('name')) + '\n'
- data_employee_id = ('司机:' + ', '.join(self.employee_ids2.mapped('name')) + '\n') if self.employee_ids2 else ''
- data_nota = ('备注:' + self.remarks) if self.remarks else ('') + '\n'
- data = data_name + data_user_ids + data_nota + data_employee_id
- self.sudo().env["wecom.apps"].sync_send_message_textcard(category='task', user_id=employee_id.wecom_userid, title="日程事项提醒", description=data,
- url=url, btntxt="详细信息")
+ for employee_id in employee_list:
+ url = f'https://oa.thtzjt.com/webh5#/journey?id={will_id.id}'
+ data_name = "事项名称: " + will_id.name + '\n'
+ data_user_ids = '参与人: ' + ', '.join(will_id.employee_ids.mapped('name')) + '\n'
+ data_employee_id = ('司机:' + ', '.join(will_id.employee_ids2.mapped('name')) + '\n') if will_id.employee_ids2 else ''
+ data_nota = ('备注:' + will_id.remarks) if will_id.remarks else ('') + '\n'
+ data = data_name + data_user_ids + data_nota + data_employee_id
+ self.sudo().env["wecom.apps"].sync_send_message_textcard(category='task', user_id=employee_id.wecom_userid, title="日程事项提醒", description=data,
+ url=url, btntxt="详细信息")
def button_add_comment(self):
self.add_comment()
From a3fa0e8db7b6d14e4a15a9d9e34e915c05cb8243 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Thu, 18 Dec 2025 12:30:07 +0800
Subject: [PATCH 18/43] =?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
---
yuthon_will_task/models/yuthon_will_task.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/yuthon_will_task/models/yuthon_will_task.py b/yuthon_will_task/models/yuthon_will_task.py
index 309fa270d..aa0bd80a5 100644
--- a/yuthon_will_task/models/yuthon_will_task.py
+++ b/yuthon_will_task/models/yuthon_will_task.py
@@ -178,7 +178,7 @@ class YuthonWillTask(models.Model):
now = datetime.now() - timedelta(hours=8)
now_truncated = now.replace(second=0, microsecond=0)
for task in self.env['yuthon.dates.task'].search([('task_state', '=', 'to_do')]):
- will_id = task.yuthon_will_task_id.id
+ will_id = task.yuthon_will_task_id
reminder_truncated = task.reminder_time.replace(second=0, microsecond=0)
if reminder_truncated == now_truncated:
task.task_state = 'done'
From 93d55781a50b0108f7cffc7bf60bace751ca0241 Mon Sep 17 00:00:00 2001
From: pengyuthon
Date: Thu, 18 Dec 2025 13:57:29 +0800
Subject: [PATCH 19/43] 1
---
yuthon_will_task/data/will_task_time_data.xml | 2 +-
yuthon_will_task/models/yuthon_dates_task.py | 2 +-
yuthon_will_task/models/yuthon_will_task.py | 42 +++++++++----------
3 files changed, 22 insertions(+), 24 deletions(-)
diff --git a/yuthon_will_task/data/will_task_time_data.xml b/yuthon_will_task/data/will_task_time_data.xml
index 18e5f33ed..bc34e541b 100644
--- a/yuthon_will_task/data/will_task_time_data.xml
+++ b/yuthon_will_task/data/will_task_time_data.xml
@@ -5,7 +5,7 @@
定时任务:日程任务提醒
code
- model.will_task_time()
+ model.add_comment()
1
diff --git a/yuthon_will_task/models/yuthon_dates_task.py b/yuthon_will_task/models/yuthon_dates_task.py
index a1de3d2c2..fd722be71 100644
--- a/yuthon_will_task/models/yuthon_dates_task.py
+++ b/yuthon_will_task/models/yuthon_dates_task.py
@@ -14,7 +14,7 @@ class YuthonDatesTask(models.Model):
_description = "日程任务"
reminder_time = fields.Datetime(string='提醒时间')
- yuthon_will_task_id = fields.Many2one('yuthon.will.task', string='关联日程管理')
+ yuthon_will_task_id = fields.Many2one('yuthon.will.task', string='日程')
employee_ids = fields.Many2many('hr.employee', string='提醒人员')
task_state = fields.Selection([('to_do', '待提醒'), ('done', '已提醒')], string='状态')
diff --git a/yuthon_will_task/models/yuthon_will_task.py b/yuthon_will_task/models/yuthon_will_task.py
index aa0bd80a5..53bf37f6b 100644
--- a/yuthon_will_task/models/yuthon_will_task.py
+++ b/yuthon_will_task/models/yuthon_will_task.py
@@ -174,25 +174,26 @@ class YuthonWillTask(models.Model):
return timedelta.max
def add_comment(self):
- employee_list = []
- now = datetime.now() - timedelta(hours=8)
- now_truncated = now.replace(second=0, microsecond=0)
- for task in self.env['yuthon.dates.task'].search([('task_state', '=', 'to_do')]):
- will_id = task.yuthon_will_task_id
- reminder_truncated = task.reminder_time.replace(second=0, microsecond=0)
- if reminder_truncated == now_truncated:
- task.task_state = 'done'
- for employee_id in task.employee_ids:
- employee_list.append(employee_id)
- for employee_id in employee_list:
- url = f'https://oa.thtzjt.com/webh5#/journey?id={will_id.id}'
- data_name = "事项名称: " + will_id.name + '\n'
- data_user_ids = '参与人: ' + ', '.join(will_id.employee_ids.mapped('name')) + '\n'
- data_employee_id = ('司机:' + ', '.join(will_id.employee_ids2.mapped('name')) + '\n') if will_id.employee_ids2 else ''
- data_nota = ('备注:' + will_id.remarks) if will_id.remarks else ('') + '\n'
- data = data_name + data_user_ids + data_nota + data_employee_id
- self.sudo().env["wecom.apps"].sync_send_message_textcard(category='task', user_id=employee_id.wecom_userid, title="日程事项提醒", description=data,
- url=url, btntxt="详细信息")
+ "日程定时任务提醒"
+ now = fields.datetime.now() + timedelta(hours=8)
+ _logger.info(f'定时任务已执行:当前提醒时间:{now}')
+ dates_task_ids = self.env['yuthon.dates.task'].search([('task_state', '=', 'to_do'), ('reminder_time', '<', fields.datetime.now() + timedelta(days=1))])
+ for task in dates_task_ids:
+ _logger.info(f'任务实际小时:{task.reminder_time.hour}:{task.reminder_time.minute}\n 当前提醒小时:{now.hour}:{now.minute}')
+ if task.reminder_time.minute == now.minute and task.reminder_time.hour == now.hour:
+ will_id = task.yuthon_will_task_id
+ for employee_id in will_id.employee_ids:
+ url = f'https://oa.thtzjt.com/webh5#/journey?id={will_id.id}'
+ data_name = "事项名称: " + task.yuthon_will_task_id.name + '\n'
+ data_user_ids = '参与人: ' + ', '.join(will_id.employee_ids.mapped('name')) + '\n'
+ data_employee_id = ('司机:' + ', '.join(will_id.employee_ids2.mapped('name')) + '\n') if will_id.employee_ids2 else ''
+ data_nota = ('备注:' + will_id.remarks) if will_id.remarks else ('') + '\n'
+ data = data_name + data_user_ids + data_nota + data_employee_id
+ self.sudo().env["wecom.apps"].sync_send_message_textcard(category='task', user_id=employee_id.wecom_userid, title="日程事项提醒", description=data,
+ url=url, btntxt="详细信息")
+ self.sudo().env["wecom.apps"].sync_send_message_textcard(category='task', user_id="18562027762", title="日程事项提醒", description=data,
+ url=url, btntxt="详细信息")
+ return True
def button_add_comment(self):
self.add_comment()
@@ -216,9 +217,6 @@ class YuthonWillTask(models.Model):
self.sudo().env["wecom.apps"].sync_send_message_textcard(category='task', user_id=employee_id.wecom_userid,
title="日程事项提醒", description="事项名称: " + self.name + '\t' + '该事项已取消',
url=url, btntxt="详细信息")
- # for record in self:
- # partner_ids = record.employee_ids.user_id.partner_id.ids
- # record.with_context(lang=record.env.lang)._message_auto_subscribe_notify(partner_ids, 'yuthon_will_task.mail_action_yuthon_will_task_add_comment')
return {
'type': 'ir.actions.client',
'tag': 'display_notification',
From bb8635fe8ac9b83db735a659d86fe1e9ae6afbfa Mon Sep 17 00:00:00 2001
From: pengyuthon
Date: Thu, 18 Dec 2025 14:08:10 +0800
Subject: [PATCH 20/43] 1
---
yuthon_will_task/models/yuthon_will_task.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/yuthon_will_task/models/yuthon_will_task.py b/yuthon_will_task/models/yuthon_will_task.py
index 53bf37f6b..72d71e5be 100644
--- a/yuthon_will_task/models/yuthon_will_task.py
+++ b/yuthon_will_task/models/yuthon_will_task.py
@@ -179,8 +179,8 @@ class YuthonWillTask(models.Model):
_logger.info(f'定时任务已执行:当前提醒时间:{now}')
dates_task_ids = self.env['yuthon.dates.task'].search([('task_state', '=', 'to_do'), ('reminder_time', '<', fields.datetime.now() + timedelta(days=1))])
for task in dates_task_ids:
- _logger.info(f'任务实际小时:{task.reminder_time.hour}:{task.reminder_time.minute}\n 当前提醒小时:{now.hour}:{now.minute}')
- if task.reminder_time.minute == now.minute and task.reminder_time.hour == now.hour:
+ _logger.info(f'任务实际小时:{task.reminder_time.hour + timedelta(hours=8)}:{task.reminder_time.minute + timedelta(hours=8)}\n 当前提醒小时:{now.hour}:{now.minute}')
+ if task.reminder_time.minute + timedelta(hours=8) == now.minute and task.reminder_time.hour + timedelta(hours=8) == now.hour:
will_id = task.yuthon_will_task_id
for employee_id in will_id.employee_ids:
url = f'https://oa.thtzjt.com/webh5#/journey?id={will_id.id}'
From a0dc377ecb2e6bfe20b4c495d999a5eebeb84e3f Mon Sep 17 00:00:00 2001
From: pengyuthon
Date: Thu, 18 Dec 2025 14:12:07 +0800
Subject: [PATCH 21/43] 1
---
yuthon_will_task/models/yuthon_will_task.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/yuthon_will_task/models/yuthon_will_task.py b/yuthon_will_task/models/yuthon_will_task.py
index 72d71e5be..432314f2f 100644
--- a/yuthon_will_task/models/yuthon_will_task.py
+++ b/yuthon_will_task/models/yuthon_will_task.py
@@ -179,8 +179,10 @@ class YuthonWillTask(models.Model):
_logger.info(f'定时任务已执行:当前提醒时间:{now}')
dates_task_ids = self.env['yuthon.dates.task'].search([('task_state', '=', 'to_do'), ('reminder_time', '<', fields.datetime.now() + timedelta(days=1))])
for task in dates_task_ids:
- _logger.info(f'任务实际小时:{task.reminder_time.hour + timedelta(hours=8)}:{task.reminder_time.minute + timedelta(hours=8)}\n 当前提醒小时:{now.hour}:{now.minute}')
- if task.reminder_time.minute + timedelta(hours=8) == now.minute and task.reminder_time.hour + timedelta(hours=8) == now.hour:
+ hour1 = (task.reminder_time + timedelta(hours=8)).hour
+ minute1 = (task.reminder_time + timedelta(hours=8)).minute
+ _logger.info(f'任务实际小时:{hour1}:{minute1}\n 当前提醒小时:{now.hour}:{now.minute}')
+ if minute1 == now.minute and hour1 == now.hour:
will_id = task.yuthon_will_task_id
for employee_id in will_id.employee_ids:
url = f'https://oa.thtzjt.com/webh5#/journey?id={will_id.id}'
From 074ee130dafe2c900ce5248895fca450b5e38333 Mon Sep 17 00:00:00 2001
From: pengyuthon
Date: Thu, 18 Dec 2025 14:20:57 +0800
Subject: [PATCH 22/43] 1
---
yuthon_will_task/models/yuthon_will_task.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/yuthon_will_task/models/yuthon_will_task.py b/yuthon_will_task/models/yuthon_will_task.py
index 432314f2f..13a6dd314 100644
--- a/yuthon_will_task/models/yuthon_will_task.py
+++ b/yuthon_will_task/models/yuthon_will_task.py
@@ -183,6 +183,7 @@ class YuthonWillTask(models.Model):
minute1 = (task.reminder_time + timedelta(hours=8)).minute
_logger.info(f'任务实际小时:{hour1}:{minute1}\n 当前提醒小时:{now.hour}:{now.minute}')
if minute1 == now.minute and hour1 == now.hour:
+ task.write({'task_state': 'done'})
will_id = task.yuthon_will_task_id
for employee_id in will_id.employee_ids:
url = f'https://oa.thtzjt.com/webh5#/journey?id={will_id.id}'
@@ -195,7 +196,6 @@ class YuthonWillTask(models.Model):
url=url, btntxt="详细信息")
self.sudo().env["wecom.apps"].sync_send_message_textcard(category='task', user_id="18562027762", title="日程事项提醒", description=data,
url=url, btntxt="详细信息")
- return True
def button_add_comment(self):
self.add_comment()
From 7b23f31bc732f0c61ff324e8c335c0535e5c0356 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Thu, 18 Dec 2025 15:21:20 +0800
Subject: [PATCH 23/43] =?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
---
.../models/yuthon_official_incoming_normal.py | 4 ++--
.../views/yuthon_dates_task_views.xml | 20 ++++++++++++++++++-
2 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/yuthon_official/models/yuthon_official_incoming_normal.py b/yuthon_official/models/yuthon_official_incoming_normal.py
index 7a303b096..9850cd85e 100644
--- a/yuthon_official/models/yuthon_official_incoming_normal.py
+++ b/yuthon_official/models/yuthon_official_incoming_normal.py
@@ -23,8 +23,8 @@ class YuthonOfficialIncomingNormal(models.Model):
secret_level = fields.Selection([('normal', '一般'), ('urgent', '秘密'), ('secret', '机密'), ('so_secret', '绝密')], string="密级")
time_date = fields.Datetime(string="日期", default=fields.Datetime.now)
users_id = fields.Many2one('res.users', string="拟办人", default=lambda self: self.env.user.id)
- department_id = fields.Many2one(related='users_id.employee_id.department_id', string="拟办部门")
- company_id = fields.Many2one(related='users_id.employee_id.company_id', string="公司")
+ department_id = fields.Many2one(related='users_id.employee_ids.department_id', string="拟办部门")
+ company_id = fields.Many2one(related='users_id.employee_ids.company_id', string="公司")
department_data = fields.Html(string="拟办意见")
red_suit = fields.Char(string="套红")
official_statu = fields.Selection([('done', '办结'), ('approval', '审核')], string="公文环节")
diff --git a/yuthon_will_task/views/yuthon_dates_task_views.xml b/yuthon_will_task/views/yuthon_dates_task_views.xml
index 34e84375a..44ba22079 100644
--- a/yuthon_will_task/views/yuthon_dates_task_views.xml
+++ b/yuthon_will_task/views/yuthon_dates_task_views.xml
@@ -4,7 +4,10 @@
yuthon.dates.task.tree
yuthon.dates.task
-
+
@@ -12,9 +15,24 @@
+
+ yuthon.dates.task.search
+ yuthon.dates.task
+
+
+
+
+
+
+
+
+
日程任务
yuthon.dates.task
tree
+
+
+ {'search_default_task_state':1}
From 5f9bf884e91d03b945eb67fd85bdaed6bfc3fba6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Thu, 18 Dec 2025 15:29:01 +0800
Subject: [PATCH 24/43] =?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
---
yuthon_will_task/models/yuthon_will_task.py | 2 +-
yuthon_will_task/views/yuthon_dates_task_views.xml | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/yuthon_will_task/models/yuthon_will_task.py b/yuthon_will_task/models/yuthon_will_task.py
index 13a6dd314..edecf7f17 100644
--- a/yuthon_will_task/models/yuthon_will_task.py
+++ b/yuthon_will_task/models/yuthon_will_task.py
@@ -248,7 +248,7 @@ class YuthonWillTask(models.Model):
reminder_employees = self.employee_ids | self.employee_ids2
if not reminder_employees:
return
- old_tasks = self.env['yuthon.dates.task'].search([('yuthon_will_task_id', '=', self.id)])
+ old_tasks = self.env['yuthon.dates.task'].search([('yuthon_will_task_id', '=', self.id), ('task_state', '=', 'to_do')])
if old_tasks:
old_tasks.unlink()
start_hour = float(self.request_hour_from)
diff --git a/yuthon_will_task/views/yuthon_dates_task_views.xml b/yuthon_will_task/views/yuthon_dates_task_views.xml
index 44ba22079..fe55a105a 100644
--- a/yuthon_will_task/views/yuthon_dates_task_views.xml
+++ b/yuthon_will_task/views/yuthon_dates_task_views.xml
@@ -21,10 +21,10 @@
+
+
+
-
-
-
From 302a30e2c8389fb171021bf51fa28139d109d229 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Thu, 18 Dec 2025 15:47:25 +0800
Subject: [PATCH 25/43] =?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
---
yuthon_holiday/models/inherit_hr_leave.py | 14 +++++---------
yuthon_holiday/views/hr_leave_batch.xml | 2 +-
yuthon_will_task/views/yuthon_dates_task_views.xml | 2 +-
3 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/yuthon_holiday/models/inherit_hr_leave.py b/yuthon_holiday/models/inherit_hr_leave.py
index 1be16707a..b1d54cfda 100644
--- a/yuthon_holiday/models/inherit_hr_leave.py
+++ b/yuthon_holiday/models/inherit_hr_leave.py
@@ -229,6 +229,7 @@ class HrLeave(models.Model):
else:
hours = 0.0
holiday.number_of_hours = hours
+ holiday.leave_hours = hours
if holiday.holiday_status_id.type_of_work == "0":
if holiday.request_hour_from and holiday.request_hour_to:
start_hour = float(holiday.request_hour_from)
@@ -236,13 +237,17 @@ class HrLeave(models.Model):
if start_hour < 12 and end_hour > 12:
hour = end_hour - start_hour - 1
holiday.number_of_hours = hour
+ holiday.leave_hours = hour
elif start_hour == 9 and end_hour == 12:
holiday.number_of_hours = 4
+ holiday.leave_hours = 4
else:
hour = end_hour - start_hour
holiday.number_of_hours = hour
+ holiday.leave_hours = hour
else:
holiday.number_of_hours = 0
+ holiday.leave_hours = 0
# 按天请假
days = holiday.batch_id._compute_duration_day(holiday.holiday_status_id, holiday.request_date_from , holiday.request_date_to)
@@ -686,7 +691,6 @@ class HolidaysRequestBatch(models.Model):
total_days = 0
first_hour_leave = self.hour_leave_ids[0] if self.hour_leave_ids else None
holiday_status_names = []
- # 处理leave_ids:收集假期类型、日期和天数
for leave in self.leave_ids:
# 收集假期类型名称(去重)
if leave.holiday_status_id and leave.holiday_status_id.name:
@@ -700,10 +704,8 @@ class HolidaysRequestBatch(models.Model):
if leave.request_date_to:
all_dates.append(leave.request_date_to)
- # 累加天数
total_days += leave.number_of_days_display if hasattr(leave, 'number_of_days_display') else 0
- # 处理hour_leave_ids:收集日期
for line in self.hour_leave_ids:
if line.request_date_from:
all_dates.append(line.request_date_from)
@@ -721,17 +723,11 @@ class HolidaysRequestBatch(models.Model):
# 生成名称:员工名 + 假期类型 + 日期范围 + 天数/小时
if self.employee_id:
name_parts = [f"{self.employee_id.name}的"]
-
- # 拼接假期类型
if holiday_status_names:
name_parts.append(','.join(holiday_status_names))
-
- # 拼接日期范围
if self.start_date and self.end_date:
date_part = f"{self.start_date.strftime('%Y-%m-%d')}~{self.end_date.strftime('%Y-%m-%d')}"
name_parts.append(date_part)
-
- # 拼接整请假天数
if self.leave_ids:
name_parts.append(f"共计{int(total_days)}天")
diff --git a/yuthon_holiday/views/hr_leave_batch.xml b/yuthon_holiday/views/hr_leave_batch.xml
index 569761cc2..64ebe943e 100644
--- a/yuthon_holiday/views/hr_leave_batch.xml
+++ b/yuthon_holiday/views/hr_leave_batch.xml
@@ -70,6 +70,7 @@
'default_employee_id': employee_id,
}" string=" " style="width: 150%;">
+
@@ -116,7 +117,6 @@
-
diff --git a/yuthon_will_task/views/yuthon_dates_task_views.xml b/yuthon_will_task/views/yuthon_dates_task_views.xml
index fe55a105a..7a3c17076 100644
--- a/yuthon_will_task/views/yuthon_dates_task_views.xml
+++ b/yuthon_will_task/views/yuthon_dates_task_views.xml
@@ -6,7 +6,7 @@
From 138c1de8a45c8d55d91c68bb9a2eb36ae282636c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Thu, 18 Dec 2025 15:59:44 +0800
Subject: [PATCH 26/43] =?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
---
yuthon_holiday/models/inherit_hr_leave.py | 34 -------------------
yuthon_holiday/views/hr_leave_batch.xml | 1 -
.../views/yuthon_will_task_views.xml | 2 +-
3 files changed, 1 insertion(+), 36 deletions(-)
diff --git a/yuthon_holiday/models/inherit_hr_leave.py b/yuthon_holiday/models/inherit_hr_leave.py
index b1d54cfda..429e9b969 100644
--- a/yuthon_holiday/models/inherit_hr_leave.py
+++ b/yuthon_holiday/models/inherit_hr_leave.py
@@ -118,32 +118,6 @@ class HrLeave(models.Model):
hour_batch_id = fields.Many2one(string='批量', comodel_name='hr.leave.batch', ondelete='cascade')
leave_documents_ids = fields.Many2many(related='holiday_status_id.leave_documents_id', string="假期详情说明", readonly=True)
details = fields.Text(string="假期流程说明")
- request_hour_from_real = fields.Selection([
- ('0', '0:00'), ('0.5', '0:30'),
- ('1', '01:00'), ('1.5', '01:30'),
- ('2', '02:00'), ('2.5', '02:30'),
- ('3', '03:00'), ('3.5', '03:30'),
- ('4', '04:00'), ('4.5', '04:30'),
- ('5', '05:00'), ('5.5', '05:30'),
- ('6', '06:00'), ('6.5', '06:30'),
- ('7', '07:00'), ('7.5', '07:30'),
- ('8', '08:00'), ('8.5', '08:30'),
- ('9', '09:00'), ('9.5', '09:30'),
- ('10', '10:00'), ('10.5', '10:30'),
- ('11', '11:00'), ('11.5', '11:30'),
- ('12', '12:00'), ('12.5', '12:30'),
- ('13', '13:00'), ('13.5', '13:30'),
- ('14', '14:00'), ('14.5', '14:30'),
- ('15', '15:00'), ('15.5', '15:30'),
- ('16', '16:00'), ('16.5', '16:30'),
- ('17', '17:00'), ('17.5', '17:30'),
- ('18', '18:00'), ('18.5', '18:30'),
- ('19', '19:00'), ('19.5', '19:30'),
- ('20', '20:00'), ('20.5', '20:30'),
- ('21', '21:00'), ('21.5', '21:30'),
- ('22', '22:00'), ('22.5', '22:30'),
- ('23', '23:00'), ('23.5', '23:30')],
- string='实际开始时间', compute='_compute_request_hour_from_real')
# custom_document_ids = fields.Many2many(
# string='文件',
# comodel_name='ir.attachment',
@@ -209,14 +183,6 @@ class HrLeave(models.Model):
for leave in leave_ids:
leave.state = 'draft'
- @api.depends('request_hour_from')
- def _compute_request_hour_from_real(self):
- for record in self:
- if record.request_hour_from == '9':
- record.request_hour_from_real = '8'
- else:
- record.request_hour_from_real = record.request_hour_from
-
@api.depends('date_from', 'date_to', 'resource_calendar_id', 'holiday_status_id.request_unit')
def _compute_duration(self):
super()._compute_duration()
diff --git a/yuthon_holiday/views/hr_leave_batch.xml b/yuthon_holiday/views/hr_leave_batch.xml
index 64ebe943e..e9d0609e3 100644
--- a/yuthon_holiday/views/hr_leave_batch.xml
+++ b/yuthon_holiday/views/hr_leave_batch.xml
@@ -230,7 +230,6 @@
-
diff --git a/yuthon_will_task/views/yuthon_will_task_views.xml b/yuthon_will_task/views/yuthon_will_task_views.xml
index 102ef78d0..c8940b950 100644
--- a/yuthon_will_task/views/yuthon_will_task_views.xml
+++ b/yuthon_will_task/views/yuthon_will_task_views.xml
@@ -255,7 +255,7 @@
领导日程
yuthon.will.task
tree,calendar,form
- [('user_role_ids.name', 'in', ['董事长', '分管领导', '总经理', '部门副经理', '副总经理'])]
+ [('user_role_ids.name', 'in', ['董事长', '分管领导', '总经理', '部门副经理', '副总经理', '司机'])]
{'search_default_next_seven_days': 1}
From f9807cd879529c314bd5af0361cb183d6a8a18d4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Thu, 18 Dec 2025 16:17:40 +0800
Subject: [PATCH 27/43] =?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
---
yuthon_property_approval/models/property_lease_contract.py | 2 --
1 file changed, 2 deletions(-)
diff --git a/yuthon_property_approval/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py
index 5f2df437d..9717f24aa 100644
--- a/yuthon_property_approval/models/property_lease_contract.py
+++ b/yuthon_property_approval/models/property_lease_contract.py
@@ -1636,7 +1636,6 @@ class PropertyLeaseContract(models.Model):
electricity_list = []
water_list = []
title_address = []
- fee_list = []
for record in rec.lease_ids:
if record.address_id and record.address_id.title_address:
lease_name.append(record.address_id.name)
@@ -1963,7 +1962,6 @@ class PropertyLeaseContract(models.Model):
def _onchange_name(self):
if self.property_name:
self.address_for_delivery = self.property_name
- self.use_address = self.property_name
@api.onchange("admin_id")
def _onchange_admin_id(self):
From 91257fbd8e5a98e09b0d85385a1c418b6fe48660 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Thu, 18 Dec 2025 16:54:46 +0800
Subject: [PATCH 28/43] =?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
---
.../wizard/choose_property_wizard.py | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/yuthon_property_approval/wizard/choose_property_wizard.py b/yuthon_property_approval/wizard/choose_property_wizard.py
index 3cdb74ad1..bd24128f6 100644
--- a/yuthon_property_approval/wizard/choose_property_wizard.py
+++ b/yuthon_property_approval/wizard/choose_property_wizard.py
@@ -24,6 +24,7 @@ class ChoosePropertyWizard(models.Model):
lease_ids_to_add = []
title_deed = []
title_address = []
+ financial_address_list = []
for record in self.property_ids:
lease_name.append(record.name if record.name is not None else "")
title_addr_name = record.title_address.name if (record.title_address and record.title_address.name) else ""
@@ -50,12 +51,18 @@ class ChoosePropertyWizard(models.Model):
rec.admin_id = admin_id
rec.company_id = company_id
rec.precinct_id = precinct_id
+ fin_addr = record.financial_address if record.financial_address else ""
+ if fin_addr: # 仅添加非空地址
+ financial_address_list.append(fin_addr)
existing_names = []
for lease in self.lease_contract_id.lease_ids:
if lease.address_id:
name_val = lease.address_id.name
existing_names.append(name_val if name_val is not None else "无")
+ fin_addr_exist = lease.address_id.financial_address if lease.address_id.financial_address else ""
+ if fin_addr_exist:
+ financial_address_list.append(fin_addr_exist)
title_name = []
for lease in self.lease_contract_id.lease_ids:
@@ -63,9 +70,9 @@ class ChoosePropertyWizard(models.Model):
addr_name = lease.address_id.title_address.name if (lease.address_id.title_address and lease.address_id.title_address.name) else ""
title_name.append(str(addr_name))
- # 过滤空字符串,避免拼接时出现空内容
all_names = [name for name in list(set(existing_names + lease_name)) if name]
title_address_combined = [addr for addr in list(set(title_address + title_name)) if addr]
+ use_address_combined = [addr for addr in list(set(financial_address_list)) if addr]
existing_lease_ids = [(4, lease.id) for lease in self.lease_contract_id.lease_ids]
@@ -77,7 +84,7 @@ class ChoosePropertyWizard(models.Model):
'title_address': ','.join(title_address_combined),
'lessor_id': self.lease_contract_id.lease_ids[0].address_id.company_id.id
if self.lease_contract_id.lease_ids else False,
- 'use_address': ','.join(all_names),
+ 'use_address': ','.join(use_address_combined),
'address_for_delivery': ','.join(all_names),
'total_area': sum([lease.property_area for lease in rec.lease_ids])
})
From 6807ea63783ba8ed8b0d1236020164fd62fa364a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Thu, 18 Dec 2025 17:03:28 +0800
Subject: [PATCH 29/43] =?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
---
yuthon_hr_employee/views/yuthon_hr_employee_views.xml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/yuthon_hr_employee/views/yuthon_hr_employee_views.xml b/yuthon_hr_employee/views/yuthon_hr_employee_views.xml
index c7584139e..bac66ee1e 100644
--- a/yuthon_hr_employee/views/yuthon_hr_employee_views.xml
+++ b/yuthon_hr_employee/views/yuthon_hr_employee_views.xml
@@ -574,7 +574,7 @@
-
+
@@ -659,7 +659,6 @@
会员列表
hr.employee
[('is_membership', '=', True), ('is_company', '=', True)]
- {'header_search_default_user_state': 1}
tree,kanban,form,search
- 时间
- 至
+
+ →
@@ -174,9 +174,9 @@
时间
+ style="max-width: 10rem !important;"/>
至
+ style="max-width: 5rem !important;"/>→
From a58367177545ff5d857639c679c678df5a15c941 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Thu, 18 Dec 2025 17:58:08 +0800
Subject: [PATCH 31/43] =?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
---
soong_workflow/wizard/soong_workflow_comment_wizard.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/soong_workflow/wizard/soong_workflow_comment_wizard.py b/soong_workflow/wizard/soong_workflow_comment_wizard.py
index 987fd467a..a81a1bab8 100644
--- a/soong_workflow/wizard/soong_workflow_comment_wizard.py
+++ b/soong_workflow/wizard/soong_workflow_comment_wizard.py
@@ -145,8 +145,8 @@ class SoongWorkflowCommentWizard(models.TransientModel):
for idx, link in enumerate(sorted_all_links):
if link.id == current_link.id and link.sequence == current_link.sequence:
approvers = self._get_approvers_for_link(link, record_id)
- if not approvers:
- invalid_links |= link
+ # if not approvers:
+ # invalid_links |= link
if record_id.log_ids2:
log_records = record_id.log_ids2
From 98a20f84ff0eaa391749b1ddeeb40da336b32797 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Thu, 18 Dec 2025 18:06:31 +0800
Subject: [PATCH 32/43] =?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
---
soong_workflow/views/soong_workflow_record.xml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/soong_workflow/views/soong_workflow_record.xml b/soong_workflow/views/soong_workflow_record.xml
index c03a8c85c..ba7dc3a8b 100644
--- a/soong_workflow/views/soong_workflow_record.xml
+++ b/soong_workflow/views/soong_workflow_record.xml
@@ -18,7 +18,7 @@
-
+
@@ -51,7 +51,9 @@
-
+
+
+
From 95554ddf7e99f30734403e074789b59be2c0a391 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Fri, 19 Dec 2025 09:32:04 +0800
Subject: [PATCH 33/43] =?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
---
yuthon_will_task/models/yuthon_will_task.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/yuthon_will_task/models/yuthon_will_task.py b/yuthon_will_task/models/yuthon_will_task.py
index edecf7f17..ee4c93af6 100644
--- a/yuthon_will_task/models/yuthon_will_task.py
+++ b/yuthon_will_task/models/yuthon_will_task.py
@@ -176,12 +176,10 @@ class YuthonWillTask(models.Model):
def add_comment(self):
"日程定时任务提醒"
now = fields.datetime.now() + timedelta(hours=8)
- _logger.info(f'定时任务已执行:当前提醒时间:{now}')
dates_task_ids = self.env['yuthon.dates.task'].search([('task_state', '=', 'to_do'), ('reminder_time', '<', fields.datetime.now() + timedelta(days=1))])
for task in dates_task_ids:
hour1 = (task.reminder_time + timedelta(hours=8)).hour
minute1 = (task.reminder_time + timedelta(hours=8)).minute
- _logger.info(f'任务实际小时:{hour1}:{minute1}\n 当前提醒小时:{now.hour}:{now.minute}')
if minute1 == now.minute and hour1 == now.hour:
task.write({'task_state': 'done'})
will_id = task.yuthon_will_task_id
@@ -269,6 +267,9 @@ class YuthonWillTask(models.Model):
elif unit == '天':
reminder_hours = num * 24.0
reminder_datetime = task_start_datetime - timedelta(hours=reminder_hours)
+ now = fields.datetime.now() + timedelta(hours=8)
+ if now > reminder_datetime:
+ continue
existing_dates_task = self.env['yuthon.dates.task'].search([
('yuthon_will_task_id', '=', self.id),
('reminder_time', '=', reminder_datetime)
From bca58db8a1e7d16ff8110972bde2a0497e420e62 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Fri, 19 Dec 2025 10:07:11 +0800
Subject: [PATCH 34/43] =?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
---
yuthon_property_approval/__manifest__.py | 1 +
.../models/inherit_yuthon_property.py | 11 +++-
.../security/ir.model.access.csv | 3 +-
yuthon_property_approval/wizard/__init__.py | 3 +-
.../wizard/action_refuse_wizard.py | 51 +++++++++++++++++++
.../wizard/action_refuse_wizard_views.xml | 22 ++++++++
6 files changed, 88 insertions(+), 3 deletions(-)
create mode 100644 yuthon_property_approval/wizard/action_refuse_wizard.py
create mode 100644 yuthon_property_approval/wizard/action_refuse_wizard_views.xml
diff --git a/yuthon_property_approval/__manifest__.py b/yuthon_property_approval/__manifest__.py
index 332fdab41..520e6db7e 100644
--- a/yuthon_property_approval/__manifest__.py
+++ b/yuthon_property_approval/__manifest__.py
@@ -94,6 +94,7 @@
'wizard/contract_signature_wizard_viwes.xml',
'wizard/penalty_line_wizard_viwes.xml',
'wizard/build_pop_wizard_viwes.xml',
+ 'wizard/action_refuse_wizard_views.xml',
'wizard/property_bills_wizard_views.xml',
'wizard/property_meeting_wizard_views.xml',
'views/property_menu_all.xml',
diff --git a/yuthon_property_approval/models/inherit_yuthon_property.py b/yuthon_property_approval/models/inherit_yuthon_property.py
index 36cfbbd7e..3e4244fde 100644
--- a/yuthon_property_approval/models/inherit_yuthon_property.py
+++ b/yuthon_property_approval/models/inherit_yuthon_property.py
@@ -873,7 +873,16 @@ class PropertyAccountsReceivable(models.Model):
valid_management_types = list(model_type_data.values())
for rec in archives_ids:
if rec.is_reconciliation == True:
- raise UserError("已对账的记录不能退回!请先银行流水撤销再退回")
+ return {
+ "name": "批量退回提醒弹窗",
+ 'type': 'ir.actions.act_window',
+ 'res_model': 'action.refuse.wizard',
+ "view_mode": "form",
+ 'target': 'new',
+ 'context': {
+ 'default_receivable_ids': archives_ids.ids,
+ }
+ }
model_type = model_type_data.get(rec.management_type_id.name)
if model_type not in valid_management_types:
rec.unlink()
diff --git a/yuthon_property_approval/security/ir.model.access.csv b/yuthon_property_approval/security/ir.model.access.csv
index 654d19221..95063af1f 100644
--- a/yuthon_property_approval/security/ir.model.access.csv
+++ b/yuthon_property_approval/security/ir.model.access.csv
@@ -121,4 +121,5 @@ access_property_bills_line,property_bills_line,model_property_bills_line,base.gr
access_property_payment_notice,property_payment_notice,model_property_payment_notice,base.group_user,1,1,1,1
access_print_payment_wizard,print_payment_wizard,model_print_payment_wizard,base.group_user,1,1,1,1
access_property_bills_list,property_bills_list,model_property_bills_list,base.group_user,1,1,1,1
-access_property_bills_wizard,property_bills_wizard,model_property_bills_wizard,base.group_user,1,1,1,1
\ No newline at end of file
+access_property_bills_wizard,property_bills_wizard,model_property_bills_wizard,base.group_user,1,1,1,1
+access_action_refuse_wizard,action_refuse_wizard,model_action_refuse_wizard,base.group_user,1,1,1,1
\ No newline at end of file
diff --git a/yuthon_property_approval/wizard/__init__.py b/yuthon_property_approval/wizard/__init__.py
index c7b3bb482..c2e72931d 100644
--- a/yuthon_property_approval/wizard/__init__.py
+++ b/yuthon_property_approval/wizard/__init__.py
@@ -13,4 +13,5 @@ from . import contract_signature_wizard
from . import build_pop_wizard
from . import penalty_line_wizard
from . import print_payment_wizard
-from . import property_bills_wizard
\ No newline at end of file
+from . import property_bills_wizard
+from . import action_refuse_wizard
\ No newline at end of file
diff --git a/yuthon_property_approval/wizard/action_refuse_wizard.py b/yuthon_property_approval/wizard/action_refuse_wizard.py
new file mode 100644
index 000000000..6eec72c1e
--- /dev/null
+++ b/yuthon_property_approval/wizard/action_refuse_wizard.py
@@ -0,0 +1,51 @@
+from odoo import models, fields, api, _, SUPERUSER_ID
+from odoo.exceptions import UserError, ValidationError
+from datetime import datetime, timedelta, date
+from dateutil.relativedelta import relativedelta
+
+
+class ActionRefuseWizard(models.TransientModel):
+ _name = 'action.refuse.wizard'
+ _description = '批量退回提醒弹窗'
+
+ receivable_ids = fields.Many2many('property.accounts.receivable', string='关联应收账单')
+
+ def confirm(self):
+ model_type_data = {
+ '水费': 'meter.water.line',
+ '电费': 'meter.archives.line',
+ '押金': 'property.deposit.list',
+ '租金': 'property.rent.list',
+ '管理费': 'property.management.list',
+ }
+ for rec in self.receivable_ids:
+ if rec.is_reconciliation == True:
+ continue
+ model_type = model_type_data.get(rec.management_type_id.name)
+ valid_management_types = list(model_type_data.values())
+ if model_type not in valid_management_types:
+ rec.unlink()
+ continue
+ if model_type in ('meter.archives.line', 'meter.water.line'):
+ if not rec.charging_range:
+ raise UserError("请输入计费区间, 按照应为'YYYY-MM-DD 到 YYYY-MM-DD格式")
+ charging_range = rec.charging_range.strip()
+ start_str, end_str = [x.strip() for x in charging_range.split("到")]
+ start_date = (datetime.strptime(end_str, "%Y-%m-%d").date()).replace(day=1)
+ end_date = datetime.strptime(end_str, "%Y-%m-%d").date()
+ model_id = self.env[model_type].search([
+ ('contract_id', '=', rec.contract_id.id),
+ ('meter_date', '>=', start_date),
+ ('meter_date', '<=', end_date)
+ ])
+ else:
+ last_day = rec.due_date + relativedelta(months=1) - timedelta(days=1)
+ model_id = self.env[model_type].search([
+ ('contract_id', '=', rec.contract_id.id),
+ ('due_date', '>=', rec.due_date),
+ ('due_date', '<=', last_day)
+ ])
+
+ if model_id:
+ model_id.write({'is_push': False})
+ rec.unlink()
\ No newline at end of file
diff --git a/yuthon_property_approval/wizard/action_refuse_wizard_views.xml b/yuthon_property_approval/wizard/action_refuse_wizard_views.xml
new file mode 100644
index 000000000..20aceb636
--- /dev/null
+++ b/yuthon_property_approval/wizard/action_refuse_wizard_views.xml
@@ -0,0 +1,22 @@
+
+
+
+ action.refuse.wizard.form
+ action.refuse.wizard
+
+
+
+
+
\ No newline at end of file
From ac001d444e450413fb1b062818ae7e9bedae9465 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Fri, 19 Dec 2025 10:54:46 +0800
Subject: [PATCH 35/43] =?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/yuthon_hr_employee_views.xml | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/yuthon_hr_employee/views/yuthon_hr_employee_views.xml b/yuthon_hr_employee/views/yuthon_hr_employee_views.xml
index bac66ee1e..035bb0bdd 100644
--- a/yuthon_hr_employee/views/yuthon_hr_employee_views.xml
+++ b/yuthon_hr_employee/views/yuthon_hr_employee_views.xml
@@ -564,6 +564,16 @@
+
+ hr.employee.search
+ hr.employee
+
+
+
+
+
+
+
hr.employee.member
@@ -591,7 +601,6 @@
-
@@ -663,6 +672,7 @@
+
tree,kanban,form,activity,graph,pivot,hierarchy
From 3ac058276c9d92ef3cd93b3f65b96b4b3c9855e7 Mon Sep 17 00:00:00 2001
From: pengyuthon
Date: Fri, 19 Dec 2025 14:32:03 +0800
Subject: [PATCH 36/43] 1
---
.../ks_dashboard_list.xml | 22 ++++++++++++-------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/ks_dashboard_ninja/static/src/components/ks_dashboard_list_view/ks_dashboard_list.xml b/ks_dashboard_ninja/static/src/components/ks_dashboard_list_view/ks_dashboard_list.xml
index 059d651e3..5f3479017 100644
--- a/ks_dashboard_ninja/static/src/components/ks_dashboard_list_view/ks_dashboard_list.xml
+++ b/ks_dashboard_ninja/static/src/components/ks_dashboard_list_view/ks_dashboard_list.xml
@@ -209,14 +209,20 @@
-
+
|
From 7cff04e0de33e09946c2b9ed143082d70f47fe07 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Fri, 19 Dec 2025 15:24:31 +0800
Subject: [PATCH 37/43] =?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
---
.../{ => header_search_panel}/README.md | 19 +-
.../{ => header_search_panel}/__init__.py | 0
.../{ => header_search_panel}/__manifest__.py | 0
.../override_relaxng.py | 0
.../rng/search_view.rng | 0
.../static/src/legacy/backend_utils.js | 33 +++
.../src/search/control_panel/control_panel.js | 0
.../search/control_panel/control_panel.scss | 0
.../search/control_panel/control_panel.xml | 0
.../boolean_filter/boolean_filter.js | 0
.../boolean_filter/boolean_filter.xml | 0
.../fields_filter/char_filter/char_filter.js | 54 +++++
.../fields_filter/char_filter/char_filter.xml | 15 ++
.../fields_filter/date_filter/date_filter.js | 37 ++-
.../fields_filter/date_filter/date_filter.xml | 37 +++
.../components/fields_filter/fields_filter.js | 15 ++
.../fields_filter/fields_filter.xml | 0
.../many2one_filter/many2one_filter.js | 1 +
.../many2one_filter/many2one_filter.xml | 0
.../selection_filter/selection_filter.js | 0
.../selection_filter/selection_filter.xml | 0
.../standard_field_filter_props.js | 2 +
.../x2many_filter/x2many_filter.js | 0
.../x2many_filter/x2many_filter.xml | 0
.../components/quick_filter/quick_filter.js | 0
.../components/quick_filter/quick_filter.xml | 4 +-
.../quick_filter/quick_filter_label.scss | 0
.../select_date_filter/select_date_filter.js | 0
.../select_date_filter/select_date_filter.xml | 0
.../header_search/header_search_filter.js | 0
.../header_search/header_search_filter.scss | 14 +-
.../header_search/header_search_filter.xml | 0
.../static/src/search/search_arch_parser.js | 14 +-
.../static/src/search/search_model.js | 0
header_search_panel/model_test/__init__.py | 4 +
.../model_test/__manifest__.py | 21 ++
.../model_test/controllers/__init__.py | 3 +
.../model_test/controllers/controllers.py | 21 ++
.../model_test/models/__init__.py | 3 +
.../model_test/models/models.py | 211 ++++++++++++++++++
.../model_test/security/ir.model.access.csv | 3 +
.../model_test/static/src/model_test_list.xml | 17 ++
.../static/src/model_test_list_controller.js | 10 +
.../model_test/views/views.xml | 126 +++++++++++
.../fields_filter/date_filter/date_filter.xml | 30 ---
45 files changed, 636 insertions(+), 58 deletions(-)
rename header_search_panel/{ => header_search_panel}/README.md (79%)
rename header_search_panel/{ => header_search_panel}/__init__.py (100%)
rename header_search_panel/{ => header_search_panel}/__manifest__.py (100%)
rename header_search_panel/{ => header_search_panel}/override_relaxng.py (100%)
rename header_search_panel/{ => header_search_panel}/rng/search_view.rng (100%)
create mode 100644 header_search_panel/header_search_panel/static/src/legacy/backend_utils.js
rename header_search_panel/{ => header_search_panel}/static/src/search/control_panel/control_panel.js (100%)
rename header_search_panel/{ => header_search_panel}/static/src/search/control_panel/control_panel.scss (100%)
rename header_search_panel/{ => header_search_panel}/static/src/search/control_panel/control_panel.xml (100%)
rename header_search_panel/{ => header_search_panel}/static/src/search/header_search/components/fields_filter/boolean_filter/boolean_filter.js (100%)
rename header_search_panel/{ => header_search_panel}/static/src/search/header_search/components/fields_filter/boolean_filter/boolean_filter.xml (100%)
create mode 100644 header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/char_filter/char_filter.js
create mode 100644 header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/char_filter/char_filter.xml
rename header_search_panel/{ => header_search_panel}/static/src/search/header_search/components/fields_filter/date_filter/date_filter.js (65%)
create mode 100644 header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/date_filter/date_filter.xml
rename header_search_panel/{ => header_search_panel}/static/src/search/header_search/components/fields_filter/fields_filter.js (93%)
rename header_search_panel/{ => header_search_panel}/static/src/search/header_search/components/fields_filter/fields_filter.xml (100%)
rename header_search_panel/{ => header_search_panel}/static/src/search/header_search/components/fields_filter/many2one_filter/many2one_filter.js (98%)
rename header_search_panel/{ => header_search_panel}/static/src/search/header_search/components/fields_filter/many2one_filter/many2one_filter.xml (100%)
rename header_search_panel/{ => header_search_panel}/static/src/search/header_search/components/fields_filter/selection_filter/selection_filter.js (100%)
rename header_search_panel/{ => header_search_panel}/static/src/search/header_search/components/fields_filter/selection_filter/selection_filter.xml (100%)
rename header_search_panel/{ => header_search_panel}/static/src/search/header_search/components/fields_filter/standard_field_filter_props.js (88%)
rename header_search_panel/{ => header_search_panel}/static/src/search/header_search/components/fields_filter/x2many_filter/x2many_filter.js (100%)
rename header_search_panel/{ => header_search_panel}/static/src/search/header_search/components/fields_filter/x2many_filter/x2many_filter.xml (100%)
rename header_search_panel/{ => header_search_panel}/static/src/search/header_search/components/quick_filter/quick_filter.js (100%)
rename header_search_panel/{ => header_search_panel}/static/src/search/header_search/components/quick_filter/quick_filter.xml (92%)
rename header_search_panel/{ => header_search_panel}/static/src/search/header_search/components/quick_filter/quick_filter_label.scss (100%)
rename header_search_panel/{ => header_search_panel}/static/src/search/header_search/components/select_date_filter/select_date_filter.js (100%)
rename header_search_panel/{ => header_search_panel}/static/src/search/header_search/components/select_date_filter/select_date_filter.xml (100%)
rename header_search_panel/{ => header_search_panel}/static/src/search/header_search/header_search_filter.js (100%)
rename header_search_panel/{ => header_search_panel}/static/src/search/header_search/header_search_filter.scss (96%)
rename header_search_panel/{ => header_search_panel}/static/src/search/header_search/header_search_filter.xml (100%)
rename header_search_panel/{ => header_search_panel}/static/src/search/search_arch_parser.js (96%)
rename header_search_panel/{ => header_search_panel}/static/src/search/search_model.js (100%)
create mode 100644 header_search_panel/model_test/__init__.py
create mode 100644 header_search_panel/model_test/__manifest__.py
create mode 100644 header_search_panel/model_test/controllers/__init__.py
create mode 100644 header_search_panel/model_test/controllers/controllers.py
create mode 100644 header_search_panel/model_test/models/__init__.py
create mode 100644 header_search_panel/model_test/models/models.py
create mode 100644 header_search_panel/model_test/security/ir.model.access.csv
create mode 100644 header_search_panel/model_test/static/src/model_test_list.xml
create mode 100644 header_search_panel/model_test/static/src/model_test_list_controller.js
create mode 100644 header_search_panel/model_test/views/views.xml
delete mode 100644 header_search_panel/static/src/search/header_search/components/fields_filter/date_filter/date_filter.xml
diff --git a/header_search_panel/README.md b/header_search_panel/header_search_panel/README.md
similarity index 79%
rename from header_search_panel/README.md
rename to header_search_panel/header_search_panel/README.md
index 5339e4749..9e9d7b0bf 100644
--- a/header_search_panel/README.md
+++ b/header_search_panel/header_search_panel/README.md
@@ -6,7 +6,7 @@
- 快捷筛选(quick_filter)
- 自选时间筛选(select_date_filter)(待移植)
-- 字段搜索(field)(待移植)
+- 字段搜索(field)(已移植)
通过这些筛选标签,用户可以更灵活地对列表视图中的数据进行筛选。
@@ -20,9 +20,9 @@
#### 支持的属性:
-| 属性名 | 类型 | 说明 | 是否可选 |
-| ------- | ------ | ---------- | ---- |
-| `class` | String | 自定义 CSS 类名 | ✅ |
+| 属性名 | 类型 | 说明 | 是否可选 |
+| ------- | ------ |-------------------------------------------------------------------| ---- |
+| `class` | String | 自定义 CSS 类名,
可使用class="header-search-inline"使所有筛选在同一行并根据宽度自动换行 | ✅ |
#### 子标签支持:
@@ -56,7 +56,7 @@
| ----------- | ------- | ----------- | ------------ |
| `class` | String | 自定义 CSS 类名 | ✅ |
| `string` | String | 显示的标头名称 | ✅ |
-| `invisible` | Boolean | 是否默认隐藏 | ✅ |
+| `invisible` | Boolean | 是否默认隐藏(废弃) | ✅ |
| `options` | JSON | 扩展参数,支持以下参数: | ✅ |
| | | `radio`: 是否单选 | |
| | | `no_label`: 不显示标题 | |
@@ -77,16 +77,16 @@
---
-### 3. 自选时间筛选 (select_date_filter)
+### 3. 自选时间筛选 (select_date_filter)(废弃)
**标签名:** `select_date_filter`
#### 支持的属性:
| 属性名 | 类型 | 说明 | 是否可选 |
-| ------------------- | ------- | -------------- | ---- |
+| ------------------- | ------- |----------------| ---- |
| `class` | String | 自定义 CSS 类名 | ✅ |
-| `invisible` | Boolean | 是否默认隐藏 | ✅ |
+| `invisible` | Boolean | 是否默认隐藏(废弃) | ✅ |
| `allow_date_fields` | String | 允许筛选的时间字段,逗号分隔 | ✅ |
#### 示例:
@@ -109,6 +109,9 @@
| `string` | String | 显示的标头名称 | ✅ |
| `class` | String | 自定义 CSS | ✅ |
| `invisible` | Boolean | 是否默认隐藏 | ✅ |
+| `options` | JSON | 扩展参数,支持以下参数: | ✅ |
+| | | `radio`: 是否单选 | |
+| | | `no_label`: 不显示标题 | |
#### 示例:
diff --git a/header_search_panel/__init__.py b/header_search_panel/header_search_panel/__init__.py
similarity index 100%
rename from header_search_panel/__init__.py
rename to header_search_panel/header_search_panel/__init__.py
diff --git a/header_search_panel/__manifest__.py b/header_search_panel/header_search_panel/__manifest__.py
similarity index 100%
rename from header_search_panel/__manifest__.py
rename to header_search_panel/header_search_panel/__manifest__.py
diff --git a/header_search_panel/override_relaxng.py b/header_search_panel/header_search_panel/override_relaxng.py
similarity index 100%
rename from header_search_panel/override_relaxng.py
rename to header_search_panel/header_search_panel/override_relaxng.py
diff --git a/header_search_panel/rng/search_view.rng b/header_search_panel/header_search_panel/rng/search_view.rng
similarity index 100%
rename from header_search_panel/rng/search_view.rng
rename to header_search_panel/header_search_panel/rng/search_view.rng
diff --git a/header_search_panel/header_search_panel/static/src/legacy/backend_utils.js b/header_search_panel/header_search_panel/static/src/legacy/backend_utils.js
new file mode 100644
index 000000000..6f77264e2
--- /dev/null
+++ b/header_search_panel/header_search_panel/static/src/legacy/backend_utils.js
@@ -0,0 +1,33 @@
+/** @odoo-module **/
+//
+// import {patch} from "@web/core/utils/patch";
+// import * as backend_utils from "@web/legacy/backend_utils";
+//
+// const originalSearchModelStateToLegacy = backend_utils.searchModelStateToLegacy;
+// const originalGetGlobalState = backend_utils.getGlobalState;
+//
+// patch(backend_utils, "header_search_panel.backend_utils", {
+// searchModelStateToLegacy(state) {
+// // 原始state
+// const originalState = JSON.parse(state);
+// // 获取原始state
+// let legacyState = JSON.parse(originalSearchModelStateToLegacy(state));
+// if (originalState.headerSearchInfo) {
+// legacyState.HeaderSearchInfo = originalState.headerSearchInfo;
+// }
+// return JSON.stringify(legacyState)
+// },
+//
+// getGlobalState(legacyControllerState) {
+// // 原始search model
+// const originalSearchModel = JSON.parse(legacyControllerState.searchModel)
+// let globalState = originalGetGlobalState(legacyControllerState);
+// let searchModel = JSON.parse(globalState?.searchModel || "{}");
+// if (originalSearchModel.HeaderSearchInfo) {
+// searchModel.headerSearchInfo = originalSearchModel.HeaderSearchInfo;
+// globalState.searchModel = JSON.stringify(searchModel)
+// }
+// console.log('headerSearchInfo: getGlobalState')
+// return globalState
+// },
+// })
\ No newline at end of file
diff --git a/header_search_panel/static/src/search/control_panel/control_panel.js b/header_search_panel/header_search_panel/static/src/search/control_panel/control_panel.js
similarity index 100%
rename from header_search_panel/static/src/search/control_panel/control_panel.js
rename to header_search_panel/header_search_panel/static/src/search/control_panel/control_panel.js
diff --git a/header_search_panel/static/src/search/control_panel/control_panel.scss b/header_search_panel/header_search_panel/static/src/search/control_panel/control_panel.scss
similarity index 100%
rename from header_search_panel/static/src/search/control_panel/control_panel.scss
rename to header_search_panel/header_search_panel/static/src/search/control_panel/control_panel.scss
diff --git a/header_search_panel/static/src/search/control_panel/control_panel.xml b/header_search_panel/header_search_panel/static/src/search/control_panel/control_panel.xml
similarity index 100%
rename from header_search_panel/static/src/search/control_panel/control_panel.xml
rename to header_search_panel/header_search_panel/static/src/search/control_panel/control_panel.xml
diff --git a/header_search_panel/static/src/search/header_search/components/fields_filter/boolean_filter/boolean_filter.js b/header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/boolean_filter/boolean_filter.js
similarity index 100%
rename from header_search_panel/static/src/search/header_search/components/fields_filter/boolean_filter/boolean_filter.js
rename to header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/boolean_filter/boolean_filter.js
diff --git a/header_search_panel/static/src/search/header_search/components/fields_filter/boolean_filter/boolean_filter.xml b/header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/boolean_filter/boolean_filter.xml
similarity index 100%
rename from header_search_panel/static/src/search/header_search/components/fields_filter/boolean_filter/boolean_filter.xml
rename to header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/boolean_filter/boolean_filter.xml
diff --git a/header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/char_filter/char_filter.js b/header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/char_filter/char_filter.js
new file mode 100644
index 000000000..80cceca3a
--- /dev/null
+++ b/header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/char_filter/char_filter.js
@@ -0,0 +1,54 @@
+/** @odoo-module **/
+
+import { Component } from "@odoo/owl";
+import { Domain } from "@web/core/domain";
+import { useService } from "@web/core/utils/hooks";
+import { Many2XAutocomplete } from "@web/views/fields/relational_utils";
+import { standardFieldFilterProps } from "../standard_field_filter_props.js"
+
+
+export class CharFilter extends Component {
+ setup() {
+ super.setup();
+ this.rpc = useService("rpc");
+ this.activeValues = this.env.searchModel.headerSearchInfo.FieldsFilter[this.props.id]?.activeValues || undefined;
+ }
+
+ /**
+ * 设置筛选字段的值
+ */
+ setActiveValues(ev) {
+ this.activeValues = ev.target.value;
+ }
+
+ /**
+ * 获取筛选字段的domain
+ */
+ get domain() {
+ return this.activeValues ? [[this.props.name, "ilike", this.activeValues]]: [];
+ }
+
+ /**
+ * 点击清空筛选时触发
+ */
+ resetFilter() {
+ // 清空筛选字段的值
+ this.activeValues = undefined;
+ this.props.fieldOnchange({fieldDomainList: this.domain, activeValues: this.activeValues});
+ }
+
+ getDomain() {
+ return new Domain(this.props.domain).toList({});
+ }
+
+ async onInputChange(ev) {
+ this.setActiveValues(ev);
+ this.props.fieldOnchange({fieldDomainList: this.domain, activeValues: this.activeValues});
+ }
+}
+
+CharFilter.template = "header_search_panel.CharFilter";
+CharFilter.components = {};
+CharFilter.props = {
+ ...standardFieldFilterProps,
+};
diff --git a/header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/char_filter/char_filter.xml b/header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/char_filter/char_filter.xml
new file mode 100644
index 000000000..66f439179
--- /dev/null
+++ b/header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/char_filter/char_filter.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/header_search_panel/static/src/search/header_search/components/fields_filter/date_filter/date_filter.js b/header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/date_filter/date_filter.js
similarity index 65%
rename from header_search_panel/static/src/search/header_search/components/fields_filter/date_filter/date_filter.js
rename to header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/date_filter/date_filter.js
index e72c40f44..d27ef8ff0 100644
--- a/header_search_panel/static/src/search/header_search/components/fields_filter/date_filter/date_filter.js
+++ b/header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/date_filter/date_filter.js
@@ -1,8 +1,9 @@
/** @odoo-module **/
-import {Component} from "@odoo/owl";
-import {Domain} from "@web/core/domain";
-import {standardFieldFilterProps} from "../standard_field_filter_props.js"
+import { Component } from "@odoo/owl";
+import { DateTimeInput } from "@web/core/datetime/datetime_input";
+import { deserializeDate } from "@web/core/l10n/dates";
+import { standardFieldFilterProps } from "../standard_field_filter_props.js"
export class DateFilter extends Component {
setup() {
@@ -13,13 +14,21 @@ export class DateFilter extends Component {
this.endDate = this.env.searchModel.headerSearchInfo.FieldsFilter[this.props.id]?.endDate;
}
+ get dateFrom() {
+ return this.startDate ? deserializeDate(this.startDate): undefined;
+ }
+
+ get dateTo() {
+ return this.endDate ? deserializeDate(this.endDate): undefined;
+ }
+
// 设置筛选字段的值
- setActiveValues(ev) {
- const value = ev.target.value;
- if (ev.target.id === this.props.id + "_start_date") {
+ setActiveValues(dateValue, type) {
+ const value = dateValue ? (this.props.type === "datetime" ? dateValue.toFormat("yyyy-MM-dd HH:mm:ss") : dateValue.toFormat("yyyy-MM-dd")) : undefined;
+ if (type === "startDate") {
this.startDate = value
}
- if (ev.target.id === this.props.id + "_end_date") {
+ if (type === "endDate") {
this.endDate = value
}
}
@@ -41,9 +50,14 @@ export class DateFilter extends Component {
return domain
}
- // 点击日期选择器时触发
- dateOnchange(ev) {
- this.setActiveValues(ev);
+ startDateOnchange (startDate) {
+ this.setActiveValues(startDate, "startDate");
+ this.props.fieldOnchange({fieldDomainList: this.domain, startDate: this.startDate, endDate: this.endDate});
+
+ }
+
+ endDateOnchange (endDate) {
+ this.setActiveValues(endDate, "endDate");
this.props.fieldOnchange({fieldDomainList: this.domain, startDate: this.startDate, endDate: this.endDate});
}
@@ -67,6 +81,9 @@ export class DateFilter extends Component {
}
DateFilter.template = "header_search_panel.DateFilter";
+DateFilter.components = {
+ DateTimeInput,
+};
DateFilter.props = {
...standardFieldFilterProps,
};
diff --git a/header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/date_filter/date_filter.xml b/header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/date_filter/date_filter.xml
new file mode 100644
index 000000000..bf86c13a4
--- /dev/null
+++ b/header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/date_filter/date_filter.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/header_search_panel/static/src/search/header_search/components/fields_filter/fields_filter.js b/header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/fields_filter.js
similarity index 93%
rename from header_search_panel/static/src/search/header_search/components/fields_filter/fields_filter.js
rename to header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/fields_filter.js
index c70c0878c..0295ec005 100644
--- a/header_search_panel/static/src/search/header_search/components/fields_filter/fields_filter.js
+++ b/header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/fields_filter.js
@@ -8,6 +8,7 @@ import { BooleanFilter } from "./boolean_filter/boolean_filter";
import { DateFilter } from "./date_filter/date_filter";
import { Many2oneFilter } from "./many2one_filter/many2one_filter";
import { X2ManyFilterFilter } from "./x2many_filter/x2many_filter";
+import { CharFilter } from "./char_filter/char_filter";
const fieldRegistry = registry.category("fields");
@@ -41,6 +42,9 @@ export class FieldsFilter extends Component {
case "one2many":
this.addX2ManyFieldDependencies(fieldInfo)
break;
+ case "char":
+ this.addCharFieldDependencies(fieldInfo)
+ break;
}
return fieldInfo;
}
@@ -65,6 +69,9 @@ export class FieldsFilter extends Component {
case "many2many":
case "one2many":
return X2ManyFilterFilter;
+ case "char":
+ return CharFilter;
+
}
}
@@ -128,6 +135,7 @@ export class FieldsFilter extends Component {
domain: field.fieldDomain || "[]",
fieldString: field.fieldString,
searchLimit: field.fieldOptions?.search_limit || 10,
+ placeholder: field.placeholder,
}
this._addFieldBaseProps(field.props, field);
}
@@ -144,6 +152,13 @@ export class FieldsFilter extends Component {
this._addFieldBaseProps(field.props, field);
}
+ addCharFieldDependencies(field) {
+ field.Component = this._getComponent(field);
+ // 组件props
+ field.props = {};
+ this._addFieldBaseProps(field.props, field);
+ }
+
// 筛选字段的onChange事件,将筛选字段的id和domain传给searchModel
fieldFilterOnchange(fieldsFilterId, fieldsFilterInfo) {
if (fieldsFilterInfo?.fieldDomainList){
diff --git a/header_search_panel/static/src/search/header_search/components/fields_filter/fields_filter.xml b/header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/fields_filter.xml
similarity index 100%
rename from header_search_panel/static/src/search/header_search/components/fields_filter/fields_filter.xml
rename to header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/fields_filter.xml
diff --git a/header_search_panel/static/src/search/header_search/components/fields_filter/many2one_filter/many2one_filter.js b/header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/many2one_filter/many2one_filter.js
similarity index 98%
rename from header_search_panel/static/src/search/header_search/components/fields_filter/many2one_filter/many2one_filter.js
rename to header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/many2one_filter/many2one_filter.js
index 1c80a1a04..4db0404ab 100644
--- a/header_search_panel/static/src/search/header_search/components/fields_filter/many2one_filter/many2one_filter.js
+++ b/header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/many2one_filter/many2one_filter.js
@@ -104,6 +104,7 @@ export class Many2oneFilter extends Component {
activeActions: {create: false, createEdit: false, write: false},
fieldString: this.props.fieldString,
searchLimit: this.props.searchLimit,
+ placeholder: this.props.placeholder,
};
}
}
diff --git a/header_search_panel/static/src/search/header_search/components/fields_filter/many2one_filter/many2one_filter.xml b/header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/many2one_filter/many2one_filter.xml
similarity index 100%
rename from header_search_panel/static/src/search/header_search/components/fields_filter/many2one_filter/many2one_filter.xml
rename to header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/many2one_filter/many2one_filter.xml
diff --git a/header_search_panel/static/src/search/header_search/components/fields_filter/selection_filter/selection_filter.js b/header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/selection_filter/selection_filter.js
similarity index 100%
rename from header_search_panel/static/src/search/header_search/components/fields_filter/selection_filter/selection_filter.js
rename to header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/selection_filter/selection_filter.js
diff --git a/header_search_panel/static/src/search/header_search/components/fields_filter/selection_filter/selection_filter.xml b/header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/selection_filter/selection_filter.xml
similarity index 100%
rename from header_search_panel/static/src/search/header_search/components/fields_filter/selection_filter/selection_filter.xml
rename to header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/selection_filter/selection_filter.xml
diff --git a/header_search_panel/static/src/search/header_search/components/fields_filter/standard_field_filter_props.js b/header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/standard_field_filter_props.js
similarity index 88%
rename from header_search_panel/static/src/search/header_search/components/fields_filter/standard_field_filter_props.js
rename to header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/standard_field_filter_props.js
index 231ebf6b4..2fa7705c2 100644
--- a/header_search_panel/static/src/search/header_search/components/fields_filter/standard_field_filter_props.js
+++ b/header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/standard_field_filter_props.js
@@ -13,4 +13,6 @@ export const standardFieldFilterProps = {
type: {type: String, required: true},
// 字段变换监听函数
fieldOnchange: { type: Function, required: true },
+ // 提示
+ placeholder: {type: String, optional: true},
};
diff --git a/header_search_panel/static/src/search/header_search/components/fields_filter/x2many_filter/x2many_filter.js b/header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/x2many_filter/x2many_filter.js
similarity index 100%
rename from header_search_panel/static/src/search/header_search/components/fields_filter/x2many_filter/x2many_filter.js
rename to header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/x2many_filter/x2many_filter.js
diff --git a/header_search_panel/static/src/search/header_search/components/fields_filter/x2many_filter/x2many_filter.xml b/header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/x2many_filter/x2many_filter.xml
similarity index 100%
rename from header_search_panel/static/src/search/header_search/components/fields_filter/x2many_filter/x2many_filter.xml
rename to header_search_panel/header_search_panel/static/src/search/header_search/components/fields_filter/x2many_filter/x2many_filter.xml
diff --git a/header_search_panel/static/src/search/header_search/components/quick_filter/quick_filter.js b/header_search_panel/header_search_panel/static/src/search/header_search/components/quick_filter/quick_filter.js
similarity index 100%
rename from header_search_panel/static/src/search/header_search/components/quick_filter/quick_filter.js
rename to header_search_panel/header_search_panel/static/src/search/header_search/components/quick_filter/quick_filter.js
diff --git a/header_search_panel/static/src/search/header_search/components/quick_filter/quick_filter.xml b/header_search_panel/header_search_panel/static/src/search/header_search/components/quick_filter/quick_filter.xml
similarity index 92%
rename from header_search_panel/static/src/search/header_search/components/quick_filter/quick_filter.xml
rename to header_search_panel/header_search_panel/static/src/search/header_search/components/quick_filter/quick_filter.xml
index 17da74122..7ea0d8bbe 100644
--- a/header_search_panel/static/src/search/header_search/components/quick_filter/quick_filter.xml
+++ b/header_search_panel/header_search_panel/static/src/search/header_search/components/quick_filter/quick_filter.xml
@@ -2,11 +2,11 @@
-
+
+
From 315ff358162b358d1cb17dfa3d5efa40f74cf1ac Mon Sep 17 00:00:00 2001
From: Admin
Date: Thu, 11 Dec 2025 13:41:01 +0800
Subject: [PATCH 43/43] =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E6=98=8E=E7=BB=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../static/src/js/financial.js | 32 ++++++++++-
.../static/src/js/information.js | 30 ++++++++++
.../static/src/xml/financial.xml | 57 +++++++++++--------
.../static/src/xml/information.xml | 7 ++-
yuthon_account_report/views/custom.xml | 54 +++++++++++++++---
.../views/yuthon_hr_employee_views.xml | 2 +-
6 files changed, 147 insertions(+), 35 deletions(-)
diff --git a/yuthon_account_report/static/src/js/financial.js b/yuthon_account_report/static/src/js/financial.js
index 9838416bc..d8e307ade 100644
--- a/yuthon_account_report/static/src/js/financial.js
+++ b/yuthon_account_report/static/src/js/financial.js
@@ -1,7 +1,7 @@
/** @odoo-module **/
import {registry} from "@web/core/registry";
-import {useService} from "@web/core/utils/hooks";
+import { useService } from "@web/core/utils/hooks";
const {Component, useState, onWillStart, onMounted} = owl;
@@ -409,6 +409,36 @@ class FinancialPage extends Component {
}
+ // 数据点击事件
+ onDataCellClick(params){
+ const queryParams = {
+ project_id: params.row.id,
+ group_id: params.group.id,
+ date: params.filters.date,
+ };
+ let domain = []
+ if(queryParams.date){
+ domain.push(['sheet_id.create_date', '<=', queryParams.date])
+ }
+ if(queryParams.group_id){
+ domain.push(['sheet_id.company_id.id', '=', queryParams.group_id])
+ }
+ if(queryParams.project_id){
+ domain.push(['collection_id', '=', queryParams.project_id])
+ }
+ this.action.doAction({
+ type: 'ir.actions.act_window',
+ res_model: 'financial.sheet.line',
+ name: '提报数据明细',
+ view_mode: 'tree',
+ view_type: 'tree',
+ views: [[false, 'tree']],
+ target: 'new', // 以弹窗形式打开
+ domain: domain,
+ context: {},
+ })
+ }
+
// 重置筛选条件
onReset() {
this.state.filters = {
diff --git a/yuthon_account_report/static/src/js/information.js b/yuthon_account_report/static/src/js/information.js
index cf2e171e5..fd4aec66d 100644
--- a/yuthon_account_report/static/src/js/information.js
+++ b/yuthon_account_report/static/src/js/information.js
@@ -260,6 +260,36 @@ export class FinancialSinglePage extends Component {
this.notification.add("使用演示数据", { type: "info" });
}
+ // 数据点击事件
+ onDataCellClick(params){
+ const queryParams = {
+ project_id: params.row.id,
+ group_id: params.group.id,
+ date: params.filters.date,
+ };
+ let domain = []
+ if(queryParams.date){
+ domain.push(['summary_id.create_date', '<=', queryParams.date])
+ }
+ if(queryParams.group_id && Number.isFinite(queryParams.group_id)){
+ domain.push(['summary_id.company_id.id', '=', queryParams.group_id])
+ }
+ if(queryParams.project_id){
+ domain.push(['table_id', '=', queryParams.project_id])
+ }
+ this.action.doAction({
+ type: 'ir.actions.act_window',
+ res_model: 'information.summary.line',
+ name: '信息汇总明细',
+ view_mode: 'tree',
+ view_type: 'tree',
+ views: [[false, 'tree']],
+ target: 'new', // 以弹窗形式打开
+ domain: domain,
+ context: {},
+ })
+ }
+
fillExampleData() {
// 填充一些示例数据以便预览
const rows = this.state.tableData.rows;
diff --git a/yuthon_account_report/static/src/xml/financial.xml b/yuthon_account_report/static/src/xml/financial.xml
index 3a923dbb7..a44013689 100644
--- a/yuthon_account_report/static/src/xml/financial.xml
+++ b/yuthon_account_report/static/src/xml/financial.xml
@@ -12,10 +12,10 @@
@@ -23,9 +23,9 @@