尝试打开客户时出现 Odoo 8 错误

Odoo 8 error when trying to open customer

我在 Ubuntu 上使用 Odoo 8。 我在打开一些客户时遇到问题(有些还可以)。当我尝试打开它进行编辑时,出现 Odoo 服务器错误...IndexError: list index out of range.

知道是什么导致了这个问题吗?我试图搜索类似的问题,但没有找到任何解决方案。因此,当我想编辑客户端时,我必须创建一个新客户端,我也尝试在创建新客户端后合并它们,但错误再次出现。

谢谢,这是完整的回溯:

Odoo Server Error
Traceback (most recent call last):
  File "/opt/odoo/odoo/openerp/http.py", line 530, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/odoo/openerp/http.py", line 567, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/odoo/openerp/http.py", line 303, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/http.py", line 300, in checked_call
    return self.endpoint(*a, **kw)
  File "/opt/odoo/odoo/openerp/http.py", line 796, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/odoo/openerp/http.py", line 396, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/odoo/addons/web/controllers/main.py", line 949, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/opt/odoo/odoo/addons/web/controllers/main.py", line 932, in _call_kw
    records = getattr(request.session.model(model), method)(*args, **kwargs)
  File "/opt/odoo/odoo/openerp/http.py", line 900, in proxy
    result = meth(cr, request.uid, *args, **kw)
  File "/opt/odoo/odoo/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/models.py", line 3109, in read
    result = BaseModel.read(records, fields, load=load)
  File "/opt/odoo/odoo/openerp/api.py", line 239, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/models.py", line 3141, in read
    self._read_from_database(stored)
  File "/opt/odoo/odoo/openerp/api.py", line 239, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/models.py", line 3305, in _read_from_database
    res2 = self._columns[f].get(cr, self._model, ids, f, user, context=context, values=result)
  File "/opt/odoo/odoo/openerp/osv/fields.py", line 1361, in get
    result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
  File "/opt/odoo/odoo/addons/account/partner.py", line 246, in _invoice_total
    result[partner.id] = sum(inv.user_currency_price_total for inv in invoices)
  File "/opt/odoo/odoo/addons/account/partner.py", line 246, in <genexpr>
    result[partner.id] = sum(inv.user_currency_price_total for inv in invoices)
  File "/opt/odoo/odoo/openerp/fields.py", line 760, in __get__
    self.determine_value(record)
  File "/opt/odoo/odoo/openerp/fields.py", line 853, in determine_value
    record._prefetch_field(self)
  File "/opt/odoo/odoo/openerp/api.py", line 239, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/models.py", line 3196, in _prefetch_field
    result = records.read(list(fnames), load='_classic_write')
  File "/opt/odoo/odoo/openerp/api.py", line 239, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/models.py", line 3141, in read
    self._read_from_database(stored)
  File "/opt/odoo/odoo/openerp/api.py", line 239, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/models.py", line 3292, in _read_from_database
    res2 = self._columns[fs[0]].get(cr, self._model, ids, fs, user, context=context, values=result)
  File "/opt/odoo/odoo/openerp/osv/fields.py", line 1361, in get
    result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
  File "/opt/odoo/odoo/addons/account/report/account_invoice_report.py", line 40, in _compute_amounts_in_user_currency
    currency_rate_id = currency_rate_obj.search(cr, uid, [('rate', '=', 1)], limit=1, context=context)[0]
IndexError: list index out of range

在 currency_rate_id 的搜索中,搜索函数得到一个空列表,而您正在尝试 select 导致错误的空列表中的第一个元素

解决方案是为货币添加汇率。

1 - 设置->公司
2 - 编辑您的公司
3 - 修改货币更新配置
4 - 为 "Currencies to update" 选项卡

添加值

图片 1

图 2

图 3