Issue 64

Title
Sorting on none classic_write field
Priority
bug
Status
resolved
Nosy list
bch, ced, udono
Assigned to
ced
Keywords

Created on 2008-06-04.19:40:39 by udono, last changed 150 months ago by ced.

Messages

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2008-06-10.10:50:23
Fix with changeset 9c1b3c22f280
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2008-06-06.10:22:03
If there is too much records on the list, it can become very expensive.
Because the client needs to read all the records.
I think we can add an new attributes to the fields that are not sortable, to
force the search function to use it.
Example:
For ir.ui.menu complete_name, we can add the attributes that it must use the
name field of the table to sort.
Author: [hidden] (udono) Tryton translator
Date: 2008-06-05.06:25:59
Ok, I understand the problem. Isn't it possible to sort such non _classic_write
Fields on clientside. Or takes this a to long time?
Author: [hidden] (bch) Tryton committer
Date: 2008-06-05.01:12:22
Le Wed, 04 Jun 2008 23:38:02 +0200,
Cédric Krier <issue_tracker@tryton.org> a écrit :

> 
> Cédric Krier <cedric.krier@b2ck.com> added the comment:
> 
> This is because sort on fields function doesn't work. In fact it doesn't work
> for all fields that is not _classic_write (means store in the table of the
> object). So there is two options:
> - Send to the client the field that can be sorted and disable the sort on
> those that can not.
> - Don't raise an exception when trying to sort on field that can not.
> What do you think?

Imho option two will mislead the user, because iirc when one clic on the column
name, the query is re-run on the db (and possibly fetch items that were not on
the screen). Maybe the clever solution is to provide the sorting mechanism if
the client know that all the list has been fetch (20000 items by default) and
do nothing if not. 

> 
> ----------
> assignedto:  -> ced
> component: +tryton, trytond
> nosy: +bch, ced
> status: unread -> chatting
> type:  -> behavior
> 
> _______________________________________________
> Tryton issue tracker <issue_tracker@tryton.org>
> <https://bugs.tryton.org/roundup/issue64>
> _______________________________________________
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2008-06-04.23:38:02
This is because sort on fields function doesn't work. In fact it doesn't work
for all fields that is not _classic_write (means store in the table of the object).
So there is two options:
- Send to the client the field that can be sorted and disable the sort on those
that can not.
- Don't raise an exception when trying to sort on field that can not.
What do you think?
Author: [hidden] (udono) Tryton translator
Date: 2008-06-04.19:40:39
Error

Wrong field name (complete_name) in order!
History
Date User Action Args
2008-06-10 10:50:23cedsetstatus: chatting -> resolved
messages: + msg351
component: - tryton
2008-06-06 22:34:20cedlinkissue73 superseder
2008-06-06 22:21:16cedsettitle: Administration>UI>Menus, klick on Compleate Name to sort -> Sorting on none classic_write field
2008-06-06 10:22:03cedsetmessages: + msg258
2008-06-05 06:25:59udonosetmessages: + msg246
2008-06-05 01:12:22bchsetmessages: + msg245
2008-06-04 23:38:02cedsetstatus: unread -> chatting
component: + tryton, trytond
messages: + msg238
assignedto: ced
nosy: + ced, bch
type: behavior
2008-06-04 19:40:39udonocreate

Showing 10 items. Show all history (warning: this could be VERY long)