From c9d88bb7daac9ff181090818f0e2395930a243e2 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, 4 Jan 2026 19:06:04 +0800 Subject: [PATCH 1/3] =?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_salary/wizard/salary_import_wizard.py | 9 ++++++++- yuthon_salary/wizard/salary_import_wizard_views.xml | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/yuthon_salary/wizard/salary_import_wizard.py b/yuthon_salary/wizard/salary_import_wizard.py index e892c3f60..374a596ef 100644 --- a/yuthon_salary/wizard/salary_import_wizard.py +++ b/yuthon_salary/wizard/salary_import_wizard.py @@ -15,6 +15,13 @@ class SalaryImportWizard(models.TransientModel): file = fields.Binary(string='File', required=True) excel_file = fields.Binary(string="上传Excel表") excel_name = fields.Char(string="文件名") + select_month = fields.Selection([('1', '一月'), ('2', '二月'), ('3', '三月'), ('4', '四月'), + ('5', '五月'), ('6', '六月'), ('7', '七月'), ('8', '八月'), + ('9', '九月'), ('10', '十月'), ('11', '十一月'), + ('12', '十二月')], string='选择月份', + default=lambda self: str(datetime.now().month)) + select_year = fields.Selection(selection=[(str(i), str(i)) for i in range(2024, 2060)], string='选择年份', + default=lambda self: str(datetime.now().year)) def confirm(self): if not self.excel_file: @@ -51,7 +58,7 @@ class SalaryImportWizard(models.TransientModel): employee_name = row[0].value employee = self.env['hr.employee'].search([('name', '=', employee_name)], limit=1) if employee: - payslip_run_name = f"{2025}年-八月" + payslip_run_name = f"{self.select_year}年-{self.select_month}月" payslip_run_id = self.env['hr.payslip.run'].search( [('name', '=', payslip_run_name), ('company_id', '=', employee.company_id.id)], limit=1) payslip = self.env['hr.payslip'].search([ diff --git a/yuthon_salary/wizard/salary_import_wizard_views.xml b/yuthon_salary/wizard/salary_import_wizard_views.xml index bb28068e0..8446b967d 100644 --- a/yuthon_salary/wizard/salary_import_wizard_views.xml +++ b/yuthon_salary/wizard/salary_import_wizard_views.xml @@ -17,6 +17,8 @@ + + From d8cd38e1a4135556ac03515448aec76a14d72173 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, 4 Jan 2026 19:54:56 +0800 Subject: [PATCH 2/3] =?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/controllers/__init__.py | 1 + .../controllers/recover_controllers.py | 14 +++++++++++++ soong_workflow/models/soong_workflow_log.py | 1 + soong_workflow/models/soong_workflow_mixin.py | 2 +- .../wizard/soong_workflow_comment_wizard.py | 2 +- .../views/yuthon_vacation_reports_views.xml | 20 +++++++++---------- yuthon_hr_employee_approval/__manifest__.py | 1 + .../security/company_rule.xml | 8 ++++++++ yuthon_official/models/officical_type.py | 4 ++-- .../models/yuthon_file_processing.py | 2 +- yuthon_official/models/yuthon_official.py | 2 +- yuthon_official/views/official_menus.xml | 7 +------ yuthon_official/views/official_type_views.xml | 18 ++--------------- .../views/yuthon_task_setting_views.xml | 7 ++++++- yuthon_work_brand/views/executive_manage.xml | 6 ++++++ 15 files changed, 56 insertions(+), 39 deletions(-) create mode 100644 soong_workflow/controllers/__init__.py create mode 100644 soong_workflow/controllers/recover_controllers.py create mode 100644 yuthon_hr_employee_approval/security/company_rule.xml diff --git a/soong_workflow/controllers/__init__.py b/soong_workflow/controllers/__init__.py new file mode 100644 index 000000000..8984723a2 --- /dev/null +++ b/soong_workflow/controllers/__init__.py @@ -0,0 +1 @@ +from . import employee_login diff --git a/soong_workflow/controllers/recover_controllers.py b/soong_workflow/controllers/recover_controllers.py new file mode 100644 index 000000000..f9a5aea9c --- /dev/null +++ b/soong_workflow/controllers/recover_controllers.py @@ -0,0 +1,14 @@ +import base64 + +from odoo.http import Controller, request, route +from odoo import models, fields, api, http, SUPERUSER_ID, _ +from datetime import date, datetime, time + +class RecoverControllers(Controller): + + @http.route('https://qyapi.weixin.qq.com/cgi-bin/message/recall?access_token=ACCESS_TOKEN', methods=['POST'], type='http', auth="none") + def recover_message(self, **kw): + pass + + + diff --git a/soong_workflow/models/soong_workflow_log.py b/soong_workflow/models/soong_workflow_log.py index 9aa106d4c..f8a359ae2 100644 --- a/soong_workflow/models/soong_workflow_log.py +++ b/soong_workflow/models/soong_workflow_log.py @@ -28,6 +28,7 @@ class SoongWorkflowLog(models.Model): date_create = fields.Datetime(string="时间", default=lambda self: fields.Datetime.now()) document_ids = fields.Many2many('ir.attachment', string="附件") active = fields.Boolean(string="归档", default=True) + msg_id = fields.Char() display_field = fields.Char(string="显示字段", compute="_compute_display_field") diff --git a/soong_workflow/models/soong_workflow_mixin.py b/soong_workflow/models/soong_workflow_mixin.py index d0b34c5cd..14521e405 100644 --- a/soong_workflow/models/soong_workflow_mixin.py +++ b/soong_workflow/models/soong_workflow_mixin.py @@ -350,7 +350,7 @@ class SoongWorkflowMixin(models.AbstractModel): # 筛选与当前节点部门匹配的后续节点 valid_nodes = [] for link in current_node.out_link_ids: - if self.name_title in ['业务审批', '合同审查表', '信息发布申请表']: + if self.name_title in ['业务审批', '合同审查表', '信息发布申请表',]: category_names = self.information_categories_ids.mapped('name') target_name = link.name.split('->')[-1].strip() if '工会活动' in category_names: diff --git a/soong_workflow/wizard/soong_workflow_comment_wizard.py b/soong_workflow/wizard/soong_workflow_comment_wizard.py index dd81b9a3f..22385b73d 100644 --- a/soong_workflow/wizard/soong_workflow_comment_wizard.py +++ b/soong_workflow/wizard/soong_workflow_comment_wizard.py @@ -445,7 +445,7 @@ class SoongWorkflowCommentWizard(models.TransientModel): action_id = self.env['ir.actions.act_window'].search([('res_model', '=', self.res_model)])[0] 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, + user_id='18562027762', title=record_id._description, description="标题: {}\n".format( record_id.name) + self.env.user.name + ' ' + str( diff --git a/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml b/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml index 748bdab2e..5fb48122e 100644 --- a/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml +++ b/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml @@ -159,8 +159,8 @@ - - + + @@ -182,8 +182,8 @@ - - + + @@ -207,8 +207,8 @@ - - + + @@ -229,8 +229,8 @@ - - + + @@ -247,8 +247,8 @@ - - + + diff --git a/yuthon_hr_employee_approval/__manifest__.py b/yuthon_hr_employee_approval/__manifest__.py index 69f824875..3c4cda353 100644 --- a/yuthon_hr_employee_approval/__manifest__.py +++ b/yuthon_hr_employee_approval/__manifest__.py @@ -15,6 +15,7 @@ 'room', 'yuthon_issue', 'mail', 'web', 'yuthon_trade'], 'data': [ 'security/ir.model.access.csv', + 'security/company_rule.xml', 'data/process_code_data.xml', 'data/stage_approval_data.xml', 'data/tage_approval_data.xml', diff --git a/yuthon_hr_employee_approval/security/company_rule.xml b/yuthon_hr_employee_approval/security/company_rule.xml new file mode 100644 index 000000000..008fdf066 --- /dev/null +++ b/yuthon_hr_employee_approval/security/company_rule.xml @@ -0,0 +1,8 @@ + + + + 入职多公司 + + [('company_id', 'in', company_ids)] + + \ No newline at end of file diff --git a/yuthon_official/models/officical_type.py b/yuthon_official/models/officical_type.py index fa1df2e51..dd6994d8d 100644 --- a/yuthon_official/models/officical_type.py +++ b/yuthon_official/models/officical_type.py @@ -13,9 +13,9 @@ class OfficialType(models.Model): class MainFlats(models.Model): _name = 'main.flats' - _description = '主送单位' + _description = '主送/抄送单位' - name = fields.Char(string="主送单位") + name = fields.Char(string="主送/抄送单位") class CopyFlats(models.Model): diff --git a/yuthon_official/models/yuthon_file_processing.py b/yuthon_official/models/yuthon_file_processing.py index e104edcd6..6ca1830e7 100644 --- a/yuthon_official/models/yuthon_file_processing.py +++ b/yuthon_official/models/yuthon_file_processing.py @@ -21,7 +21,7 @@ class YuthonFileProcessing(models.Model): come_file_id = fields.Char(string="来文编号") incoming_file_id = fields.Char(string="收文编号") main_flats_id = fields.Many2one('main.flats', string="主送单位") - copy_flats_id = fields.Many2one('copy.flats', string="抄送单位") + copy_flats_id = fields.Many2one('main.flats', string="抄送单位") department_ids = fields.Many2many('hr.department', string='部门范围') employee_ids = fields.Many2many('hr.employee', string='人员范围') users_role_ids = fields.Many2many('soong.user.role', string='角色范围') diff --git a/yuthon_official/models/yuthon_official.py b/yuthon_official/models/yuthon_official.py index 7db887917..a3ce672a7 100644 --- a/yuthon_official/models/yuthon_official.py +++ b/yuthon_official/models/yuthon_official.py @@ -23,7 +23,7 @@ class YuthonOfficial(models.Model): come_file_id = fields.Char(string="来文编号") incoming_file_id = fields.Char(string="收文编号") main_flats_id = fields.Many2one('main.flats', string="主送单位") - copy_flats_id = fields.Many2one('copy.flats', string="抄送单位") + copy_flats_id = fields.Many2one('main.flats', string="抄送单位") department_ids = fields.Many2many('hr.department', string='部门范围') employee_ids = fields.Many2many('hr.employee', string='人员范围') users_role_ids = fields.Many2many('soong.user.role', string='角色范围') diff --git a/yuthon_official/views/official_menus.xml b/yuthon_official/views/official_menus.xml index 8875d6879..fcd007522 100644 --- a/yuthon_official/views/official_menus.xml +++ b/yuthon_official/views/official_menus.xml @@ -117,14 +117,9 @@ sequence="20"/> - main.flats.tree main.flats - + - 主送单位 + 主送/抄送单位 main.flats tree - - copy.flats.tree - copy.flats - - - - - - - - 抄送单位 - copy.flats - tree - \ No newline at end of file diff --git a/yuthon_trade/views/yuthon_task_setting_views.xml b/yuthon_trade/views/yuthon_task_setting_views.xml index d06a102f1..406d01b9c 100644 --- a/yuthon_trade/views/yuthon_task_setting_views.xml +++ b/yuthon_trade/views/yuthon_task_setting_views.xml @@ -38,9 +38,14 @@ yuthon.information.categories.tree yuthon.information.categories - + + + 业务类型 + yuthon.information.categories + tree + \ No newline at end of file diff --git a/yuthon_work_brand/views/executive_manage.xml b/yuthon_work_brand/views/executive_manage.xml index f6e54ab14..7df853747 100644 --- a/yuthon_work_brand/views/executive_manage.xml +++ b/yuthon_work_brand/views/executive_manage.xml @@ -24,6 +24,7 @@ action="yuthon_trade.view_yuthon_stack_position_action" sequence="20"/> + + Date: Sun, 4 Jan 2026 19:56:48 +0800 Subject: [PATCH 3/3] =?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_wechat/models/wecom_apps.py | 1 + 1 file changed, 1 insertion(+) diff --git a/yuthon_wechat/models/wecom_apps.py b/yuthon_wechat/models/wecom_apps.py index 4e5c54b9c..0fa71d1ee 100644 --- a/yuthon_wechat/models/wecom_apps.py +++ b/yuthon_wechat/models/wecom_apps.py @@ -183,6 +183,7 @@ class WeComApps(models.Model): 'update_date': fields.Datetime.now(), "message_url": url, }) + _logger.info(f"------------------------接口收到响应返回值{result_data}-------------------------------") if result_data.get("errcode", None) == 0: return True, result_data return False, result_data