openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #22361
[Bug 1104962] Re: On ir.attachement entity method search doesn't return right order objects
Hello ,
I have checked this issue with latest trunk ,
For other object Its working fine order by if field available in object but If you passed a wrong field to order in search
then it give result in ascending of ids instead of error.
For ir.attachment search does not return order by field.
@Fabio.
Currently 7.0 has no 'revisonid' field.
As you passed order by 'revsionid' there must be a error message Like
ProgrammingError: column "revisionid" does not exist.
So I am confirming this issue for 2 points :
1. Search method should return right order for ir.attchment.
2. If field is not found for order by then there must be Traceback,
ProgrammingError: column "fieldname" does not exist.
Thanks.
** Changed in: openobject-server
Importance: Undecided => Medium
** Changed in: openobject-server
Status: New => Confirmed
** Changed in: openobject-server
Assignee: (unassigned) => OpenERP's Framework R&D (openerp-dev-framework)
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/1104962
Title:
On ir.attachement entity method search doesn't return right order
objects
Status in OpenERP Server:
Confirmed
Bug description:
On release 7.0.1 (server version 7.0-20130111-002202) I have this
method applied to a class referred to ir.attachment entity
def _getlastrev(self, cr, uid, ids, context=None):
result = []
for objDoc in self.browse(cr, uid, ids, context=context):
docIds=self.search(cr,uid,[('name','=',objDoc.name)],order='revisionid',context=context)
result.append(docIds[len(docIds)-1])
return list(set(result))
Resulting docIds list contains not ordered id's of attachments I'm
looking for.
Tested on 6.0.3 version, my code run correctly returning right value, of course, in this case docIds result to have right waited order.
Many Thanks
Fabio
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/1104962/+subscriptions
References