tinyerp / erppeek

A versatile tool for Odoo / OpenERP. *** Forked as Odooly ⟶
https://github.com/tinyerp/odooly
Other
171 stars 99 forks source link

read() raises an error with duplicate ids #21

Closed florentx closed 10 years ago

florentx commented 11 years ago

This traceback:

>>> model('res.partner').browse([1, 1]).read()
Traceback (most recent call last):
  File "/srv/openerp/.buildout/eggs/ERPpeek-1.4.5-py2.6.egg/erppeek.py", line 1402, in runcode
    _exec(code, globals())
  File "/srv/openerp/.buildout/eggs/ERPpeek-1.4.5-py2.6.egg/erppeek.py", line 1364, in _exec
    exec('exec code in g')
  File "<string>", line 1, in <module>
  File "<console>", line 1, in <module>
  File "/srv/openerp/.buildout/eggs/ERPpeek-1.4.5-py2.6.egg/erppeek.py", line 1374, in displayhook
    _printer(value)
  File "/usr/lib/python2.6/pprint.py", line 56, in pprint
    printer.pprint(object)
  File "/usr/lib/python2.6/pprint.py", line 114, in pprint
    self._format(object, self._stream, 0, 0, {}, 0)
  File "/usr/lib/python2.6/pprint.py", line 137, in _format
    rep = self._repr(object, context, level - 1)
  File "/usr/lib/python2.6/pprint.py", line 230, in _repr
    self._depth, level)
  File "/usr/lib/python2.6/pprint.py", line 242, in format
    return _safe_repr(object, context, maxlevels, level)
  File "/usr/lib/python2.6/pprint.py", line 318, in _safe_repr
    orepr, oreadable, orecur = _safe_repr(o, context, maxlevels, level)
  File "/usr/lib/python2.6/pprint.py", line 286, in _safe_repr
    vrepr, vreadable, vrecur = saferepr(v, context, maxlevels, level)
  File "/usr/lib/python2.6/pprint.py", line 327, in _safe_repr
    rep = repr(object)
  File "/srv/openerp/.buildout/eggs/ERPpeek-1.4.5-py2.6.egg/erppeek.py", line 1226, in __repr__
    return "<Record '%s,%d'>" % (self._model_name, self.id)
TypeError: %d format: a number is required, not Record