Internal RPC method requests like 'read' should send a list of IDs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OERPLib |
Fix Released
|
Medium
|
Unassigned |
Bug Description
This following request crashes on OpenERP server 6.0.3:
>>> oerp.read(
OpenERP traceback:
Traceback (most recent call last):
File "/home/
return f(self, dbname, *args, **kwargs)
File "/home/
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/
rates=
TypeError: string indices must be integers, not str
To fix that, a list of IDs must be sent:
>>> oerp.read(
[{'rate_ids': [1], 'name': 'EUR', 'rounding': 0.01, 'symbol': u'\u20ac', 'company_id': [1, 'OpenERP S.A.'], 'date': '2012-01-01', 'rate': 1.0, 'base': False, 'active': True, 'id': 1, 'accuracy': 4}]
'read' method is used by the browse functionality, but has to be used with a list of IDs to avoid any problems.
Changed in oerplib: | |
milestone: | none → 0.6.1 |
status: | New → Fix Committed |
Changed in oerplib: | |
milestone: | 0.6.1 → 0.7 |
Changed in oerplib: | |
status: | Fix Committed → Fix Released |