[Erp5-dev] listbox - sort by formatted column

bartek bartek at erp5.pl
Wed Jan 24 23:20:07 CET 2007


Hello

What's The Right Way to display a formatted data (e.g. date) in a 
listbox column and at the same time allow sorting by it?

The best solution I could come up with was putting a script like
Base_formatCreationDate(brain, selection)
as a listbox column and then processing kw['sort_on'] in the listboxes 
List Method to replace ('Base_formatCreationDate', 'ascending') with 
('creation_date', 'ascending').

But it doesn't seem to be an elegant solution...

Bartek



More information about the Erp5-dev mailing list