@@ -0,0 +1 @@
|
||||
from . import employee_login
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -159,8 +159,8 @@
|
||||
<field name="employee_id" column_invisible="1"/>
|
||||
<field name="vacation_id" column_invisible="1"/>
|
||||
<field name="workflow_record_id" domain="[('workflow_id.name', '=', '请假'), ('create_uid.employee_id', '=', employee_id)]"/>
|
||||
<field name="update_type" readonly="1"/>
|
||||
<field name="update_date" readonly="1"/>
|
||||
<field name="update_type" readonly="0"/>
|
||||
<field name="update_date" readonly="0"/>
|
||||
<field name="update_lines"/>
|
||||
<field name="valid_date"/>
|
||||
<field name="adjust_date"/>
|
||||
@@ -182,8 +182,8 @@
|
||||
<field name="vacation_id" column_invisible="1"/>
|
||||
<field name="employee_id" column_invisible="1"/>
|
||||
<field name="workflow_record_id" domain="[('workflow_id.name', '=', '加班'), ('create_uid.employee_id', '=', employee_id)]"/>
|
||||
<field name="update_type" readonly="1"/>
|
||||
<field name="update_date" readonly="1"/>
|
||||
<field name="update_type" readonly="0"/>
|
||||
<field name="update_date" readonly="0"/>
|
||||
<field name="workday"/>
|
||||
<field name="legal_day"/>
|
||||
<field name="public_holidays"/>
|
||||
@@ -207,8 +207,8 @@
|
||||
<field name="employee_id" column_invisible="1"/>
|
||||
<field name="vacation_id" column_invisible="1"/>
|
||||
<field name="workflow_record_id" domain="[('workflow_id.name', '=', '外出'), ('create_uid.employee_id', '=', employee_id)]"/>
|
||||
<field name="update_type" readonly="1"/>
|
||||
<field name="update_date" readonly="1"/>
|
||||
<field name="update_type" readonly="0"/>
|
||||
<field name="update_date" readonly="0"/>
|
||||
<field name="update_lines"/>
|
||||
<field name="valid_date"/>
|
||||
<field name="adjust_date"/>
|
||||
@@ -229,8 +229,8 @@
|
||||
<field name="vacation_id" column_invisible="1"/>
|
||||
<field name="workflow_record_id" domain="[('workflow_id.name', '=', '请假'), ('create_uid.employee_id', '=', employee_id)]"/>
|
||||
<field name="holiday_type"/>
|
||||
<field name="update_type" readonly="1"/>
|
||||
<field name="update_date" readonly="1"/>
|
||||
<field name="update_type" readonly="0"/>
|
||||
<field name="update_date" readonly="0"/>
|
||||
<field name="lines"/>
|
||||
<field name="is_void"/>
|
||||
<field name="text"/>
|
||||
@@ -247,8 +247,8 @@
|
||||
<field name="employee_id" column_invisible="1"/>
|
||||
<field name="vacation_id" column_invisible="1"/>
|
||||
<field name="workflow_record_id" domain="[('workflow_id.name', '=', '外出'), ('create_uid.employee_id', '=', employee_id)]"/>
|
||||
<field name="update_type" readonly="1"/>
|
||||
<field name="update_date" readonly="1"/>
|
||||
<field name="update_type" readonly="0"/>
|
||||
<field name="update_date" readonly="0"/>
|
||||
<field name="lines"/>
|
||||
<field name="valid_date"/>
|
||||
<field name="adjust_date"/>
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record model="ir.rule" id="yuthon_onboard_approval_rule">
|
||||
<field name="name">入职多公司</field>
|
||||
<field name="model_id" ref="model_yuthon_onboard_approval"/>
|
||||
<field name="domain_force">[('company_id', 'in', company_ids)]</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -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):
|
||||
|
||||
@@ -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='角色范围')
|
||||
|
||||
@@ -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='角色范围')
|
||||
|
||||
@@ -117,14 +117,9 @@
|
||||
sequence="20"/>
|
||||
<menuitem id="main_flats_menu"
|
||||
parent="yuthon_official_setting"
|
||||
name="主送单位"
|
||||
name="主送/抄送单位"
|
||||
action="main_flats_action"
|
||||
sequence="25"/>
|
||||
<menuitem id="copy_flats_menu"
|
||||
parent="yuthon_official_setting"
|
||||
name="抄送单位"
|
||||
action="copy_flats_action"
|
||||
sequence="27"/>
|
||||
<menuitem id="official_management_type_menu"
|
||||
parent="yuthon_official_setting"
|
||||
name="公文类型"
|
||||
|
||||
@@ -19,28 +19,14 @@
|
||||
<field name="name">main.flats.tree</field>
|
||||
<field name="model">main.flats</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="主送单位" editable="bottom">
|
||||
<tree string="主送/抄送单位" editable="bottom">
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="main_flats_action" model="ir.actions.act_window">
|
||||
<field name="name">主送单位</field>
|
||||
<field name="name">主送/抄送单位</field>
|
||||
<field name="res_model">main.flats</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
<record id="copy_flats_tree" model="ir.ui.view">
|
||||
<field name="name">copy.flats.tree</field>
|
||||
<field name="model">copy.flats</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="抄送单位" editable="bottom">
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="copy_flats_action" model="ir.actions.act_window">
|
||||
<field name="name">抄送单位</field>
|
||||
<field name="res_model">copy.flats</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -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([
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
</header>
|
||||
<group>
|
||||
<group>
|
||||
<field name="select_year" required="1"/>
|
||||
<field name="select_month" required="1"/>
|
||||
<field name="excel_file" filename="excel_name"/>
|
||||
<field name="excel_name" invisible="1"/>
|
||||
</group>
|
||||
|
||||
@@ -38,9 +38,14 @@
|
||||
<field name="name">yuthon.information.categories.tree</field>
|
||||
<field name="model">yuthon.information.categories</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="信息分类" editable="bottom">
|
||||
<tree string="业务类型" editable="bottom">
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="yuthon_information_categories_action" model="ir.actions.act_window">
|
||||
<field name="name">业务类型</field>
|
||||
<field name="res_model">yuthon.information.categories</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -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
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
action="yuthon_trade.view_yuthon_stack_position_action"
|
||||
sequence="20"/>
|
||||
|
||||
|
||||
<menuitem id="information_root_board"
|
||||
name="信息化"
|
||||
web_icon="yuthon_work_brand,static/description/information.png"
|
||||
@@ -52,6 +53,11 @@
|
||||
parent="information_setting_root_board"
|
||||
action="yuthon_trade.view_yuthon_publish_type_action"
|
||||
sequence="1"/>
|
||||
<menuitem id="yuthon_information_categories_board"
|
||||
name="业务类型"
|
||||
parent="information_setting_root_board"
|
||||
action="yuthon_trade.yuthon_information_categories_action"
|
||||
sequence="5"/>
|
||||
|
||||
<menuitem id="yuthon_software_issues_processing_brand"
|
||||
parent="information_setting_root_board"
|
||||
|
||||
Reference in New Issue
Block a user