cd-feng / odoodingtalk Goto Github PK
View Code? Open in Web Editor NEWOdoo系统集成钉钉
License: GNU General Public License v2.0
Odoo系统集成钉钉
License: GNU General Public License v2.0
报错:
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 245, in execute
res = self._obj.execute(query, params)
psycopg2.ProgrammingError: syntax error at or near ")"
LINE 1: SELECT id FROM "ir_cron" WHERE id IN () FOR UPDATE NOWAIT
截图如下:
补充:
安装base完成后马上填写钉钉参数,保存成功,不报错。
报错原因是:安装完成base模块后,不填写参数,继续安装odooDingTalk其他的模块(如日志和人事和回调等模块)此时填写参数会报上述错误。
odoo.tools.convert.ParseError: "External ID not found in the system: ali_dindin.dd_setting_group" while parsing file:/e:/odoo/source/suxuefeng/odoodingding/dindin_callback/views/call_back_list.xml:43, near
13版
在 审批-->审批模型 中,建立一条记录,与某个模型关联后,被关联的模型就无法建立新记录了。前端页面出错提示:
psycopg2.errors.UndefinedColumn: column "dd_approval_result" of relation "hr_employee" does not exist
LINE 1: ..., "company_id", "country_id", "country_of_birth", "dd_approv...
^
原因是 setup_dingtalk_approval_state_fields 函数中添加的dd_开头的字段,也出现在SQL中了,后台显示如下:
odoo.sql_db: bad query: INSERT INTO "hr_leave" ("id", "create_uid", "create_date", "write_uid", "write_date", "date_from", "date_to", "dd_approval_result", "dd_approval_state", "department_id", "employee_id", "holiday_status_id", "holiday_type", "name", "number_of_days", "report_note", "request_date_from", "request_date_from_period", "request_date_to", "request_hour_from", "request_hour_to", "request_unit_custom", "request_unit_half", "request_unit_hours", "state", "user_id") VALUES (nextval('hr_leave_id_seq'), 2, (now() at time zone 'UTC'), 2, (now() at time zone 'UTC'), '2020-09-08 08:00:00', '2020-09-08 17:00:00', 'load', 'draft', NULL, 1, 1, 'employee', 'ec.zhflash.com', 1.0, NULL, '2020-09-08', 'am', '2020-09-08', NULL, NULL, false, false, false, 'confirm', 2) RETURNING id
ERROR: column "dd_approval_result" of relation "hr_leave" does not exist
LINE 1: ...write_uid", "write_date", "date_from", "date_to", "dd_approv...
^
有关回调管理的若干问题
1.如果我更改了钉钉配置环境(企业CorpId等),想本地数据库删除旧的回调列表(已注册),会提示回调地址已不存在,无法删除。
2.如果已经存在一条回调行,我再新建一条回调事件并注册,会提示注册失败!
原因:返回文本非success
13.020200417 正常, 报错是自己安装成了12的分支,问题较多。改为13分支就好了
为了规范命名,同时接轨国际化,建议将dindin 或dingding 统一改成dingtalk
我们检查发现,是在员工模块中调用“创建系统用户”功能时,虽然成功建立了系统用户,但是 ding_user_id 和 ding_user_phone没用正确写入res_users数据表(这两个字段都是空)导致的问题,但是,看了你写的代码下来,感觉都是正确的,麻烦你可以帮忙查一下是什么原因吗?谢谢
@suxuefeng20
复现步骤
当前的user已经同步到钉钉,再建立一个普通员工(未绑定钉钉),也关联到这个user,这个时候打开钉钉模块,会出现下面错误:
Odoo Server Error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/models.py", line 4689, in ensure_one
_id, = self._ids
ValueError: too many values to unpack (expected 1)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 658, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 312, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/usr/lib/python3/dist-packages/odoo/http.py", line 700, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 344, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 337, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 943, in call
return self.method(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 517, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 962, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 954, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 745, in call_kw
return _call_kw_model(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 718, in _call_kw_model
result = method(recs, *args, **kwargs)
File "/home/lxd/odoo/odoo-dingtalk/dingtalk_approval/models/approval_template.py", line 68, in get_get_template_number_by_user
if emp and emp.din_id:
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 978, in get
record.ensure_one()
File "/usr/lib/python3/dist-packages/odoo/models.py", line 4692, in ensure_one
raise ValueError("Expected singleton: %s" % self)
ValueError: Expected singleton: hr.employee(1, 38)
decodeRes = aesDecode.decrypt(content)[20:].decode().replace(self.key, '')
打断点跟了一下,发现 aesDecode.decrypt(content)[20:].decode() 转字符是提示 {UnicodeDecodeError}'utf-8' codec can't decode bytes in position 0-1: invalid continuation byte,
进入考勤的koisk 模式,选择员工报错。
另外admin用户(未关联钉钉)进入钉钉仪表盘也会报同样的错误。
Uncaught TypeError: Cannot read property 'append' of undefined
http://192.168.31.93:8069/web/content/753-d3313a9/web.assets_backend.js:3359
Traceback:
TypeError: Cannot read property 'append' of undefined
at Class.renderButtons (http://192.168.31.93:8069/web/content/753-d3313a9/web.assets_backend.js:3359:694)
at Class. (http://192.168.31.93:8069/web/content/556-781c308/web.assets_common.js:3541:371)
at Class.renderButtons (http://192.168.31.93:8069/web/content/753-d3313a9/web.assets_backend.js:3364:408)
at Class. (http://192.168.31.93:8069/web/content/556-781c308/web.assets_common.js:3541:371)
at Class.renderButtons (http://192.168.31.93:8069/web/content/753-d3313a9/web.assets_backend.js:3399:271)
at Class. (http://192.168.31.93:8069/web/content/556-781c308/web.assets_common.js:3541:371)
at Class.renderButtons (http://192.168.31.93:8069/web/content/753-d3313a9/web.assets_backend.js:3529:225)
at Class.renderButtons (http://192.168.31.93:8069/web/content/556-781c308/web.assets_common.js:3541:371)
at Class._renderControlPanelElements (http://192.168.31.93:8069/web/content/753-d3313a9/web.assets_backend.js:1294:175)
at Class.start (http://192.168.31.93:8069/web/content/753-d3313a9/web.assets_backend.js:1286:1427)
是否可在其中加入指定审批人和抄送人功能
是否考虑适配 15.0?
在部门列表中,勾选2个或2个以上部门进行删除,会报错。
注意:删除部门同步到钉钉未勾选。
Odoo Server Error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/models.py", line 4689, in ensure_one
_id, = self._ids
ValueError: too many values to unpack (expected 1)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 658, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 312, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/usr/lib/python3/dist-packages/odoo/http.py", line 700, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 344, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 337, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 943, in call
return self.method(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 517, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 962, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 954, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 749, in call_kw
return _call_kw_multi(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 736, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/home/lxd/odoo/odoo-dingtalk/ali_dingtalk/models/department.py", line 77, in unlink
din_id = self.din_id
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 978, in get
record.ensure_one()
File "/usr/lib/python3/dist-packages/odoo/models.py", line 4692, in ensure_one
raise ValueError("Expected singleton: %s" % self)
ValueError: Expected singleton: hr.department(33, 29)
File "D:\Bitnami\odoo13\apps\odoo\Lib\site-packages\odoo-13.0.post20200515-py3.7.egg\odoo\modules\loading.py", line 420, in load_modules
loaded_modules, update_module, models_to_check)
File "D:\Bitnami\odoo13\apps\odoo\Lib\site-packages\odoo-13.0.post20200515-py3.7.egg\odoo\modules\loading.py", line 312, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "D:\Bitnami\odoo13\apps\odoo\Lib\site-packages\odoo-13.0.post20200515-py3.7.egg\odoo\modules\loading.py", line 179, in load_module_graph
load_openerp_module(package.name)
File "D:\Bitnami\odoo13\apps\odoo\Lib\site-packages\odoo-13.0.post20200515-py3.7.egg\odoo\modules\module.py", line 365, in load_openerp_module
import('odoo.addons.' + module_name)
File "D:\Bitnami\odoo13\apps\odoo\Lib\site-packages\odoo-13.0.post20200515-py3.7.egg\odoo\addons\dingtalk_base_init_.py", line 7, in
from . import tools
File "D:\Bitnami\odoo13\apps\odoo\Lib\site-packages\odoo-13.0.post20200515-py3.7.egg\odoo\addons\dingtalk_base\tools_init_.py", line 6, in
from . import dingtalk_api
File "D:\Bitnami\odoo13\apps\odoo\Lib\site-packages\odoo-13.0.post20200515-py3.7.egg\odoo\addons\dingtalk_base\tools\dingtalk_api.py", line 27, in
mem_storage = MemoryStorage()
NameError: name 'MemoryStorage' is not defined
需要将列表中的秘钥类型改为密码,不显示出来
1.钉钉个人消息与odoo消息互通。
2.钉钉群与odoo渠道互通。
3.odoo全局事件消息可同过钉钉工作通知发送。
请问支持待办吗? 是否支持付费升级到14版本的支持?
pip3 install -r $PATH/requirements.txt 注意$PATH為你的實際路徑!
特別強調要在運行odoo的python3中安裝相關項重要事項說三遍
這個怎麼安裝,odoo都沒有辦法安裝成功
勾选2个或2个以上员工进行同时删除,会报错。
注意:删除员工时自动同步至钉钉未勾选。
Odoo Server Error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/models.py", line 4689, in ensure_one
_id, = self._ids
ValueError: too many values to unpack (expected 1)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 658, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 312, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/usr/lib/python3/dist-packages/odoo/http.py", line 700, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 344, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 337, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 943, in call
return self.method(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 517, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 962, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 954, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 749, in call_kw
return _call_kw_multi(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 736, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/home/lxd/odoo/odoo-dingtalk/ali_dingtalk/models/employee.py", line 101, in unlink
userid = self.din_id
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 978, in get
record.ensure_one()
File "/usr/lib/python3/dist-packages/odoo/models.py", line 4692, in ensure_one
raise ValueError("Expected singleton: %s" % self)
ValueError: Expected singleton: hr.employee(36, 34)
建议拉取考勤不用每次只能隔7天,这样太麻烦了。
目前将钉钉考勤的打卡结果记录直接存储到odoo的check_in字段中,导致odoo原生的check_in 与out无法使用,因为odoo的考勤记录是每个checkin必须对应一个checkout,每个班次有了签到,必须匹配一个签出。也就是说,odoo考勤还没有缺卡(漏打卡)的概念。
Odoo Server Error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 658, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 312, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/usr/lib/python3/dist-packages/odoo/http.py", line 700, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 344, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 337, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 943, in call
return self.method(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 517, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 962, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 954, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 745, in call_kw
return _call_kw_model(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 718, in _call_kw_model
result = method(recs, *args, **kwargs)
File "/home/lxd/odoo/odoodingding/dindin_attendance/models/simplegroups.py", line 63, in get_simple_groups
for emp in group.get('manager_list'):
TypeError: 'NoneType' object is not iterable
钉钉同步后在odoo里所有员工都是男性未婚,女同胞有意见的。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.