From 3c532bba5ff33b6d3418e0419c3eceb0f27fc9dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Sun, 18 Jan 2026 17:00:44 +0800 Subject: [PATCH 01/16] =?UTF-8?q?=E6=89=93=E5=8D=B0=EF=BC=8C=E6=8F=90?= =?UTF-8?q?=E9=86=92=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../report/hr_leave_batch_report_action.xml | 7 ++++ .../report/hr_leave_batch_report_template.xml | 34 ++++++++------- .../report/go_approval_templates.xml | 8 ++-- .../report/overtime_approval_report.xml | 7 ++++ .../report/overtime_approval_templates.xml | 37 +++++++---------- .../views/inherit_hr_job_views.xml | 2 +- .../report/contract_review_report.xml | 11 ++--- .../contract_review_report_templates.xml | 21 +++++----- .../report/leaving_approval_report.xml | 1 + .../leaving_approval_report_templates.xml | 11 +++-- .../property_lease_contract_print_report.xml | 2 + ...roperty_lease_contract_print_templates.xml | 36 ++++++---------- .../report/business_approval_print_report.xml | 5 ++- .../business_approval_print_templates.xml | 18 ++++---- yuthon_trade/report/seal_approval_report.xml | 2 + .../report/seal_approval_templates.xml | 41 +++++++++---------- .../views/yuthon_will_task_views.xml | 4 +- 17 files changed, 129 insertions(+), 118 deletions(-) diff --git a/yuthon_holiday/report/hr_leave_batch_report_action.xml b/yuthon_holiday/report/hr_leave_batch_report_action.xml index cf4c63371..892aad0fe 100644 --- a/yuthon_holiday/report/hr_leave_batch_report_action.xml +++ b/yuthon_holiday/report/hr_leave_batch_report_action.xml @@ -1,6 +1,12 @@ + + Leave Batch Portrait + A4 + 5 + Portrait + 请假单 hr.leave.batch @@ -8,6 +14,7 @@ yuthon_holiday.hr_leave_batch_print yuthon_holiday.hr_leave_batch_print + report diff --git a/yuthon_holiday/report/hr_leave_batch_report_template.xml b/yuthon_holiday/report/hr_leave_batch_report_template.xml index 952f5939d..7b9b69755 100644 --- a/yuthon_holiday/report/hr_leave_batch_report_template.xml +++ b/yuthon_holiday/report/hr_leave_batch_report_template.xml @@ -8,8 +8,8 @@ @@ -30,15 +29,15 @@ 会审意见表 - -
- 承办部门: - 流水号: + +
+ 承办部门: + 流水号:
- + diff --git a/yuthon_hr_employee_approval/report/leaving_approval_report.xml b/yuthon_hr_employee_approval/report/leaving_approval_report.xml index 5dfc41931..9fb386188 100644 --- a/yuthon_hr_employee_approval/report/leaving_approval_report.xml +++ b/yuthon_hr_employee_approval/report/leaving_approval_report.xml @@ -5,6 +5,7 @@ Leaving Approval Small Top MarginA45 + Portrait 离职申请 diff --git a/yuthon_hr_employee_approval/report/leaving_approval_report_templates.xml b/yuthon_hr_employee_approval/report/leaving_approval_report_templates.xml index 64285cade..127d56c27 100644 --- a/yuthon_hr_employee_approval/report/leaving_approval_report_templates.xml +++ b/yuthon_hr_employee_approval/report/leaving_approval_report_templates.xml @@ -6,8 +6,8 @@
业务审批单
-
- 部门: - 流水号: +
+ 部门: + 流水号:
- - + + diff --git a/yuthon_trade/report/seal_approval_report.xml b/yuthon_trade/report/seal_approval_report.xml index dc3175369..0124bd7d1 100644 --- a/yuthon_trade/report/seal_approval_report.xml +++ b/yuthon_trade/report/seal_approval_report.xml @@ -3,7 +3,9 @@ Lease Contract Small Top Margin + A4 5 + Portrait 用章申请报表 diff --git a/yuthon_trade/report/seal_approval_templates.xml b/yuthon_trade/report/seal_approval_templates.xml index 3f59c2ba8..879b37326 100644 --- a/yuthon_trade/report/seal_approval_templates.xml +++ b/yuthon_trade/report/seal_approval_templates.xml @@ -6,8 +6,8 @@
用章申请
- -
- 部门: - 流水号: + +
+ 部门: + 流水号:
事项标题
业务类型、
+ + + + + + + + + @@ -107,8 +106,8 @@ - - + + - + + + + + + + + + + + + From cae32afdf5f067108d220ff4ff10142a707acad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Sun, 18 Jan 2026 17:48:11 +0800 Subject: [PATCH 03/16] =?UTF-8?q?=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_holiday/report/hr_leave_batch_report_action.xml | 6 +++--- yuthon_hr_attendance/report/overtime_approval_report.xml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/yuthon_holiday/report/hr_leave_batch_report_action.xml b/yuthon_holiday/report/hr_leave_batch_report_action.xml index 892aad0fe..f983fb2d4 100644 --- a/yuthon_holiday/report/hr_leave_batch_report_action.xml +++ b/yuthon_holiday/report/hr_leave_batch_report_action.xml @@ -2,10 +2,10 @@ - Leave Batch Portrait - A4 + Leave Batch A5 Landscape + A5 5 - Portrait + Landscape 请假单 diff --git a/yuthon_hr_attendance/report/overtime_approval_report.xml b/yuthon_hr_attendance/report/overtime_approval_report.xml index 60ba4cd8c..25ba2824b 100644 --- a/yuthon_hr_attendance/report/overtime_approval_report.xml +++ b/yuthon_hr_attendance/report/overtime_approval_report.xml @@ -1,9 +1,9 @@ - Overtime Approval Portrait - A4 + Overtime Approval A5 Landscape + A5 5 - Portrait + Landscape 加班单 From 73b92c2d6b09efe0c36c56a963653dbd41069611 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Sun, 18 Jan 2026 18:39:58 +0800 Subject: [PATCH 04/16] =?UTF-8?q?=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../report/business_approval_print_templates.xml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/yuthon_trade/report/business_approval_print_templates.xml b/yuthon_trade/report/business_approval_print_templates.xml index ebb960ad7..38f1f135a 100644 --- a/yuthon_trade/report/business_approval_print_templates.xml +++ b/yuthon_trade/report/business_approval_print_templates.xml @@ -53,7 +53,19 @@ - + + + + + + + + + + + + + From 019619ea0e70d4a4b23c7d40699d333cdb98f82f 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: Sun, 18 Jan 2026 18:52:34 +0800 Subject: [PATCH 05/16] =?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/soong_workflow_record.py | 42 ++++++++- .../views/soong_workflow_record.xml | 2 +- .../wizard/soong_workflow_comment_wizard.py | 10 +-- yuthon_holiday/models/inherit_hr_leave.py | 26 ++++++ yuthon_hr_attendance/__manifest__.py | 2 +- .../models/overtime_approval.py | 12 --- .../models/yuthon_holiday_statement.py | 55 ++++++++---- .../models/yuthon_overtime_report.py | 34 ------- .../models/yuthon_vacation_reports.py | 90 +++++++++++++++++-- .../views/overtime_approval.xml | 26 ------ .../views/yuthon_holiday_statement.xml | 28 +++--- .../views/yuthon_overtime_report.xml | 25 ------ .../views/yuthon_vacation_reports_views.xml | 69 +++++++++++++- yuthon_wechat/models/wecom_apps.py | 54 ++++++----- yuthon_will_task/models/yuthon_will_task.py | 6 +- yuthon_work_brand/views/hr_menus.xml | 10 +-- 16 files changed, 304 insertions(+), 187 deletions(-) delete mode 100644 yuthon_hr_attendance/models/yuthon_overtime_report.py delete mode 100644 yuthon_hr_attendance/views/yuthon_overtime_report.xml diff --git a/soong_workflow/models/soong_workflow_record.py b/soong_workflow/models/soong_workflow_record.py index c1dc7ccc9..2ae837280 100644 --- a/soong_workflow/models/soong_workflow_record.py +++ b/soong_workflow/models/soong_workflow_record.py @@ -16,10 +16,7 @@ class SoongWorkflowRecord(models.Model): def get_workflow_count(self): domain = [ - ('soong_state', 'in', ['to_do', 'active']), - ('employee_ids.user_id', '=', self.env.user.id), - ('users_ids', 'in', self.env.user.id), - ('reclaim_state', '=', False) + ('is_to_do', '=', True), ] return self.search_count(domain) @@ -74,6 +71,43 @@ class SoongWorkflowRecord(models.Model): # 人力资源流程的发生日期 workflow_happen_date = fields.Date(string="发生日期") is_unlink = fields.Boolean(string="是否可删", compute='_compute_is_unlink') + is_to_do = fields.Boolean( + string="是否是待办流程", + compute='_compute_is_to_do', + search='_search_is_to_do', + ) + @api.depends('employee_ids', 'soong_state', 'reclaim_state') + def _compute_is_to_do(self): + current_uid = self.env.user.id + for record in self: + record.is_to_do = False + condition1 = record.soong_state == 'to_do' + condition2 = not record.reclaim_state + condition3 = False + if record.employee_ids: + condition3 = current_uid in record.employee_ids.mapped('user_id.id') + if condition1 and condition2 and condition3: + record.is_to_do = True + + def _search_is_to_do(self, operator, value): + current_uid = self.env.user.id + current_employee_ids = self.env['hr.employee'].search([ + ('user_id', '=', current_uid) + ]).ids + base_domain = [ + ('soong_state', '=', 'to_do'), + ('reclaim_state', '=', False), + ('employee_ids', 'in', current_employee_ids) + ] + if (operator == '=' and value) or (operator == '!=' and not value): + domain = base_domain + elif (operator == '=' and not value) or (operator == '!=' and value): + domain = ['!'] + base_domain + else: + domain = [] + return domain + + @api.depends_context('uid', 'company') @api.depends('department_id', 'employee_ids') diff --git a/soong_workflow/views/soong_workflow_record.xml b/soong_workflow/views/soong_workflow_record.xml index 4e63e02c6..05c1326e8 100644 --- a/soong_workflow/views/soong_workflow_record.xml +++ b/soong_workflow/views/soong_workflow_record.xml @@ -317,7 +317,7 @@ soong.workflow.recordtree,kanban,search{'header_search_default_approve_state': 1, 'header_search_default_to_do':1, 'check_employee': 1} - [('users_ids', 'in', uid), ('reclaim_state', '=', False), ('soong_state', 'in', ['to_do', 'to_active'])] + [('is_to_do', '=', True)] diff --git a/soong_workflow/wizard/soong_workflow_comment_wizard.py b/soong_workflow/wizard/soong_workflow_comment_wizard.py index cdbe495b0..593ac2e33 100644 --- a/soong_workflow/wizard/soong_workflow_comment_wizard.py +++ b/soong_workflow/wizard/soong_workflow_comment_wizard.py @@ -450,10 +450,10 @@ 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] target_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' - url = self.sudo().env["wecom.apps"].generate_oauth_login_url(target_url, category='oa') + url = self.sudo().env["wecom.apps"].generate_oauth_login_url(target_url, employee.user_id.id) _logger.info(f"===================当前的url为{url}=============================") result_data = self.sudo().env["wecom.apps"].sync_send_message_textcard(category='oa', - user_id=employee.wecom_userid, + user_id='18562027762', title= record_id._description if 'Purchase Order' != record_id._description else '采购订单', description="标题: {}\n".format(record_id.name) + self.env.user.name + ' ' + str( fields.Datetime.now() + timedelta(hours=8)), @@ -695,7 +695,7 @@ class SoongWorkflowCommentWizard(models.TransientModel): recipients = [emp for emp in employees] for employee in recipients: target_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' - url = self.sudo().env["wecom.apps"].generate_oauth_login_url(target_url, category='oa') + url = self.sudo().env["wecom.apps"].generate_oauth_login_url(target_url) if self.res_model == 'purchase.order': self.sudo().env["wecom.apps"].sync_send_message_textcard(category='oa', user_id=employee.wecom_userid, @@ -716,7 +716,7 @@ class SoongWorkflowCommentWizard(models.TransientModel): workflow_record_id = self.env['soong.workflow.record'].search([('code', '=', record_id.code)]) action_id = self.env['ir.actions.act_window'].search([('res_model', '=', self.res_model)])[0] target_url = f'https://oa.thtzjt.com/web#id={record_id.id}&cids=2&menu_id={menu_id.id}&active_id={action_id.id}&model={record_id._name}&view_type=form' - url = self.sudo().env["wecom.apps"].generate_oauth_login_url(target_url, category='oa') + url = self.sudo().env["wecom.apps"].generate_oauth_login_url(target_url) description = "标题: {}\n".format(record_id.name) + self.env.user.name + ' ' + str(fields.Datetime.now() + timedelta(hours=8)) if self.employee_ids: workflow_record_id.users_ids = [(4, employee.user_id.id) for employee in self.employee_ids if employee.user_id] @@ -839,7 +839,7 @@ class SoongWorkflowCommentWizard(models.TransientModel): menu_id = self.env['ir.ui.menu'].search([('name', '=', '行政收文')]) action_id = self.env['ir.actions.act_window'].search([('res_model', '=', self.res_model)])[0] target_url = f'https://oa.thtzjt.com/web#id={record_id.id}&cids=2&menu_id={menu_id.id}&active_id={action_id.id}&model={record_id._name}&view_type=form' - url = self.sudo().env["wecom.apps"].generate_oauth_login_url(target_url, category='oa') + url = self.sudo().env["wecom.apps"].generate_oauth_login_url(target_url) description = "标题: {}\n".format(record_id.name) + self.env.user.name + ' ' + str(fields.Datetime.now() + timedelta(hours=8)) record = self.env[self.res_model].search([('id', '=', self.res_id)]) record.log_ids[-1].write({'is_active_operate': True, diff --git a/yuthon_holiday/models/inherit_hr_leave.py b/yuthon_holiday/models/inherit_hr_leave.py index 249d04a9d..bbb7ccd5d 100644 --- a/yuthon_holiday/models/inherit_hr_leave.py +++ b/yuthon_holiday/models/inherit_hr_leave.py @@ -553,6 +553,32 @@ class HolidaysRequestBatch(models.Model): 'text': f"请假审批" }) + overtime_records = self.env['vacation.over.line'].search([ + ('employee_id', '=', self.users_id.employee_ids.id), + ('remaining_quantity', '>', 0), + ('is_void', '=', False), + ('text', '!=', '上月继承额度'), + ], order='start_time ASC') + + remaining_deduct = hours + for record in overtime_records: + if remaining_deduct <= 0: + break + current_remaining = record.remaining_quantity + deduct_amount = min(remaining_deduct, current_remaining) + if remaining_deduct > current_remaining: + carry_state = 'partial' + else: + carry_state = 'completed' + + record.write({ + 'carry_forward_date': fields.Date.to_string(period_start), + 'carry_forward_quantity': deduct_amount, + 'carry_forward_state': carry_state, + }) + remaining_deduct -= deduct_amount + + def _create_annual_leave_line(self, period_start, leave_data, hours, period): """更新年假记录,使用小时作为单位(增加重复校验,避免重复创建)""" report_month = date(period_start.year, period_start.month, 1) diff --git a/yuthon_hr_attendance/__manifest__.py b/yuthon_hr_attendance/__manifest__.py index c7bffb6be..926c78072 100644 --- a/yuthon_hr_attendance/__manifest__.py +++ b/yuthon_hr_attendance/__manifest__.py @@ -65,7 +65,7 @@ 'views/hr_attendance_portal_templates.xml', 'views/meal_approval.xml', 'views/applet_address_views.xml', - # 'views/yuthon_holiday_statement.xml', + 'views/yuthon_holiday_statement.xml', 'views/all_attendance_menu.xml', 'views/overtime_approval_inherit_header.xml', diff --git a/yuthon_hr_attendance/models/overtime_approval.py b/yuthon_hr_attendance/models/overtime_approval.py index 22b3e1bee..3cd374f93 100644 --- a/yuthon_hr_attendance/models/overtime_approval.py +++ b/yuthon_hr_attendance/models/overtime_approval.py @@ -48,18 +48,6 @@ class OvertimeApprovals(models.Model): work_end = fields.Boolean(string="结束") is_over = fields.Boolean(string="超过", compute="_compute_duration") - carry_forward_date = fields.Date(string="结转日期") - carry_forward_duration = fields.Float(string="结转时长") - carry_forward_result = fields.Selection([('success', '成功'),('failed', '失败')], string='结转结果',) - validity = fields.Char(string="有效期") - carry_forward_state = fields.Selection([('pending', '待结转'),('completed', '已结转'), ('partial', '部分结转') - ],string='结转状态', - default='pending', - ) - remaining_quantity = fields.Float(string='剩余数') - - - def action_print_overtime(self): self.ensure_one() return self.env.ref('yuthon_hr_attendance.action_overtime_approval_print').report_action(self) diff --git a/yuthon_hr_attendance/models/yuthon_holiday_statement.py b/yuthon_hr_attendance/models/yuthon_holiday_statement.py index cf838d605..c8965af07 100644 --- a/yuthon_hr_attendance/models/yuthon_holiday_statement.py +++ b/yuthon_hr_attendance/models/yuthon_holiday_statement.py @@ -2,24 +2,45 @@ from odoo import api, fields, models, tools, _ from datetime import datetime, time, timedelta from odoo.exceptions import UserError from datetime import date, timedelta - -class HolidayStatement(models.Model): +class YuthonOvertimeReport(models.Model): _name = 'yuthon.holiday.statement' + +class InheritHrLeave(models.Model): + _inherit = 'hr.leave' _description = '请假情况' - leave_approval_type = fields.Char(string="审批类型") - gender = fields.Selection([('male', '男'),('female', '女'),], string='性别', required=True, default='male') - leave_title = fields.Char(string="标题") - leave_summary = fields.Char(string="摘要") + caption = fields.Char(string="标题", compute="_compute_application_reason") employee_id = fields.Many2one('hr.employee', string="发起人") - leave_start_date = fields.Char(string="开始时间") - leave_end_date = fields.Char(string="结束时间") - leave_duration = fields.Char(string="请假时长") - leave_stats = fields.Char(string="请假统计") - application_reason = fields.Char(string="申请原因") - leave_start_time = fields.Datetime(string="发起时间") - leave_end_time = fields.Datetime(string="最后操作时间") - approval_state = fields.Selection([ - ('approved', '通过'), - ('rejected', '未通过') - ], string='审批状态') \ No newline at end of file + leave_stats = fields.Char(string="请假统计", compute="_compute_leave_stats") + application_reason = fields.Char(string="申请原因", compute="_compute_application_reason") + + @api.depends('batch_id', 'hour_batch_id') + def _compute_application_reason(self): + for rec in self: + if rec.batch_id: + rec.application_reason = rec.batch_id.text + rec.caption = rec.batch_id.name + elif rec.hour_batch_id: + rec.application_reason = rec.hour_batch_id.text + rec.caption = rec.hour_batch_id.name + else: + rec.application_reason = '' + rec.caption = '' + + @api.depends('holiday_status_id', 'employee_id') + def _compute_leave_stats(self): + for record in self: + record.leave_stats = "" + current_year = datetime.now().year + start_of_year = f"{current_year}-01-01" + end_of_year = f"{current_year}-12-31" + leave_records = self.env['hr.leave'].search([ + ('employee_id', '=', record.employee_id.id), + ('holiday_status_id', '=', record.holiday_status_id.id), + ('date_from', '>=', start_of_year), + ('date_from', '<=', end_of_year), + ('state', '=', 'validate'), + ]) + total_days = sum(leave.number_of_days for leave in leave_records) + leave_type_name = record.holiday_status_id.name + record.leave_stats = f"本年内已请{leave_type_name}{total_days:.1f}天" \ No newline at end of file diff --git a/yuthon_hr_attendance/models/yuthon_overtime_report.py b/yuthon_hr_attendance/models/yuthon_overtime_report.py deleted file mode 100644 index aaaf1134d..000000000 --- a/yuthon_hr_attendance/models/yuthon_overtime_report.py +++ /dev/null @@ -1,34 +0,0 @@ -from odoo import api, fields, models, tools, _ -from datetime import datetime, time, timedelta -from odoo.exceptions import UserError -from datetime import date, timedelta - - -class YuthonOvertimeReport(models.Model): - _name = 'yuthon.overtime.report' - _description = '加班情况' - - employee_id = fields.Many2one('hr.employee', string="员工") - department_id = fields.Many2one('hr.department',string="部门") - overtime_date = fields.Char(string="加班时间") - carry_forward_date = fields.Date(string="结转日期") - carry_forward_duration = fields.Float(string="结转时长") - carry_forward_result = fields.Selection( - selection=[ - ('success', '成功'), - ('failed', '失败') - ], - string='结转结果', - ) - validity = fields.Char(string="有效期") - carry_forward_state = fields.Selection( - selection=[ - ('pending', '待结转'), - ('completed', '已结转'), - ('partial', '部分结转') - ], - string='结转状态', - default='pending', - ) - remaining_quantity = fields.Float(string='剩余数') - diff --git a/yuthon_hr_attendance/models/yuthon_vacation_reports.py b/yuthon_hr_attendance/models/yuthon_vacation_reports.py index 6981e615b..cb9cca8f3 100644 --- a/yuthon_hr_attendance/models/yuthon_vacation_reports.py +++ b/yuthon_hr_attendance/models/yuthon_vacation_reports.py @@ -86,7 +86,6 @@ class YuthonVacationReports(models.Model): attendance_message_log_ids = fields.One2many('attendance.message.log', 'vacation_id') admin_confirms = fields.Boolean(string="是否管理员确认") - vacation_state = fields.Selection( selection=[ ('not_sent', "未发送"), @@ -931,7 +930,8 @@ class VacationOverline(models.Model): _description = '加班明细' vacation_id = fields.Many2one('yuthon.vacation.reports', string='关联假期额度记录') - employee_id = fields.Many2one('hr.employee', string='员工') + employee_id = fields.Many2one('hr.employee', string='员工', compute='_compute_employee_id', store=True) + department_id = fields.Many2one('hr.department', related='employee_id.department_id', string="部门") workflow_record_id = fields.Many2one('soong.workflow.record', string='流程') update_type= fields.Selection([('add', '增加'), ('reduce', '减少')], string='更新类型') workday = fields.Float(string='工作日') @@ -947,6 +947,57 @@ class VacationOverline(models.Model): text = fields.Text(string='备注') is_confirm = fields.Boolean(string="是否确认") + overtime_name = fields.Char(string="标题", compute="_compute_overtime", store=True) + start_time = fields.Datetime(string="开始时间", compute="_compute_overtime", store=True) + end_time = fields.Datetime(string="结束时间", compute="_compute_overtime", store=True) + carry_forward_date = fields.Date(string="结转日期") + duration = fields.Float(string="加班时长", compute="_compute_overtime", store=True) + carry_forward_quantity = fields.Float(string="结转时长") + validity = fields.Char(string="有效期") + carry_forward_state = fields.Selection([('pending', '待结转'),('completed', '已结转'), ('partial', '部分结转') + ],string='结转状态', + default='pending', + ) + remaining_quantity = fields.Float(string='剩余数', compute="_compute_remaining_quantity", store=True) + + def update_line(self): + over_ids = self.env["vacation.over.line"].browse( + self._context.get('active_ids', self._context.get('active_id'))) + for rec in over_ids: + rec._compute_remaining_quantity() + rec._compute_overtime() + rec._compute_employee_id() + + @api.depends('duration', 'carry_forward_quantity') + def _compute_remaining_quantity(self): + for rec in self: + rec.remaining_quantity = rec.duration - rec.carry_forward_quantity + + @api.depends('vacation_id') + def _compute_employee_id(self): + for rec in self: + if rec.vacation_id: + rec.employee_id = rec.vacation_id.employee_id.id + elif not rec.employee_id: + rec.employee_id = False + + @api.depends('workflow_record_id') + def _compute_overtime(self): + for rec in self: + if rec.workflow_record_id and rec.update_type == 'add': + res_model = rec.workflow_record_id.res_model + res_id = rec.workflow_record_id.res_id + overtime_id = rec.env[res_model].search([('id', '=', res_id)]) + rec.overtime_name = overtime_id.name + rec.start_time = overtime_id.start_time + rec.end_time = overtime_id.end_time + rec.duration = overtime_id.duration + else: + rec.overtime_name = '' + rec.start_time = '' + rec.end_time = '' + rec.duration = 0 + def action_void(self): self.is_void = True @@ -969,6 +1020,8 @@ class VacationOverline(models.Model): if vals.get('update_type') == 'reduce' and vals.get('vacation_id'): vacation_main = self.env['yuthon.vacation.reports'].browse(vals['vacation_id']) + current_vacation_date = vacation_main.vacation_date + next_month_first_day = current_vacation_date + relativedelta(months=+1, day=1) deduct_workday = vals.get('workday', 0.0) deduct_public = vals.get('public_holidays', 0.0) deduct_workday_convert = deduct_workday / 8 @@ -983,8 +1036,6 @@ class VacationOverline(models.Model): is_cross_year = False # 计算下月1号并判断是否跨年 if vacation_main.vacation_date: - current_vacation_date = vacation_main.vacation_date - next_month_first_day = current_vacation_date + relativedelta(months=+1, day=1) is_cross_year = current_vacation_date.year != next_month_first_day.year # 跨年场景 @@ -1006,31 +1057,52 @@ class VacationOverline(models.Model): current_text = vals.get('text', '').strip() if current_text != '上月额度继承': vacation_main = self.env['yuthon.vacation.reports'].browse(vals['vacation_id']) + current_vacation_date = vacation_main.vacation_date + next_month_first_day = current_vacation_date + relativedelta(months=+1, day=1) add_workday = vals.get('workday', 0.0) add_public = vals.get('public_holidays', 0.0) + next_month_vacation = self.env['yuthon.vacation.reports'].search([ + ('employee_id', '=', vacation_main.employee_id.id), + ('vacation_date', '=', next_month_first_day), + ('vacation_state', 'in', ['not_sent', 'pending']), + ], limit=1) if vacation_main: vacation_add_vals = { 'year_workday': vacation_main.year_workday + add_workday / 8, 'year_holiday': vacation_main.year_holiday + add_public / 8, } vacation_main.write(vacation_add_vals) + next_month_vacation = self.env['yuthon.vacation.reports'].search([ + ('employee_id', '=', vacation_main.employee_id.id), + ('vacation_date', '=', next_month_first_day), + ('vacation_state', 'in', ['not_sent', 'pending']), + ], limit=1) + + if next_month_vacation: + total_add_days = add_workday + add_public + inherit_vacation = self.env['vacation.over.line'].search([ + ('vacation_id', '=', next_month_vacation.id), + ('text', '=', '上月额度继承'), + ], limit=1) + if inherit_vacation: + inherit_vacation.write({ + 'year_workday': next_month_vacation.year_workday + add_workday / 8, + 'year_holiday': next_month_vacation.year_holiday + add_public / 8, + 'workday': inherit_vacation.workday + total_add_days + }) if vacation_main.vacation_date: current_vacation_date = vacation_main.vacation_date next_month_first_day = current_vacation_date + relativedelta(months=+1, day=1) # 必须是跨年才写入上年工作日 is_cross_year = current_vacation_date.year != next_month_first_day.year - next_month_vacation = self.env['yuthon.vacation.reports'].search([ - ('employee_id', '=', vacation_main.employee_id.id), - ('vacation_date', '=', next_month_first_day), - ('vacation_state', 'in', ['not_sent', 'pending']), - ], limit=1) if is_cross_year: next_month_deduct_vals = { 'last_workday': next_month_vacation.last_workday + add_workday / 8, 'last_holiday': next_month_vacation.last_holiday + add_public / 8, } next_month_vacation.write(next_month_deduct_vals) + next_month_vacation.previous_year = next_month_vacation.last_workday/8 + next_month_vacation.last_holiday / 8, return super(VacationOverline, self).create(vals) diff --git a/yuthon_hr_attendance/views/overtime_approval.xml b/yuthon_hr_attendance/views/overtime_approval.xml index 9f3304b57..678fcbe18 100644 --- a/yuthon_hr_attendance/views/overtime_approval.xml +++ b/yuthon_hr_attendance/views/overtime_approval.xml @@ -15,7 +15,6 @@ overtime.approval
- @@ -127,29 +126,4 @@ [('users_id', '=', uid)] tree,form - - - overtime.approval.tree - overtime.approval - - - - - - - - - - - - - - - - - 加班情况 - overtime.approval - tree - - \ No newline at end of file diff --git a/yuthon_hr_attendance/views/yuthon_holiday_statement.xml b/yuthon_hr_attendance/views/yuthon_holiday_statement.xml index 7efe10385..30afd6330 100644 --- a/yuthon_hr_attendance/views/yuthon_holiday_statement.xml +++ b/yuthon_hr_attendance/views/yuthon_holiday_statement.xml @@ -1,29 +1,27 @@ - - yuthon.holiday.statement.tree - yuthon.holiday.statement + + hr.leave.statement.tree + hr.leave - + + - - - - - - - - - + + + + + - + 请假情况 - yuthon.holiday.statement + hr.leave tree + \ No newline at end of file diff --git a/yuthon_hr_attendance/views/yuthon_overtime_report.xml b/yuthon_hr_attendance/views/yuthon_overtime_report.xml deleted file mode 100644 index f651b3b07..000000000 --- a/yuthon_hr_attendance/views/yuthon_overtime_report.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - yuthon.overtime.report.tree - yuthon.overtime.report - - - - - - - - - - - - - - - - 加班情况 - yuthon.overtime.report - tree - - diff --git a/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml b/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml index 7dcc2218e..6da66cef1 100644 --- a/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml +++ b/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml @@ -5,8 +5,8 @@ yuthon.vacation.reports - - + + @@ -286,7 +286,23 @@ - + + + + + + + + + + + + + + + + + @@ -491,10 +507,57 @@ + + vacation.over.line.overtime.tree + vacation.over.line + + + + + + + + + + + + + + + + + + vacation.over.line.overtime.search + vacation.over.line + + + + + + + + + + + 加班情况 + vacation.over.line + tree + [('workflow_record_id','!=', False), ('update_type', '=', 'add')] + + + + + 触发计算逻辑 + + + code + action = model.update_line() + 误餐情况 yuthon.vacation.reports tree + [('meal_fee', '!=', 0)] {'search_default_group_by_employee_id': 1, 'search_default_group_by_vacation_month': True} diff --git a/yuthon_wechat/models/wecom_apps.py b/yuthon_wechat/models/wecom_apps.py index 40953572d..aa9f94bd8 100644 --- a/yuthon_wechat/models/wecom_apps.py +++ b/yuthon_wechat/models/wecom_apps.py @@ -343,45 +343,43 @@ class WeComApps(models.Model): return False, result_data.get("errmsg", "") @api.model - def generate_oauth_login_url(self, target_url, category='default'): + def generate_oauth_login_url(self, target_url, user_id=None): """ - 生成企业微信OAuth登录链接,用于在企业微信消息中发送 - + + user_id = record.employee_id.user_id.id if record.employee_id.user_id else None + url = self.sudo().env["wecom.apps"].generate_oauth_login_url(target_url, user_id=user_id) + + 生成企业微信免登录链接,用于在企业微信消息中发送 + 与 /wechat/login_by_user_id 接口联动 + 参数: target_url: 登录成功后要跳转的目标URL(完整URL或相对路径) - + user_id: 用户ID (res.users的id),必需参数 + 返回: - OAuth登录链接URL + 免登录链接URL,格式: /wechat/login_by_user_id?user_id=xxx&redirect_url=xxx """ + if not user_id: + _logger.warning("generate_oauth_login_url: user_id 参数未提供,无法生成免登录链接") + return target_url # 如果未提供user_id,返回原始URL + base_url = self.env['ir.config_parameter'].sudo().get_param('web.base.url') + # 如果target_url不是完整URL,补全为完整URL if not target_url.startswith('http'): if target_url.startswith('/'): target_url = f"{base_url}{target_url}" else: target_url = f"{base_url}/{target_url}" - # 编码目标URL作为state参数 + + # 编码目标URL作为redirect_url参数 encoded_target_url = quote(target_url, safe='') - # 编码回调URI - redirect_uri = quote(f'{base_url}/wechat/login_by_code', safe='') - - # 企业微信OAuth参数 - if category == 'oa': - agent_id = self.env['wecom.apps'].search([('name', '=', '审批消息通知')])['agent_id'] - appid = self.env['wecom.apps'].search([('name', '=', '审批消息通知')])['corpid'] - else: - appid = 'wwc955c117b738b052' - agent_id = '1000120' - - # 生成OAuth登录链接 - oauth_url = ( - f'https://open.weixin.qq.com/connect/oauth2/authorize?' - f'appid={appid}&' - f'redirect_uri={redirect_uri}&' - f'response_type=code&' - f'scope=snsapi_base&' - f'state={encoded_target_url}&' - f'agentid={agent_id}#wechat_redirect' + + # 生成免登录链接,使用 /wechat/login_by_user_id 接口 + login_url = ( + f'{base_url}/wechat/login_by_user_id?' + f'user_id={user_id}&' + f'redirect_url={encoded_target_url}' ) - - return oauth_url + + return login_url diff --git a/yuthon_will_task/models/yuthon_will_task.py b/yuthon_will_task/models/yuthon_will_task.py index dfe4620be..55ae3fef3 100644 --- a/yuthon_will_task/models/yuthon_will_task.py +++ b/yuthon_will_task/models/yuthon_will_task.py @@ -180,7 +180,8 @@ class YuthonWillTask(models.Model): 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: + will_id.task_state = 'done' + for employee_id in task.employee_ids: url = f'https://phone.thtzjt.com/phone/Schedule/{task.yuthon_will_task_id.id}/{employee_id.id}' data_date = '时间:' + (task.reminder_time + timedelta(hours=8)).strftime("%Y-%m-%d %H:%M:%S") + '\n' data_name = "事项名称: " + task.yuthon_will_task_id.name + '\n' @@ -303,4 +304,5 @@ class YuthonWillTask(models.Model): 'view_mode': 'tree', 'res_model': 'yuthon.dates.task', 'domain': [('yuthon_will_task_id', '=', self.id)], - } \ No newline at end of file + } + diff --git a/yuthon_work_brand/views/hr_menus.xml b/yuthon_work_brand/views/hr_menus.xml index bb78ba116..be6321482 100644 --- a/yuthon_work_brand/views/hr_menus.xml +++ b/yuthon_work_brand/views/hr_menus.xml @@ -170,11 +170,11 @@ parent="hr_attendance_root_board_menu" action="yuthon_hr_attendance.action_overtime_approval_report" sequence="15"/> - - - - - + Date: Sun, 18 Jan 2026 19:03:24 +0800 Subject: [PATCH 06/16] 1 --- yuthon_hr_employee/views/inherit_hr_job_views.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yuthon_hr_employee/views/inherit_hr_job_views.xml b/yuthon_hr_employee/views/inherit_hr_job_views.xml index 312856978..845d9b0d1 100644 --- a/yuthon_hr_employee/views/inherit_hr_job_views.xml +++ b/yuthon_hr_employee/views/inherit_hr_job_views.xml @@ -82,7 +82,7 @@ 1 - + From 85e4b35a4217e6f5a8f4e17654442f55c9d11834 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: Sun, 18 Jan 2026 19:36:37 +0800 Subject: [PATCH 07/16] =?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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soong_workflow/wizard/soong_workflow_comment_wizard.py b/soong_workflow/wizard/soong_workflow_comment_wizard.py index 593ac2e33..148ed5ae7 100644 --- a/soong_workflow/wizard/soong_workflow_comment_wizard.py +++ b/soong_workflow/wizard/soong_workflow_comment_wizard.py @@ -453,7 +453,7 @@ class SoongWorkflowCommentWizard(models.TransientModel): url = self.sudo().env["wecom.apps"].generate_oauth_login_url(target_url, employee.user_id.id) _logger.info(f"===================当前的url为{url}=============================") result_data = self.sudo().env["wecom.apps"].sync_send_message_textcard(category='oa', - user_id='18562027762', + user_id=employee.wecom_userid, title= record_id._description if 'Purchase Order' != record_id._description else '采购订单', description="标题: {}\n".format(record_id.name) + self.env.user.name + ' ' + str( fields.Datetime.now() + timedelta(hours=8)), From 594ad82b4a4787c4d3e0f29163f22a5ca627441c 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: Sun, 18 Jan 2026 19:59:23 +0800 Subject: [PATCH 08/16] =?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 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/soong_workflow/wizard/soong_workflow_comment_wizard.py b/soong_workflow/wizard/soong_workflow_comment_wizard.py index 148ed5ae7..6a5c5a0b4 100644 --- a/soong_workflow/wizard/soong_workflow_comment_wizard.py +++ b/soong_workflow/wizard/soong_workflow_comment_wizard.py @@ -695,7 +695,7 @@ class SoongWorkflowCommentWizard(models.TransientModel): recipients = [emp for emp in employees] for employee in recipients: target_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' - url = self.sudo().env["wecom.apps"].generate_oauth_login_url(target_url) + url = self.sudo().env["wecom.apps"].generate_oauth_login_url(target_url, employee.user_id.id) if self.res_model == 'purchase.order': self.sudo().env["wecom.apps"].sync_send_message_textcard(category='oa', user_id=employee.wecom_userid, @@ -716,7 +716,6 @@ class SoongWorkflowCommentWizard(models.TransientModel): workflow_record_id = self.env['soong.workflow.record'].search([('code', '=', record_id.code)]) action_id = self.env['ir.actions.act_window'].search([('res_model', '=', self.res_model)])[0] target_url = f'https://oa.thtzjt.com/web#id={record_id.id}&cids=2&menu_id={menu_id.id}&active_id={action_id.id}&model={record_id._name}&view_type=form' - url = self.sudo().env["wecom.apps"].generate_oauth_login_url(target_url) description = "标题: {}\n".format(record_id.name) + self.env.user.name + ' ' + str(fields.Datetime.now() + timedelta(hours=8)) if self.employee_ids: workflow_record_id.users_ids = [(4, employee.user_id.id) for employee in self.employee_ids if employee.user_id] @@ -731,6 +730,7 @@ class SoongWorkflowCommentWizard(models.TransientModel): "done_by": self.employee_ids.user_id.id, "node_btn_name": "0", }) + url = self.sudo().env["wecom.apps"].generate_oauth_login_url(target_url, self.employee_ids.user_id.id) result_data = self.sudo().env["wecom.apps"].sync_send_message_textcard(category='oa', user_id=self.employee_ids.wecom_userid, title=record_id._description, description=description, url=url, btntxt="查看详情") if result_data and 'msgid' in result_data[-1]: msg_id = result_data[-1]['msgid'] @@ -747,6 +747,7 @@ class SoongWorkflowCommentWizard(models.TransientModel): "done_by": emp.user_id.id, "node_btn_name": "4", }) + url = self.sudo().env["wecom.apps"].generate_oauth_login_url(target_url, emp.user_id.id) result_data = self.sudo().env["wecom.apps"].sync_send_message_textcard(category='oa', user_id=emp.wecom_userid, title=record_id._description + "承办", description=description, url=url, btntxt="查看详情") if result_data and 'msgid' in result_data[-1]: msg_id = result_data[-1]['msgid'] @@ -781,6 +782,7 @@ class SoongWorkflowCommentWizard(models.TransientModel): "node_btn_id": self.node_btn_id.id, "approval_state": "0", }) + url = self.sudo().env["wecom.apps"].generate_oauth_login_url(target_url, employee.user_id.id) result_data = self.sudo().env["wecom.apps"].sync_send_message_textcard(category='oa', user_id=employee.wecom_userid, title=record_id._description + "传阅/抄送",description=description, url=url, btntxt="查看详情") if result_data and 'msgid' in result_data[-1]: msg_id = result_data[-1]['msgid'] @@ -839,7 +841,6 @@ class SoongWorkflowCommentWizard(models.TransientModel): menu_id = self.env['ir.ui.menu'].search([('name', '=', '行政收文')]) action_id = self.env['ir.actions.act_window'].search([('res_model', '=', self.res_model)])[0] target_url = f'https://oa.thtzjt.com/web#id={record_id.id}&cids=2&menu_id={menu_id.id}&active_id={action_id.id}&model={record_id._name}&view_type=form' - url = self.sudo().env["wecom.apps"].generate_oauth_login_url(target_url) description = "标题: {}\n".format(record_id.name) + self.env.user.name + ' ' + str(fields.Datetime.now() + timedelta(hours=8)) record = self.env[self.res_model].search([('id', '=', self.res_id)]) record.log_ids[-1].write({'is_active_operate': True, @@ -875,6 +876,7 @@ class SoongWorkflowCommentWizard(models.TransientModel): "node_btn_id": self.node_btn_id.id, "approval_state": "0", }) + url = self.sudo().env["wecom.apps"].generate_oauth_login_url(target_url, employee.user_id.id) result_data = self.sudo().env["wecom.apps"].sync_send_message_textcard(category='oa', user_id=employee.wecom_userid, title=record_id._description + "传阅/抄送", From d287b0c841900de2593546a0542c11d97338d82c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Sun, 18 Jan 2026 20:24:10 +0800 Subject: [PATCH 09/16] =?UTF-8?q?=E6=89=93=E5=8D=B0=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E5=8E=BB=E9=87=8D=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- soong_workflow/models/soong_workflow_mixin.py | 25 +++++++++++++++++++ .../report/hr_leave_batch_report_template.xml | 3 ++- .../report/overtime_approval_templates.xml | 3 ++- .../views/inherit_hr_job_views.xml | 2 +- .../contract_review_report_templates.xml | 3 ++- ...roperty_lease_contract_print_templates.xml | 3 ++- .../report/purchase_order_print_templates.xml | 3 ++- .../business_approval_print_templates.xml | 24 +----------------- .../report/seal_approval_templates.xml | 3 ++- 9 files changed, 39 insertions(+), 30 deletions(-) diff --git a/soong_workflow/models/soong_workflow_mixin.py b/soong_workflow/models/soong_workflow_mixin.py index 74e9c88ef..92cedca45 100644 --- a/soong_workflow/models/soong_workflow_mixin.py +++ b/soong_workflow/models/soong_workflow_mixin.py @@ -209,6 +209,31 @@ class SoongWorkflowMixin(models.AbstractModel): soong_record_ids = fields.One2many(comodel_name="soong.workflow.line", inverse_name="res_id", string=" ",) project_ids = fields.One2many(comodel_name="project.project.line", inverse_name="res_id", string=" ",) + def get_logs_for_print(self, applicant_first=False): + """ + 返回用于打印的审批日志列表: + - 按与界面相同的顺序(sequence 升序) + - 同名节点只保留最新一条 + - 可选:申请人置顶 + """ + self.ensure_one() + logs = self.log_ids.sorted('sequence') + seen = set() + ordered = [] + # 逆序去重,保留最新 + for log in reversed(logs): + key = log.name or '' + if key in seen: + continue + seen.add(key) + ordered.append(log) + ordered.reverse() # 恢复原有顺序(去重后) + if applicant_first: + applicants = [l for l in ordered if (l.name or '') == '申请人'] + others = [l for l in ordered if (l.name or '') != '申请人'] + ordered = applicants + others + return ordered + # @api.model_create_multi # def create(self, vals_list): # res = super().create(vals_list) diff --git a/yuthon_holiday/report/hr_leave_batch_report_template.xml b/yuthon_holiday/report/hr_leave_batch_report_template.xml index 7b9b69755..89263f669 100644 --- a/yuthon_holiday/report/hr_leave_batch_report_template.xml +++ b/yuthon_holiday/report/hr_leave_batch_report_template.xml @@ -131,7 +131,8 @@
- + + diff --git a/yuthon_hr_attendance/report/overtime_approval_templates.xml b/yuthon_hr_attendance/report/overtime_approval_templates.xml index 7e664ad00..92331e36b 100644 --- a/yuthon_hr_attendance/report/overtime_approval_templates.xml +++ b/yuthon_hr_attendance/report/overtime_approval_templates.xml @@ -67,7 +67,8 @@ - + + diff --git a/yuthon_hr_employee/views/inherit_hr_job_views.xml b/yuthon_hr_employee/views/inherit_hr_job_views.xml index 845d9b0d1..312856978 100644 --- a/yuthon_hr_employee/views/inherit_hr_job_views.xml +++ b/yuthon_hr_employee/views/inherit_hr_job_views.xml @@ -82,7 +82,7 @@ 1 - + diff --git a/yuthon_hr_employee_approval/report/contract_review_report_templates.xml b/yuthon_hr_employee_approval/report/contract_review_report_templates.xml index a0d1ca290..10c9b39d9 100644 --- a/yuthon_hr_employee_approval/report/contract_review_report_templates.xml +++ b/yuthon_hr_employee_approval/report/contract_review_report_templates.xml @@ -92,7 +92,8 @@ - + + diff --git a/yuthon_property_approval/report/property_lease_contract_print_templates.xml b/yuthon_property_approval/report/property_lease_contract_print_templates.xml index 6a58ddb41..650aac119 100644 --- a/yuthon_property_approval/report/property_lease_contract_print_templates.xml +++ b/yuthon_property_approval/report/property_lease_contract_print_templates.xml @@ -119,7 +119,8 @@ - + + diff --git a/yuthon_purchase/report/purchase_order_print_templates.xml b/yuthon_purchase/report/purchase_order_print_templates.xml index fcf991556..6185332b2 100644 --- a/yuthon_purchase/report/purchase_order_print_templates.xml +++ b/yuthon_purchase/report/purchase_order_print_templates.xml @@ -116,7 +116,8 @@
审批详情
事项
diff --git a/yuthon_will_task/views/yuthon_will_task_views.xml b/yuthon_will_task/views/yuthon_will_task_views.xml index d2ee39c5a..ba66cb633 100644 --- a/yuthon_will_task/views/yuthon_will_task_views.xml +++ b/yuthon_will_task/views/yuthon_will_task_views.xml @@ -24,7 +24,7 @@ -
用章范围、
附件清单
审批详情
审批详情
审批详情
审批详情
审批详情
- + + diff --git a/yuthon_trade/report/business_approval_print_templates.xml b/yuthon_trade/report/business_approval_print_templates.xml index 38f1f135a..8ba805a53 100644 --- a/yuthon_trade/report/business_approval_print_templates.xml +++ b/yuthon_trade/report/business_approval_print_templates.xml @@ -42,29 +42,7 @@ - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/yuthon_trade/report/seal_approval_templates.xml b/yuthon_trade/report/seal_approval_templates.xml index 879b37326..86d05edc8 100644 --- a/yuthon_trade/report/seal_approval_templates.xml +++ b/yuthon_trade/report/seal_approval_templates.xml @@ -104,7 +104,8 @@ - + + From 842d4e6aad5040a2abc9b874d699c351d6ebfa8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Sun, 18 Jan 2026 20:25:02 +0800 Subject: [PATCH 10/16] =?UTF-8?q?=E6=89=93=E5=8D=B0=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E5=8E=BB=E9=87=8D=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_hr_employee/views/inherit_hr_job_views.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yuthon_hr_employee/views/inherit_hr_job_views.xml b/yuthon_hr_employee/views/inherit_hr_job_views.xml index 312856978..845d9b0d1 100644 --- a/yuthon_hr_employee/views/inherit_hr_job_views.xml +++ b/yuthon_hr_employee/views/inherit_hr_job_views.xml @@ -82,7 +82,7 @@ 1 - + From c9f7a858d200799778b8350b1b04d12876637c71 Mon Sep 17 00:00:00 2001 From: sunjie Date: Sun, 18 Jan 2026 20:28:56 +0800 Subject: [PATCH 11/16] =?UTF-8?q?=E5=BC=80=E9=97=A8,=E5=85=B3=E9=97=A8?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/src/views/form/form_controller.xml | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/sh_backmate_theme_adv_enterprise/static/src/views/form/form_controller.xml b/sh_backmate_theme_adv_enterprise/static/src/views/form/form_controller.xml index 330cf5cab..1879ce8b3 100644 --- a/sh_backmate_theme_adv_enterprise/static/src/views/form/form_controller.xml +++ b/sh_backmate_theme_adv_enterprise/static/src/views/form/form_controller.xml @@ -60,6 +60,27 @@
+ +
+ + + + +
+ + +
+ + +
+
+
@@ -72,8 +93,9 @@
-
From fc3bca9928381f868f644259e5102549754aa363 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: Sun, 18 Jan 2026 20:34:58 +0800 Subject: [PATCH 12/16] =?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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soong_workflow/models/soong_workflow_record.py b/soong_workflow/models/soong_workflow_record.py index 2ae837280..a432b8586 100644 --- a/soong_workflow/models/soong_workflow_record.py +++ b/soong_workflow/models/soong_workflow_record.py @@ -81,7 +81,7 @@ class SoongWorkflowRecord(models.Model): current_uid = self.env.user.id for record in self: record.is_to_do = False - condition1 = record.soong_state == 'to_do' + condition1 = record.soong_state in ['to_do', 'to_active'] condition2 = not record.reclaim_state condition3 = False if record.employee_ids: From 40f597e4995d989d4c77f784abd47bb53fefc57b 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: Sun, 18 Jan 2026 20:49:58 +0800 Subject: [PATCH 13/16] =?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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soong_workflow/models/soong_workflow_record.py b/soong_workflow/models/soong_workflow_record.py index a432b8586..49f1bda89 100644 --- a/soong_workflow/models/soong_workflow_record.py +++ b/soong_workflow/models/soong_workflow_record.py @@ -95,7 +95,7 @@ class SoongWorkflowRecord(models.Model): ('user_id', '=', current_uid) ]).ids base_domain = [ - ('soong_state', '=', 'to_do'), + ('soong_state', 'in', ['to_do', 'to_active']), ('reclaim_state', '=', False), ('employee_ids', 'in', current_employee_ids) ] From 9807fed023fbece6636ba47b6d0c80cb297ddc36 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: Sun, 18 Jan 2026 21:00:40 +0800 Subject: [PATCH 14/16] =?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 | 2 -- soong_workflow/views/soong_workflow_record.xml | 10 +++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/soong_workflow/models/soong_workflow_record.py b/soong_workflow/models/soong_workflow_record.py index 49f1bda89..67ffa2ed4 100644 --- a/soong_workflow/models/soong_workflow_record.py +++ b/soong_workflow/models/soong_workflow_record.py @@ -107,8 +107,6 @@ class SoongWorkflowRecord(models.Model): domain = [] return domain - - @api.depends_context('uid', 'company') @api.depends('department_id', 'employee_ids') def _compute_part_of_department(self): diff --git a/soong_workflow/views/soong_workflow_record.xml b/soong_workflow/views/soong_workflow_record.xml index 05c1326e8..4cbfb45d7 100644 --- a/soong_workflow/views/soong_workflow_record.xml +++ b/soong_workflow/views/soong_workflow_record.xml @@ -76,7 +76,7 @@ + create="false" default_order="write_date2 desc, id desc" expand="1" limit="10">
- - -
- - -
- - -
-
- + From 63db6eb899c4452a8e09e17adc71e9d5f3e40f07 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: Sun, 18 Jan 2026 21:23:23 +0800 Subject: [PATCH 16/16] =?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/templates/soong_workflow_templates.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/soong_workflow/templates/soong_workflow_templates.xml b/soong_workflow/templates/soong_workflow_templates.xml index 4a0cb1b8f..70ab7f10e 100644 --- a/soong_workflow/templates/soong_workflow_templates.xml +++ b/soong_workflow/templates/soong_workflow_templates.xml @@ -4,7 +4,7 @@ - + @@ -20,7 +20,7 @@ - + @@ -32,7 +32,7 @@ - +
用章范围、
附件清单
审批详情
审批详情