%|p7mDn;9}Iq|bu
zoRf`RO`IheCAx`zWV-{C=iW#uO1{9UjJM==_ZF5W(ke=Oww&f(?o^AZvWkU*oI}P}
z#j{J2tRS!8suHYpx@>O0ORy9pZ38>3-{(YVF%KQ{uqTcA4YqkUc>bE%py!wh*E(W&
zWW(V807-v#`lk?`qpo
z8Yz8QFz&86s8Ch3H_EbX=D?d9oYdHvt*MPVwr2?W@%7p>WoOKP7utde2*1gdk@-xe
zooPjnSs2=d``99=(ajc<;c3qkx@orVKY1wH#_mwD*Huhu9lKblQ`=do`|`1hyF0hL
zjGbQTqY!r6`^vNR>p9>NLyP3I-)ijCt9%lZdeAjBm!@^?Ds6G0u+RC()a3a4*7F+4
zkK-oh3ksqH5J}J8T9Jr*>5<+qQN|uoCNS8JIC=Y$$x(XbHosDtcS{Ss0axBIaxrwd
z_q}%=)v>lFrlZ==uZ#Ax{{9~j|7Io)ZK|u8s1MHwf3oz>$=@vZkJtK7>#O}Vt~NEf
z4UX^3ot(PzU3kRAK#XOo^fs|=F7}t)^NtI%v+k#ik%n6))Zrl`4JqyU%|9y5^+9VR
zA6ksPSzx@m@wfpG9ck;BJ+!RE{DGuBb!-~cjo01MU
zK8=~e>c}EtFh=f+p(&xkhMj3lXS|v7y4Rk{&3df$!se!WPi(?blOKy;N1km6dSb4}
zR8a0#%L@7XQlRC@jGtDv=WW(TH98)>9NKzr`#o^}X1mK@_pUi&JNo-&!>x(@mrHv)
z0tRpQ#itQM`r8(o^=D=pv?D6-<=Kpm@edt6+WhRHZd`Y>@-#}nqD!``wOMA7)c?*Z
zENhUqHRqPo)9%0*2|n5B{YKA&ZymPx7q{ORD=Y2q&qyO1ZrVJds#QLDpS0~%;YQ5(
zk+2Uol_&4+C{Mo>Wjb^}Xp8!vXQUX(-<Q>nRb&B$%Ob=
zeu-)Hdv;~zjg`zBiBfE1BWcfr_zn$?gWcf^yl+v_TeW*8=uDqBAd3
z?}QJPF+=*m@43|nyvfYo@?FmNUELD~)r&O`6h@bWrZ^!?ldZ4+$gA&O>dVa)2Mb(7
zSEz>v&JI%>PMGLD<~#4p$&VVgSR5FLd9Qk>L-MVldN#0hS8qy#p3F(Js;j}u@5%)O
z{s=w7ir)X2vXbCj>->CloF7<|#Vxl3L_CnKeRx>jt#mgxYw<2L18<=(w00hB@spQUvI4mKb>M%#eE6)LA1mQD!FFp!Box_l9hg3^93Tsx(*4_CHx1+dPMtv7Z
zQm}qxP^RQGiE)o!r%?##RFyy3TWV62gbln~@=A-kyg0j8aPe^R@nwZ`Hv)kZFAQMX
zru#;;EjPBFHcj2rS{LvXs7Vv)U)OG2zE=-S0OvR7>+7u_$_HPaR87o{1OA*;-I@Cf
zc~bj_rn~fual&guF3R70Ln;RK^=nT2l}1-M@m>^J^v+z%P|5H2r>!~eJsp>cDml12
zULJ$ji`BF})!*q1Pmj?R$Qpll6;9VbpI8ZBjyg3V%$q2%;YoW>m;4r1Qb_I7L~d&q
zs)r>?5-M)TjOwlc?rlFA{q0cLoidg4qF?RUKzyEYkGE+ya1Jp)RA=?J2Gs?1lFV@N0cfC=wb4(grcR=%aZ8OxT^e>x1a=_^W#9PMKT2#!Hi(V#o
zjm=qU+Q;L<8Y8@0gHf*6H%|L3Fckx%=~Wk0RibAG5NMLk_IA(2z4c4^z&c>W@z8wp
So9!R}7oF@~D7Wo=qW=r=(43S2
literal 0
HcmV?d00001
diff --git a/jikimo_system_order/views/notice_user_config.xml b/jikimo_system_order/views/notice_user_config.xml
new file mode 100644
index 00000000..353afb96
--- /dev/null
+++ b/jikimo_system_order/views/notice_user_config.xml
@@ -0,0 +1,58 @@
+
+
+
+ # ---------- 工单通知处理人设置 ------------
+
+
+ tree.system.order.notice
+ system.order.notice
+
+
+
+
+
+
+
+
+
+ search.system.order.notice
+ system.order.notice
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 工单处理人
+ system.order.notice
+ tree
+ []
+ {}
+
+
+ [工单处理人] 还没有哦!点左上角的[创建]按钮,沙发归你了!
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jikimo_system_order/views/work_order_number.xml b/jikimo_system_order/views/work_order_number.xml
new file mode 100644
index 00000000..63f0d5a3
--- /dev/null
+++ b/jikimo_system_order/views/work_order_number.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+ seq_work_order
+
+ system.work.order
+ SO%(year)s%(month)s%(day)s
+ 1
+
+
+
+
+ seq_order_template
+
+ work.order.template
+ TL
+ 1
+
+
+
\ No newline at end of file
diff --git a/jikimo_system_order/views/yizuo_system_order_view.xml b/jikimo_system_order/views/yizuo_system_order_view.xml
new file mode 100644
index 00000000..b5de3bcc
--- /dev/null
+++ b/jikimo_system_order/views/yizuo_system_order_view.xml
@@ -0,0 +1,243 @@
+
+
+
+
+
+
+ 工单信息
+ system.work.order
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 新建系统工单
+ system.work.order
+
+
+
+
+
+
+
+ 搜索工单
+ system.work.order
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 工单图表
+ system.work.order
+
+
+
+
+
+
+
+
+
+
+
+ 工单
+ system.work.order
+ tree,form,search,graph,pivot
+
+
+
+
+ 工单模板信息
+ work.order.template
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 新建系统工单模板
+ work.order.template
+
+
+
+
+
+
+
+ 工单模板
+ work.order.template
+ tree,form
+
+
+
+
+ 工单分类信息
+ order.classify
+
+
+
+
+
+
+
+
+
+
+
+ 新建系统分类信息
+ order.classify
+
+
+
+
+
+
+
+ 工单分类
+ order.classify
+ tree,form
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jikimo_system_order/wizard/__init__.py b/jikimo_system_order/wizard/__init__.py
new file mode 100644
index 00000000..8cf586ce
--- /dev/null
+++ b/jikimo_system_order/wizard/__init__.py
@@ -0,0 +1,6 @@
+# -*- coding: utf-8 -*-
+
+from . import order_other_wizard
+from . import order_technician_wizard
+from . import order_close_wizard
+from . import system_work_order_wizard
diff --git a/jikimo_system_order/wizard/order_close_wizard.py b/jikimo_system_order/wizard/order_close_wizard.py
new file mode 100644
index 00000000..ca10ae7c
--- /dev/null
+++ b/jikimo_system_order/wizard/order_close_wizard.py
@@ -0,0 +1,79 @@
+# -*- coding: utf-8 -*-
+
+from odoo import models, fields, api
+from odoo.addons.jikimo_system_order.models.constant import STATE_SELECTION
+from odoo.exceptions import ValidationError
+import datetime, logging
+
+
+class OrderCloseWizard(models.TransientModel):
+ _name = 'order.close.wizard'
+
+
+ def get_context(self):
+ if self._context.get('active_id'):
+ obj = self.env['system.work.order'].browse(self._context.get('active_id'))
+ if obj.initiator_id.id != self.env.user.id:
+ raise ValidationError(u'非本人无法操作')
+ return obj
+
+ order_id = fields.Many2one('system.work.order', string=u'工单ID',
+ default=lambda self: self.get_context().id)
+ # 关闭原因
+ close_cause = fields.Text(string=u'关闭问题原因', default=lambda self: self.get_context().close_cause)
+ # 关闭时间
+ close_time = fields.Datetime(string=u'关闭问题时间', default=fields.datetime.now())
+ # 状态
+ state = fields.Selection(STATE_SELECTION, default='closed', string=u'状态')
+ # 关闭人
+ close_user_id = fields.Many2one('res.users', string=u'关闭人', default=lambda self: self.env.user)
+
+
+ def sure(self):
+ self.order_id.close_cause = self.close_cause
+ self.order_id.close_time = self.close_time
+ if self.order_id.state == 'unconfirmed':
+ state_remark = u'待确认 --> 已关闭'
+ if self.order_id.state == 'pending':
+ state_remark = u'待处理 --> 已关闭'
+ if self.order_id.state == 'processed':
+ state_remark = u'已处理待评分 --> 已关闭'
+ # self.order_id.message_post(u'操作人:%s,操作时间:%s,状态变更过程:%s' % (
+ # self.env.user.name,
+ # (datetime.datetime.now() + datetime.timedelta(hours=8)).strftime('%Y-%m-%d %H:%M:%S'), state_remark))
+ self.order_id.state = self.state
+ self.order_id.close_user_id = self.close_user_id
+ we_employee_ids = []
+ if self.order_id.initiator_id.we_employee_id:
+ we_employee_ids.append(self.order_id.initiator_id.we_employee_id)
+ lost_agent_id = self.env['ir.config_parameter'].sudo().get_param('lost_agent_id')
+ wechat = self.env['we.config'].sudo().get_wechat(agent_id=lost_agent_id)
+ # agent_id, user_ids, content
+ content = """您提交的工单-**工单标题:{0}**-**已关闭**
+ >提交时间:{1}
+ >处理时间:{2}
+ >处理人:{3}
+ 如有问题,请联系系统管理员!
+ """.format(self.order_id.title,
+ (self.order_id.date + datetime.timedelta(hours=8)).strftime(
+ '%Y-%m-%d %H:%M'), (datetime.datetime.now() + datetime.timedelta(
+ hours=8)).strftime('%Y-%m-%d %H:%M'), self.env.user.name or '')
+ # wechat.message.send_markdown(agent_id=lost_agent_id, user_ids=we_employee_ids, content=content)
+ for we_employee_id in we_employee_ids:
+ try:
+ wechat.message.send_markdown(agent_id=lost_agent_id, user_ids=we_employee_id, content=content)
+ except Exception as e:
+ logging.error('工单关闭发送消息异常%s' % str(e))
+ return {}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/jikimo_system_order/wizard/order_other_wizard.py b/jikimo_system_order/wizard/order_other_wizard.py
new file mode 100644
index 00000000..3f6c8710
--- /dev/null
+++ b/jikimo_system_order/wizard/order_other_wizard.py
@@ -0,0 +1,42 @@
+# -*- coding: utf-8 -*-
+
+from odoo import models, fields, api
+from odoo.exceptions import ValidationError
+from odoo.addons.jikimo_system_order.models.constant import STATE_SELECTION, GRADE
+import datetime
+
+
+class OrderOtherWizard(models.TransientModel):
+ _name = 'order.other.wizard'
+
+
+ def get_context(self):
+ if self._context.get('active_id'):
+ obj = self.env['system.work.order'].browse(self._context.get('active_id'))
+ if obj.initiator_id.id != self.env.user.id:
+ raise ValidationError(u'非本人无法操作')
+ return obj
+
+ order_id = fields.Many2one('system.work.order', string=u'工单ID',
+ default=lambda self: self.get_context().id)
+ # 关闭时间
+ close_time = fields.Datetime(string=u'关闭时间', default=fields.datetime.now())
+ # 状态
+ state = fields.Selection(STATE_SELECTION, default='completed', string=u'状态')
+ # 打分
+ grade = fields.Selection(GRADE, string=u'评分')
+ # 关闭人
+ close_user_id = fields.Many2one('res.users', string=u'关闭人', default=lambda self: self.env.user)
+
+
+ def sure(self):
+ self.order_id.close_time = self.close_time
+ self.order_id.grade = self.grade
+ if self.order_id.state == 'processed':
+ state_remark = u'已处理待评分 --> 已完成'
+ # self.order_id.message_post(u'操作人:%s,操作时间:%s,状态变更过程:%s' % (
+ # self.env.user.name,
+ # (datetime.datetime.now() + datetime.timedelta(hours=8)).strftime('%Y-%m-%d %H:%M:%S'), state_remark))
+ self.order_id.state = self.state
+ self.order_id.close_user_id = self.close_user_id
+ return {}
diff --git a/jikimo_system_order/wizard/order_technician_wizard.py b/jikimo_system_order/wizard/order_technician_wizard.py
new file mode 100644
index 00000000..78458038
--- /dev/null
+++ b/jikimo_system_order/wizard/order_technician_wizard.py
@@ -0,0 +1,59 @@
+# -*- coding: utf-8 -*-
+
+from odoo import models, fields, api
+from odoo.addons.jikimo_system_order.models.constant import STATE_SELECTION
+import datetime
+import logging
+
+
+class OrderTechnicianWizard(models.TransientModel):
+ _name = 'order.technician.wizard'
+
+ order_id = fields.Many2one('system.work.order', string=u'工单ID',
+ default=lambda self: self.env.context.get('active_id'))
+ # 解决人
+ solve_people_id = fields.Many2one('res.users', string=u'解决人', default=lambda self: self.env.user)
+ # 用户实际问题
+ users_problem = fields.Text(string=u'用户实际问题')
+ # 最终解决方案
+ solution = fields.Text(string=u'最终解决方案')
+ # 状态
+ state = fields.Selection(STATE_SELECTION, default='processed', string=u'状态')
+
+ def sure(self):
+ self.order_id.solve_people_id = self.solve_people_id
+ self.order_id.users_problem = self.users_problem
+ self.order_id.solution = self.solution
+ if self.order_id.state == 'pending':
+ state_remark = u'待处理 --> 已处理待评分'
+ # self.order_id.message_post(u'操作人:%s,操作时间:%s,状态变更过程:%s' % (
+ # self.env.user.name,
+ # (datetime.datetime.now() + datetime.timedelta(hours=8)).strftime('%Y-%m-%d %H:%M:%S'), state_remark))
+ self.order_id.state = self.state
+ # 获取通知人
+ # objs = self.env['system.order.notice'].search([])
+ # user_ids = objs.notice_user_ids.filtered(lambda item: item.we_employee_id not in ['', False])
+ # we_employee_ids = user_ids.mapped('we_employee_id')
+ we_employee_ids = []
+ if self.order_id.initiator_id.we_employee_id:
+ we_employee_ids.append(self.order_id.initiator_id.we_employee_id)
+ print(we_employee_ids)
+ lost_agent_id = self.env['ir.config_parameter'].sudo().get_param('lost_agent_id')
+ wechat = self.env['we.config'].sudo().get_wechat(agent_id=lost_agent_id)
+ # agent_id, user_ids, content
+ content = """您提交的工单-**工单标题:{0}**-**已处理**
+ >提交时间:{1}
+ >处理反馈:{4}
+ >处理时间:{2}
+ >处理人:{3}
+ 如有问题,请联系系统管理员!
+ """.format(self.order_id.title,
+ (self.order_id.date + datetime.timedelta(hours=8)).strftime('%Y-%m-%d %H:%M'), (datetime.datetime.now() + datetime.timedelta(hours=8)).strftime('%Y-%m-%d %H:%M'), self.env.user.name or '', self.solution or '')
+ # wechat.message.send_markdown(agent_id=lost_agent_id, user_ids=we_employee_ids, content=content)
+ for we_employee_id in we_employee_ids:
+ try:
+ wechat.message.send_markdown(agent_id=lost_agent_id, user_ids=we_employee_id, content=content)
+ except Exception as e:
+ logging.error('工单处理发送消息异常%s' % str(e))
+
+ return {}
diff --git a/jikimo_system_order/wizard/order_wizard.xml b/jikimo_system_order/wizard/order_wizard.xml
new file mode 100644
index 00000000..64c13ccd
--- /dev/null
+++ b/jikimo_system_order/wizard/order_wizard.xml
@@ -0,0 +1,122 @@
+
+
+
+
+
+ 技术员向导
+ order.technician.wizard
+
+
+
+
+
+
+ 技术员编辑
+ ir.actions.act_window
+ order.technician.wizard
+ form
+
+ {'display_default_code':False}
+ new
+
+
+
+
+
+
+ 其它向导
+ order.other.wizard
+
+
+
+
+
+
+ 其它编辑
+ ir.actions.act_window
+ order.other.wizard
+ form
+
+ {'display_default_code':False}
+ new
+
+
+
+
+ 关闭向导
+ order.close.wizard
+
+
+
+
+
+
+ 关闭工单
+ ir.actions.act_window
+ order.close.wizard
+ form
+
+ {'display_default_code':False}
+ new
+
+
+
+ system_work_order_wizard_view
+ system.work.order.wizard
+
+
+
+
+
+
+ 二次确认
+ ir.actions.act_window
+ system.work.order.wizard
+ form
+ new
+
+
+
diff --git a/jikimo_system_order/wizard/system_work_order_wizard.py b/jikimo_system_order/wizard/system_work_order_wizard.py
new file mode 100644
index 00000000..8c8f95dc
--- /dev/null
+++ b/jikimo_system_order/wizard/system_work_order_wizard.py
@@ -0,0 +1,42 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# @Time : 2017/12/12 9:46
+# @Author : GuoXiang
+# @Site :
+# @File : system_work_order_wizard.py
+# @Software: PyCharm
+# @Desc :
+# @license : Copyright©2018 www.dasmaster.com All Rights Reserved.
+# @Contact : xg1230205321@163.com
+from odoo import models, api, fields
+from odoo.exceptions import ValidationError
+
+
+class SystemWorkOrderWizard(models.TransientModel):
+ _name = "system.work.order.wizard"
+ _description = u"追回确认"
+
+
+ def _get_explain(self):
+ if self._context.get('object_id'):
+ obj = self.env['system.work.order'].browse(self._context.get('object_id'))
+ if obj.initiator_id.id != self.env.user.id:
+ raise ValidationError(u'非本人无法操作')
+ if self._context.get('explain'):
+ return self._context["explain"]
+
+ explain = fields.Char(default=_get_explain)
+
+
+ def sure(self):
+ """
+ 确认
+ :return:
+ """
+ if self._context.get('object_id') and self._context.get('object_name') and self._context.get(
+ 'explain') and self._context.get('function_name'):
+ work_sheet_obj = self.env[self._context["object_name"]].search([('id', '=', int(self._context["object_id"]))])
+ class_name = self._context.get('object_name') # 获得对象类名
+ method_name = self._context.get('function_name') # 获得对象的方法
+ obj_function = getattr(self.env[class_name], method_name)
+ obj_function(work_sheet_obj)
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 18/20] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=B7=A5=E5=8D=95?=
=?UTF-8?q?=E6=A8=A1=E5=9D=97=EF=BC=8C=E5=A2=9E=E5=8A=A0=E4=BC=81=E5=BE=AE?=
=?UTF-8?q?=E6=A8=A1=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 @@
+
+
+
+
+ res.config.settings.we.view.form.inherit.bpm
+ res.config.settings
+
+
+
+
+
+
+
+
+
diff --git a/jikimo_system_order/views/yizuo_system_order_view.xml b/jikimo_system_order/views/yizuo_system_order_view.xml
index b5de3bcc..006a085d 100644
--- a/jikimo_system_order/views/yizuo_system_order_view.xml
+++ b/jikimo_system_order/views/yizuo_system_order_view.xml
@@ -27,7 +27,7 @@