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

时间:2015-05-11 18:10:09

标签: openerp odoo openerp-8 odoo-8

我在Ubuntu上使用Odoo 8。 我有问题打开一些客户(有些是好的)。当我尝试打开它进行编辑时,我得到Odoo服务器错误... IndexError:列表索引超出范围。

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

谢谢你,这里是完整的追溯:

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

1 个答案:

答案 0 :(得分:1)

在搜索currency_rate_id时,搜索功能正在获取一个空列表,并且您正在尝试从空列表中选择导致错误的第一个元素