c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #07134
[Bug 366089] Re: Read function inconsistent between orm and orm_memory
Hello Guys,
It has been fixed by revision 2157
ach@xxxxxxxxxxx-20101208124127-z3q9ctf91vur0f5m
Thanks.
** Changed in: openobject-server/5.0
Status: In Progress => Fix Released
** Changed in: openobject-server/5.0
Milestone: None => 5.0.16
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/366089
Title:
Read function inconsistent between orm and orm_memory
Status in OpenObject Server:
Fix Released
Status in OpenObject Server 5.0 series:
Fix Released
Status in OpenObject Server trunk series:
Fix Released
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)):
return result[0]
An easy patch is attached (I tested it quickly).