c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #22909
[Bug 771941] Re: project_task_work needs some more indices
this example is also the (good) reason why I strongly vote for moving the
_order clause from py to xml
depending which key is used to access the table, the required sort-order
is different.
from task -> order by date,user_id.name
from timesheet -> order by date, task_id.name
from user -> order by date,task_id.name
* it looks like date is at least on index needed for all these
from analytics -> order by task_id.name, date
and may be some other combinations.
Idea: general method available for each model
object.sort(field1 asc/desc ,field2,,....) which returns sorted (translated) results (ids).
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/771941
Title:
project_task_work needs some more indices
Status in OpenERP Modules (addons):
Confirmed
Bug description:
things are a bit slow without indices , it's likely to be a big table
class project_work(osv.osv):
_columns = {
'date': fields.datetime('Date', select="1"),
'task_id': fields.many2one('project.task', 'Task', ondelete='cascade', required=True, select="1"),
'user_id': fields.many2one('res.users', 'Done by', required=True, select="1"),
References