openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #16547
[Bug 1065936] Re: Related fields don't honour the search ordering.
Hi,
It seems this bug is effective only when the related field is not stored in DB. Otherwise it works as expected.
But I will assume it as a bug.
Thanks and Regards!
--
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/1065936
Title:
Related fields don't honour the search ordering.
Status in OpenERP Server:
New
Bug description:
Hi,
I caught this bug when I was using XML-RPC to sort my custom model's
record on the basis of name. The 'name' field in my custom model is a
related field to 'Product model'. When tried searching on my model
with name as the order it gave me the same record ids as it gave
without using the order parameter.
My field defintion:
'name': fields.related('product_id', 'name', type='char', string="Name", readonly=True, store=False)
My Test case:
1. proxy.execute('MY_DB', 1, 'a', 'MY_MODEL', 'search', [], 0, 5, 'name asc')
result = [1, 2, 3, 4, 5]
2. proxy.execute('MY_DB', 1, 'a', 'MY_MODEL', 'search', [], 0, 5, 'name desc')
result = [1, 2, 3, 4, 5]
3. proxy.execute('MY_DB', 1, 'a', 'MY_MODEL', 'search', [], 0, 5, 'name asc')
result = [51, 45, 21, 4, 5] , works good as name is a character field here.
I am using V6.1.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/1065936/+subscriptions
References