openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #22263
[Bug 1104962] [NEW] On ir.attachement entity method search doesn't return right order objects
Public bug reported:
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
** Affects: openobject-server
Importance: Undecided
Status: New
--
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:
New
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
Follow ups
References