我是靠谱客的博主 默默树叶,最近开发中收集的这篇文章主要介绍odoo开发笔记 -- 异常信息处理汇总,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

1

Traceback (most recent call last):
  File "/home/odoo/odooshare/at_cloud_logistics/odoo/http.py", line 638, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/odoo/odooshare/at_cloud_logistics/odoo/http.py", line 675, in dispatch
    result = self._call_function(**self.params)
  File "/home/odoo/odooshare/at_cloud_logistics/odoo/http.py", line 331, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/odoo/odooshare/at_cloud_logistics/odoo/service/model.py", line 119, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/odoo/odooshare/at_cloud_logistics/odoo/http.py", line 324, in checked_call
    result = self.endpoint(*a, **kw)
  File "/home/odoo/odooshare/at_cloud_logistics/odoo/http.py", line 933, in __call__
    return self.method(*args, **kw)
  File "/home/odoo/odooshare/at_cloud_logistics/odoo/http.py", line 504, in response_wrap
    response = f(*args, **kw)
  File "/home/odoo/odooshare/at_cloud_logistics/addons/web/controllers/main.py", line 885, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/home/odoo/odooshare/at_cloud_logistics/addons/web/controllers/main.py", line 877, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/home/odoo/odooshare/at_cloud_logistics/odoo/api.py", line 679, in call_kw
    return call_kw_model(method, model, args, kwargs)
  File "/home/odoo/odooshare/at_cloud_logistics/odoo/api.py", line 664, in call_kw_model
    result = method(recs, *args, **kwargs)
  File "/home/odoo/odooshare/at_cloud_logistics/custom_addons/cus_center/models/work_sheet_extend.py", line 61, in create
    self.env['cus_center.customs_order'].create(dic)
  File "/home/odoo/odooshare/at_cloud_logistics/custom_addons/cus_center/models/customs_order.py", line 173, in create
    result = super(CustomsOrder, self).create(vals)
  File "/home/odoo/odooshare/at_cloud_logistics/addons/mail/models/mail_thread.py", line 228, in create
    thread = super(MailThread, self).create(values)
  File "/home/odoo/odooshare/at_cloud_logistics/odoo/models.py", line 3830, in create
    record = self.browse(self._create(old_vals))
  File "/home/odoo/odooshare/at_cloud_logistics/odoo/models.py", line 3925, in _create
    cr.execute(query, tuple(u[2] for u in updates if len(u) > 2))
  File "/home/odoo/odooshare/at_cloud_logistics/odoo/sql_db.py", line 141, in wrapper
    return f(self, *args, **kwargs)
  File "/home/odoo/odooshare/at_cloud_logistics/odoo/sql_db.py", line 218, in execute
    res = self._obj.execute(query, params)
ProgrammingError: can't adapt type 'cus_args.trade_terms'


没有加 多对一 .id 就会报上方的错误




异常处理2
TypeError: list indices must be integers, not tuple


检查你后台返回的数据格式,可能是字典,json,或者列表数据类型的数据中,少写了个逗号!!!!

 

2

 

转载于:https://www.cnblogs.com/hellojesson/p/9018646.html

最后

以上就是默默树叶为你收集整理的odoo开发笔记 -- 异常信息处理汇总的全部内容,希望文章能够帮你解决odoo开发笔记 -- 异常信息处理汇总所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(47)

评论列表共有 0 条评论

立即
投稿
返回
顶部