From 6b140fe6dd692a061036cc487855a0492288a162 Mon Sep 17 00:00:00 2001
From: mgw <1392924357@qq.com>
Date: Wed, 10 Jul 2024 15:58:47 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=B7=A5=E5=8D=95=E6=A8=A1?=
=?UTF-8?q?=E5=9D=97=EF=BC=8C=E5=A2=9E=E5=8A=A0=E4=BC=81=E5=BE=AE=E6=A8=A1?=
=?UTF-8?q?=E5=9D=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jikimo_system_order/__manifest__.py | 1 +
jikimo_system_order/models/__init__.py | 1 +
.../models/res_config_setting.py | 32 +
.../models/system_work_order.py | 2 +-
.../views/res_config_settings_views.xml | 28 +
.../views/yizuo_system_order_view.xml | 2 +-
sg_wechat_enterprise/.gitignore | 138 ++++
sg_wechat_enterprise/__init__.py | 3 +
sg_wechat_enterprise/__manifest__.py | 52 ++
.../controllers/WXBizMsgCrypt.py | 273 ++++++++
sg_wechat_enterprise/controllers/__init__.py | 3 +
sg_wechat_enterprise/controllers/ierror.py | 20 +
.../controllers/wechat_enterprise.py | 231 +++++++
sg_wechat_enterprise/data/data.xml | 16 +
sg_wechat_enterprise/demo/we_config_demo.xml | 13 +
sg_wechat_enterprise/models/__init__.py | 9 +
.../models/client/__init__.py | 11 +
.../models/client/api/__init__.py | 2 +
.../models/client/api/jkm_oauth.py | 53 ++
.../models/client/api/jkm_user.py | 21 +
sg_wechat_enterprise/models/mail.py | 121 ++++
sg_wechat_enterprise/models/res_users.py | 26 +
sg_wechat_enterprise/models/we_app.py | 213 ++++++
sg_wechat_enterprise/models/we_conf.py | 62 ++
.../models/we_receive_message.py | 143 ++++
.../models/we_receive_message_process.py | 109 +++
.../models/we_send_message.py | 108 +++
sg_wechat_enterprise/models/we_tools.py | 89 +++
sg_wechat_enterprise/requirements.txt | 1 +
.../security/ir.model.access.csv | 13 +
sg_wechat_enterprise/static/css/loading.css | 24 +
.../static/description/icon.png | Bin 0 -> 1660 bytes
.../static/description/qyh.png | Bin 0 -> 3406 bytes
.../static/js/url_transfers.js | 26 +
sg_wechat_enterprise/tests/__init__.py | 1 +
sg_wechat_enterprise/views/app_view.xml | 84 +++
sg_wechat_enterprise/views/mail_view.xml | 23 +
sg_wechat_enterprise/views/menu_view.xml | 34 +
sg_wechat_enterprise/views/res_users_view.xml | 20 +
sg_wechat_enterprise/views/we_app_view.xml | 149 +++++
sg_wechat_enterprise/views/we_config_view.xml | 48 ++
sg_wechat_enterprise/views/we_menu.xml | 38 ++
.../views/we_message_process_view.xml | 70 ++
.../views/we_receive_message_view.xml | 98 +++
.../views/we_send_message_view.xml | 105 +++
sg_wechat_enterprise/views/we_templates.xml | 45 ++
sg_wechat_enterprise/we_api/__init__.py | 33 +
sg_wechat_enterprise/we_api/_compat.py | 21 +
.../we_api/client/__init__.py | 140 ++++
.../we_api/client/api/__init__.py | 23 +
.../we_api/client/api/base.py | 29 +
.../we_api/client/api/card.py | 431 ++++++++++++
.../we_api/client/api/customservice.py | 242 +++++++
.../we_api/client/api/datacube.py | 360 ++++++++++
.../we_api/client/api/device.py | 284 ++++++++
.../we_api/client/api/group.py | 148 +++++
.../we_api/client/api/jsapi.py | 58 ++
.../we_api/client/api/material.py | 167 +++++
.../we_api/client/api/media.py | 126 ++++
.../we_api/client/api/menu.py | 235 +++++++
.../we_api/client/api/merchant/__init__.py | 72 ++
.../we_api/client/api/merchant/category.py | 30 +
.../we_api/client/api/merchant/common.py | 17 +
.../we_api/client/api/merchant/express.py | 48 ++
.../we_api/client/api/merchant/group.py | 60 ++
.../we_api/client/api/merchant/order.py | 52 ++
.../we_api/client/api/merchant/shelf.py | 50 ++
.../we_api/client/api/merchant/stock.py | 26 +
.../we_api/client/api/message.py | 572 ++++++++++++++++
.../we_api/client/api/misc.py | 51 ++
sg_wechat_enterprise/we_api/client/api/poi.py | 97 +++
.../we_api/client/api/qrcode.py | 87 +++
.../we_api/client/api/scan.py | 171 +++++
.../we_api/client/api/semantic.py | 59 ++
.../we_api/client/api/shakearound.py | 376 +++++++++++
.../we_api/client/api/template.py | 45 ++
.../we_api/client/api/user.py | 143 ++++
.../we_api/client/api/wifi.py | 195 ++++++
sg_wechat_enterprise/we_api/client/base.py | 251 +++++++
sg_wechat_enterprise/we_api/component.py | 431 ++++++++++++
.../we_api/crypto/__init__.py | 120 ++++
sg_wechat_enterprise/we_api/crypto/base.py | 52 ++
.../we_api/crypto/cryptography.py | 23 +
sg_wechat_enterprise/we_api/crypto/pkcs7.py | 23 +
.../we_api/crypto/pycrypto.py | 15 +
.../we_api/enterprise/__init__.py | 7 +
.../we_api/enterprise/client/__init__.py | 44 ++
.../we_api/enterprise/client/api/__init__.py | 18 +
.../we_api/enterprise/client/api/agent.py | 71 ++
.../we_api/enterprise/client/api/batch.py | 134 ++++
.../we_api/enterprise/client/api/chat.py | 273 ++++++++
.../enterprise/client/api/department.py | 117 ++++
.../we_api/enterprise/client/api/jsapi.py | 48 ++
.../we_api/enterprise/client/api/material.py | 201 ++++++
.../we_api/enterprise/client/api/media.py | 73 ++
.../we_api/enterprise/client/api/menu.py | 43 ++
.../we_api/enterprise/client/api/message.py | 161 +++++
.../we_api/enterprise/client/api/misc.py | 15 +
.../we_api/enterprise/client/api/oauth.py | 51 ++
.../we_api/enterprise/client/api/service.py | 45 ++
.../enterprise/client/api/shakearound.py | 25 +
.../we_api/enterprise/client/api/tag.py | 61 ++
.../we_api/enterprise/client/api/user.py | 160 +++++
.../we_api/enterprise/crypto.py | 46 ++
.../we_api/enterprise/events.py | 163 +++++
.../we_api/enterprise/exceptions.py | 9 +
.../we_api/enterprise/messages.py | 50 ++
.../we_api/enterprise/parser.py | 21 +
.../we_api/enterprise/replies.py | 67 ++
sg_wechat_enterprise/we_api/events.py | 629 ++++++++++++++++++
sg_wechat_enterprise/we_api/exceptions.py | 130 ++++
sg_wechat_enterprise/we_api/fields.py | 237 +++++++
sg_wechat_enterprise/we_api/messages.py | 173 +++++
sg_wechat_enterprise/we_api/oauth/__init__.py | 219 ++++++
sg_wechat_enterprise/we_api/parser.py | 47 ++
sg_wechat_enterprise/we_api/pay/__init__.py | 199 ++++++
.../we_api/pay/api/__init__.py | 10 +
sg_wechat_enterprise/we_api/pay/api/coupon.py | 82 +++
sg_wechat_enterprise/we_api/pay/api/jsapi.py | 48 ++
.../we_api/pay/api/micropay.py | 64 ++
sg_wechat_enterprise/we_api/pay/api/order.py | 138 ++++
.../we_api/pay/api/redpack.py | 125 ++++
sg_wechat_enterprise/we_api/pay/api/refund.py | 61 ++
sg_wechat_enterprise/we_api/pay/api/tools.py | 57 ++
.../we_api/pay/api/transfer.py | 65 ++
sg_wechat_enterprise/we_api/pay/base.py | 30 +
sg_wechat_enterprise/we_api/pay/utils.py | 54 ++
sg_wechat_enterprise/we_api/replies.py | 341 ++++++++++
.../we_api/session/__init__.py | 23 +
.../we_api/session/memcachedstorage.py | 35 +
.../we_api/session/memorystorage.py | 20 +
.../we_api/session/redisstorage.py | 35 +
.../we_api/session/shovestorage.py | 34 +
sg_wechat_enterprise/we_api/utils.py | 149 +++++
134 files changed, 12830 insertions(+), 2 deletions(-)
create mode 100644 jikimo_system_order/models/res_config_setting.py
create mode 100644 jikimo_system_order/views/res_config_settings_views.xml
create mode 100644 sg_wechat_enterprise/.gitignore
create mode 100644 sg_wechat_enterprise/__init__.py
create mode 100644 sg_wechat_enterprise/__manifest__.py
create mode 100644 sg_wechat_enterprise/controllers/WXBizMsgCrypt.py
create mode 100644 sg_wechat_enterprise/controllers/__init__.py
create mode 100644 sg_wechat_enterprise/controllers/ierror.py
create mode 100644 sg_wechat_enterprise/controllers/wechat_enterprise.py
create mode 100644 sg_wechat_enterprise/data/data.xml
create mode 100644 sg_wechat_enterprise/demo/we_config_demo.xml
create mode 100644 sg_wechat_enterprise/models/__init__.py
create mode 100644 sg_wechat_enterprise/models/client/__init__.py
create mode 100644 sg_wechat_enterprise/models/client/api/__init__.py
create mode 100644 sg_wechat_enterprise/models/client/api/jkm_oauth.py
create mode 100644 sg_wechat_enterprise/models/client/api/jkm_user.py
create mode 100644 sg_wechat_enterprise/models/mail.py
create mode 100644 sg_wechat_enterprise/models/res_users.py
create mode 100644 sg_wechat_enterprise/models/we_app.py
create mode 100644 sg_wechat_enterprise/models/we_conf.py
create mode 100644 sg_wechat_enterprise/models/we_receive_message.py
create mode 100644 sg_wechat_enterprise/models/we_receive_message_process.py
create mode 100644 sg_wechat_enterprise/models/we_send_message.py
create mode 100644 sg_wechat_enterprise/models/we_tools.py
create mode 100644 sg_wechat_enterprise/requirements.txt
create mode 100644 sg_wechat_enterprise/security/ir.model.access.csv
create mode 100644 sg_wechat_enterprise/static/css/loading.css
create mode 100644 sg_wechat_enterprise/static/description/icon.png
create mode 100644 sg_wechat_enterprise/static/description/qyh.png
create mode 100644 sg_wechat_enterprise/static/js/url_transfers.js
create mode 100644 sg_wechat_enterprise/tests/__init__.py
create mode 100644 sg_wechat_enterprise/views/app_view.xml
create mode 100644 sg_wechat_enterprise/views/mail_view.xml
create mode 100644 sg_wechat_enterprise/views/menu_view.xml
create mode 100644 sg_wechat_enterprise/views/res_users_view.xml
create mode 100644 sg_wechat_enterprise/views/we_app_view.xml
create mode 100644 sg_wechat_enterprise/views/we_config_view.xml
create mode 100644 sg_wechat_enterprise/views/we_menu.xml
create mode 100644 sg_wechat_enterprise/views/we_message_process_view.xml
create mode 100644 sg_wechat_enterprise/views/we_receive_message_view.xml
create mode 100644 sg_wechat_enterprise/views/we_send_message_view.xml
create mode 100644 sg_wechat_enterprise/views/we_templates.xml
create mode 100644 sg_wechat_enterprise/we_api/__init__.py
create mode 100644 sg_wechat_enterprise/we_api/_compat.py
create mode 100644 sg_wechat_enterprise/we_api/client/__init__.py
create mode 100644 sg_wechat_enterprise/we_api/client/api/__init__.py
create mode 100644 sg_wechat_enterprise/we_api/client/api/base.py
create mode 100644 sg_wechat_enterprise/we_api/client/api/card.py
create mode 100644 sg_wechat_enterprise/we_api/client/api/customservice.py
create mode 100644 sg_wechat_enterprise/we_api/client/api/datacube.py
create mode 100644 sg_wechat_enterprise/we_api/client/api/device.py
create mode 100644 sg_wechat_enterprise/we_api/client/api/group.py
create mode 100644 sg_wechat_enterprise/we_api/client/api/jsapi.py
create mode 100644 sg_wechat_enterprise/we_api/client/api/material.py
create mode 100644 sg_wechat_enterprise/we_api/client/api/media.py
create mode 100644 sg_wechat_enterprise/we_api/client/api/menu.py
create mode 100644 sg_wechat_enterprise/we_api/client/api/merchant/__init__.py
create mode 100644 sg_wechat_enterprise/we_api/client/api/merchant/category.py
create mode 100644 sg_wechat_enterprise/we_api/client/api/merchant/common.py
create mode 100644 sg_wechat_enterprise/we_api/client/api/merchant/express.py
create mode 100644 sg_wechat_enterprise/we_api/client/api/merchant/group.py
create mode 100644 sg_wechat_enterprise/we_api/client/api/merchant/order.py
create mode 100644 sg_wechat_enterprise/we_api/client/api/merchant/shelf.py
create mode 100644 sg_wechat_enterprise/we_api/client/api/merchant/stock.py
create mode 100644 sg_wechat_enterprise/we_api/client/api/message.py
create mode 100644 sg_wechat_enterprise/we_api/client/api/misc.py
create mode 100644 sg_wechat_enterprise/we_api/client/api/poi.py
create mode 100644 sg_wechat_enterprise/we_api/client/api/qrcode.py
create mode 100644 sg_wechat_enterprise/we_api/client/api/scan.py
create mode 100644 sg_wechat_enterprise/we_api/client/api/semantic.py
create mode 100644 sg_wechat_enterprise/we_api/client/api/shakearound.py
create mode 100644 sg_wechat_enterprise/we_api/client/api/template.py
create mode 100644 sg_wechat_enterprise/we_api/client/api/user.py
create mode 100644 sg_wechat_enterprise/we_api/client/api/wifi.py
create mode 100644 sg_wechat_enterprise/we_api/client/base.py
create mode 100644 sg_wechat_enterprise/we_api/component.py
create mode 100644 sg_wechat_enterprise/we_api/crypto/__init__.py
create mode 100644 sg_wechat_enterprise/we_api/crypto/base.py
create mode 100644 sg_wechat_enterprise/we_api/crypto/cryptography.py
create mode 100644 sg_wechat_enterprise/we_api/crypto/pkcs7.py
create mode 100644 sg_wechat_enterprise/we_api/crypto/pycrypto.py
create mode 100644 sg_wechat_enterprise/we_api/enterprise/__init__.py
create mode 100644 sg_wechat_enterprise/we_api/enterprise/client/__init__.py
create mode 100644 sg_wechat_enterprise/we_api/enterprise/client/api/__init__.py
create mode 100644 sg_wechat_enterprise/we_api/enterprise/client/api/agent.py
create mode 100644 sg_wechat_enterprise/we_api/enterprise/client/api/batch.py
create mode 100644 sg_wechat_enterprise/we_api/enterprise/client/api/chat.py
create mode 100644 sg_wechat_enterprise/we_api/enterprise/client/api/department.py
create mode 100644 sg_wechat_enterprise/we_api/enterprise/client/api/jsapi.py
create mode 100644 sg_wechat_enterprise/we_api/enterprise/client/api/material.py
create mode 100644 sg_wechat_enterprise/we_api/enterprise/client/api/media.py
create mode 100644 sg_wechat_enterprise/we_api/enterprise/client/api/menu.py
create mode 100644 sg_wechat_enterprise/we_api/enterprise/client/api/message.py
create mode 100644 sg_wechat_enterprise/we_api/enterprise/client/api/misc.py
create mode 100644 sg_wechat_enterprise/we_api/enterprise/client/api/oauth.py
create mode 100644 sg_wechat_enterprise/we_api/enterprise/client/api/service.py
create mode 100644 sg_wechat_enterprise/we_api/enterprise/client/api/shakearound.py
create mode 100644 sg_wechat_enterprise/we_api/enterprise/client/api/tag.py
create mode 100644 sg_wechat_enterprise/we_api/enterprise/client/api/user.py
create mode 100644 sg_wechat_enterprise/we_api/enterprise/crypto.py
create mode 100644 sg_wechat_enterprise/we_api/enterprise/events.py
create mode 100644 sg_wechat_enterprise/we_api/enterprise/exceptions.py
create mode 100644 sg_wechat_enterprise/we_api/enterprise/messages.py
create mode 100644 sg_wechat_enterprise/we_api/enterprise/parser.py
create mode 100644 sg_wechat_enterprise/we_api/enterprise/replies.py
create mode 100644 sg_wechat_enterprise/we_api/events.py
create mode 100644 sg_wechat_enterprise/we_api/exceptions.py
create mode 100644 sg_wechat_enterprise/we_api/fields.py
create mode 100644 sg_wechat_enterprise/we_api/messages.py
create mode 100644 sg_wechat_enterprise/we_api/oauth/__init__.py
create mode 100644 sg_wechat_enterprise/we_api/parser.py
create mode 100644 sg_wechat_enterprise/we_api/pay/__init__.py
create mode 100644 sg_wechat_enterprise/we_api/pay/api/__init__.py
create mode 100644 sg_wechat_enterprise/we_api/pay/api/coupon.py
create mode 100644 sg_wechat_enterprise/we_api/pay/api/jsapi.py
create mode 100644 sg_wechat_enterprise/we_api/pay/api/micropay.py
create mode 100644 sg_wechat_enterprise/we_api/pay/api/order.py
create mode 100644 sg_wechat_enterprise/we_api/pay/api/redpack.py
create mode 100644 sg_wechat_enterprise/we_api/pay/api/refund.py
create mode 100644 sg_wechat_enterprise/we_api/pay/api/tools.py
create mode 100644 sg_wechat_enterprise/we_api/pay/api/transfer.py
create mode 100644 sg_wechat_enterprise/we_api/pay/base.py
create mode 100644 sg_wechat_enterprise/we_api/pay/utils.py
create mode 100644 sg_wechat_enterprise/we_api/replies.py
create mode 100644 sg_wechat_enterprise/we_api/session/__init__.py
create mode 100644 sg_wechat_enterprise/we_api/session/memcachedstorage.py
create mode 100644 sg_wechat_enterprise/we_api/session/memorystorage.py
create mode 100644 sg_wechat_enterprise/we_api/session/redisstorage.py
create mode 100644 sg_wechat_enterprise/we_api/session/shovestorage.py
create mode 100644 sg_wechat_enterprise/we_api/utils.py
diff --git a/jikimo_system_order/__manifest__.py b/jikimo_system_order/__manifest__.py
index 75a20ebf..7f85ed57 100644
--- a/jikimo_system_order/__manifest__.py
+++ b/jikimo_system_order/__manifest__.py
@@ -30,6 +30,7 @@
'views/notice_user_config.xml',
'views/yizuo_system_order_view.xml',
'views/work_order_number.xml',
+ 'views/res_config_settings_views.xml',
],
# only loaded in demonstration mode
'demo': [
diff --git a/jikimo_system_order/models/__init__.py b/jikimo_system_order/models/__init__.py
index ca081c2e..87b51a43 100644
--- a/jikimo_system_order/models/__init__.py
+++ b/jikimo_system_order/models/__init__.py
@@ -4,3 +4,4 @@ from . import constant
from . import order_classify
from . import system_work_order
from . import work_order_template
+from . import res_config_setting
diff --git a/jikimo_system_order/models/res_config_setting.py b/jikimo_system_order/models/res_config_setting.py
new file mode 100644
index 00000000..44a9a1d7
--- /dev/null
+++ b/jikimo_system_order/models/res_config_setting.py
@@ -0,0 +1,32 @@
+# -*- coding: utf-8 -*-
+
+import logging
+from odoo import api, fields, models, _
+
+_logger = logging.getLogger(__name__)
+
+
+class ResModelWeConfigSettings(models.TransientModel):
+ _inherit = 'res.config.settings'
+
+ lost_agent_id = fields.Char('企微通知应用ID')
+
+ @api.model
+ def get_values(self):
+ """
+ 重载获取参数的方法,参数都存在系统参数中
+ :return:
+ """
+ values = super(ResModelWeConfigSettings, self).get_values()
+ config = self.env['ir.config_parameter'].sudo()
+ lost_agent_id = config.get_param('lost_agent_id', default='')
+ values.update(
+ lost_agent_id=lost_agent_id,
+ )
+ return values
+
+ def set_values(self):
+ super(ResModelWeConfigSettings, self).set_values()
+ ir_config = self.env['ir.config_parameter'].sudo()
+ ir_config.set_param("lost_agent_id", self.lost_agent_id or "")
+
diff --git a/jikimo_system_order/models/system_work_order.py b/jikimo_system_order/models/system_work_order.py
index 19bff200..1a7bff5e 100644
--- a/jikimo_system_order/models/system_work_order.py
+++ b/jikimo_system_order/models/system_work_order.py
@@ -85,7 +85,7 @@ class SystemWorkOrder(models.Model):
# 最终解决方案
solution = fields.Text(string=u'最终解决方案')
# 判断是否为技术人员
- is_technicist = fields.Boolean(string=u'是否为技术人员', default=get_is_technicist)
+ # is_technicist = fields.Boolean(string=u'是否为技术人员', default=get_is_technicist)
# 打分
grade = fields.Selection(GRADE, string=u'评分')
# 评价按钮的显示
diff --git a/jikimo_system_order/views/res_config_settings_views.xml b/jikimo_system_order/views/res_config_settings_views.xml
new file mode 100644
index 00000000..40cdc443
--- /dev/null
+++ b/jikimo_system_order/views/res_config_settings_views.xml
@@ -0,0 +1,28 @@
+
+企微通知应用ID
+