Read function inconsistent between orm and orm_memory
Bug #366089 reported by
Xavier Fernandez http://www.smile.fr
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) | Status tracked in Trunk | |||||
5.0 |
Fix Released
|
Undecided
|
Anup(SerpentCS) | |||
Trunk |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
In orm.py:
The function read in orm object is designed to return a single dictionnary if the argument 'ids' is a single id and a list of dictionnary if 'ids' is itself a list.
The function read in orm_memory seems to have been designed to do the same but currently it can only return a list:
'ids' is tested at the beginning but is also modified:
if isinstance(ids, (int, long)):
ids = [ids]
making the last check located a few lines later totally useless:
if isinstance(ids, (int, long)):
An easy patch is attached (I tested it quickly).
Related branches
To post a comment you must log in.
fixed in trunk.