[6.0.3] Show events of the current interval date

Bug #873399 reported by Quentin Peyramale (ADN)
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Confirmed
Low
OpenERP Publisher's Warranty Team

Bug Description

Hello.

In calendar view:

The function get_recurrent_ids in base_calendar.py returns the list without considering the current interval of dates (month,week,day). The list depends on the order of reading the ids and the limit (100 by default) so it's a random list.

Add an 'order by' in the initial select make the deal for get the lasts events. But the older are affected, so many are not visible.

I find a real solution a little further in the code, with this piece of code:

for data in cr.dictfetchall():
                start_date = base_start_date and datetime.strptime(base_start_date[:10]+ ' 00:00:00' , "%Y-%m-%d %H:%M:%S") or False
                until_date = base_until_date and datetime.strptime(base_until_date[:10]+ ' 23:59:59', "%Y-%m-%d %H:%M:%S") or False
                print 'start_date', start_date
                print 'until_date', until_date
                if count > limit:
                    break
                event_date = datetime.strptime(data['date'], "%Y-%m-%d %H:%M:%S")
                #To check: If the start date is replace by event date .. the event date will be changed by that of calendar code
                start_date = event_date ->!!!!!

Why replace start_date by event_date? What does "To check" mean?
If i comment "start_date = event_date", the list become the ids between the start_date and until_date, and everything work beautiful. I have all my events (until the limit) each month (and week,day).

Can you enlightened me?
Thanks

Revision history for this message
Vishal Parmar(Open ERP) (vpa-openerp) wrote :

Hello Quentin Peyramale,

I have checked your issue with latest trunk and base calender already improve in trunk version, it is working fine at

my end would you please check with updated code, if you still face same problem then please informed us so we

can reproduce same at our end.

Thanks and waiting for your reply.

Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
Quentin Peyramale (ADN) (peyramale-q) wrote :

Thanks for your response,

but it is just the point: it's in trunk (so 6.1) and not on stable version (6.0.3).
The current customers are disadvantages.
It's a pity.

Revision history for this message
Vishal Parmar(Open ERP) (vpa-openerp) wrote :

Hello Quentin Peyramale,

I have again checked in trunk it is working fine at my end. start date and event date both are different. would you please check it again in latest updated code of trunk and informed us where you faced the problem.

Thanks and waiting for your reply.

Amit Parik (amit-parik)
Changed in openobject-addons:
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
importance: Undecided → Low
status: Incomplete → Confirmed
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.