"Order by" in meetings not working due to get_recurrent_ids(def search) method of calendar.event

Bug #1023322 reported by Carlos Liebana
38
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
OpenERP R&D Addons Team 1

Bug Description

Ok, maybe this is the strangest bug I've ever found in OpenERP, and it's driving us kind of crazy.

In the list view of meetings, when trying to sort the columns: Subject, Responsible, Date... nothing happens. We can't explain why because as far as we know the sorting function is something related to the framework itself and should work in the same way for all the objects.

You can try with the latest runbot http://6_1_13446.runbot.openerp.com

We are going to investigate further, but some previous advice or related bugs are welcome.

Related branches

Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
Carlos Liebana (carlos-liebana) wrote :

You have not sort the columns in the list view, press any header and you will see ;)

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Carlos,

Yes, you are right. Meeting view not sorted by order (this is only one view which is not sorted) but the problem doesn't come from the framework side it works well. Actually problem comes form the addons side.

Let me explain in detail.

crm.meeting is inherit the calendar.event object and when we are trying to sort the record it will call the search method of calendar.event which is fine. But when 'virtual_id' in context it will call the get_recurrent_ids function (which is generated the problem). Just check the base_calender/base_calender.py 's line#1328-29, get_recurrent_ids function gives the ids based on start date and end date of calendar views. So it will return the ids on sorted manner because we have used a set method on it which will removed the duplicated ids also sorted the ids. Additionally we have called server's super method before get_recurrent_ids which gives the correct order by. But after the get_recurrent_ids call it will give every time sorted list of ids.

That's every time you got a same result and order by are working of def search method. So it should be fix from addons side that's why I am assigning this to respective addons team.

Hope this will clear.

Thank you!

summary: - "Order by" in meetings
+ "Order by" in meetings not working due to get_recurrent_ids(def search)
+ method of calendar.event
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 1 (openerp-dev-addons1)
importance: Undecided → Low
status: Incomplete → Confirmed
Revision history for this message
Vijaykumar Baladaniya (OpenERP) (vba) wrote :

Hello,

    It has been Fixed in https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1023322-vba
    Revision ID: <email address hidden>
    Revision NO: 7446

Thanks,
  vba

Changed in openobject-addons:
status: Confirmed → Fix Committed
Revision history for this message
Zoli (sz-zoly7) wrote :

The fix is good, but fails with recurring events.

Revision history for this message
Felix Schubert (input-fescon) wrote :

This fix doesn't work in V7!

Revision history for this message
Lorenzo Battistini (elbati) wrote :

bug not fixed for 7.0

Changed in openobject-addons:
status: Fix Committed → Confirmed
Revision history for this message
Erik Heeren (erik-heeren) wrote :

A fix for the issue on v7 is attached.

Revision history for this message
Martin Trigaux (OpenERP) (mat-openerp) wrote :

Hello guys,

Thanks to Erik's patch we have finally merged a solution for this issue in 7.0.
I have changed a bit the patch to integrated the sorting while generating the recurrent events for better performances.

Regards

revno: 9747 [merge]
revision-id: <email address hidden>

Changed in openobject-addons:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.