Calendar view doesn't show all items (Month/week and day)

Bug #784397 reported by Pieter van der Merwe
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Web Client
Fix Released
Low
OpenERP Publisher's Warranty Team

Bug Description

If you create a manufacturing production order for some routes, it doesn't show in the calendar view.

More specifically, looking at the code, the calendar view only shows orders for the first 10 groupings (line 253 - 267 of addons/view_calendar/widgets/_base.py).

We have around 380 routes currently set up with around 20 actively used (in future we may do a data cleanup).

Our first 10 routes aren't used often, meaning 99% of the time we cannot see any manufacturing orders in any of the calendar views.

The hard coded filter of 10 needs to be removed or a mechanism needs to be developed to allow changing the filter.

This bug will effect any user that have more than 10 groupings that he wants to view in a calendar.

Steps to reproduce:
1. Manually add routes so the total number of routes are more than 10. Example route1 to route15.
2. Add a manufacturing order and allocate it to a route that is not in the first 10 routes in the system, example route15.
3. Get the order ready to be produced.
4. View the manufacturing calender in the planning menu. The order will not be displayed.

As a test I replaced line 264 (note I replaced search_limit with 0. It is hard coded to 10 in the source):
clr_field = rpc.RPCProxy(self.fields[self.color_field]['relation']).search([], 0, search_limit, 0, ctx)
with
clr_field = rpc.RPCProxy(self.fields[self.color_field]['relation']).search([], 0, 0, 0, ctx)

when I did that, all my orders displayed, regardless of the route I choose.

Having a look at the client GTK code, it doesn't have a hard coded filter value and it correctly displays all entries.

Revision history for this message
Edwin Dsouza(OpenERP) (eds-openerp) wrote :

Hello,

I have your checked your issue and have faced the same problem. So I am confirming this issue.

Please refer the video which I have attached.

Thank you.

Changed in openobject-client-web:
assignee: nobody → OpenERP SA's Web Client R&D (openerp-dev-web)
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Freddy Taborda (terracenter) wrote : Re: [Bug 784397] Re: Calendar view doesn't show all items (Month/week andday)

------Mensaje original------
De: Edwin Dsouza\(OpenERP\)
Remitente: <email address hidden>
Para: <email address hidden>
Responder a: Bug 784397
Asunto: [Bug 784397] Re: Calendar view doesn't show all items (Month/week andday)
Enviado: 19 may, 2011 1:11 AM

Hello,

I have your checked your issue and have faced the same problem. So I am
confirming this issue.

Please refer the video which I have attached.

Thank you.

** Attachment added: "calender.ogv"
   https://bugs.launchpad.net/openobject-client-web/+bug/784397/+attachment/2134590/+files/calender.ogv

** Changed in: openobject-client-web
   Importance: Undecided => Low

** Changed in: openobject-client-web
       Status: New => Confirmed

** Changed in: openobject-client-web
     Assignee: (unassigned) => OpenERP SA's Web Client R&D (openerp-dev-web)

--
You received this bug notification because you are subscribed to OpenERP
Web Client.
https://bugs.launchpad.net/bugs/784397

Title:
  Calendar view doesn't show all items (Month/week and day)

Este mensaje ha sido enviado gracias al servicio BlackBerry de Movilnet

Revision history for this message
Stephane Wirtel (OpenERP) (stephane-openerp) wrote :

Hi all,

We have an OPW ticket on this bug report.

Regards,

Stéphane

Changed in openobject-client-web:
assignee: OpenERP SA's Web Client R&D (openerp-dev-web) → OpenERP Publisher's Warranty Team (openerp-opw)
milestone: none → 6.0.3
description: updated
Revision history for this message
Serge (sboivin) wrote :

To people cant wait the fix (like me)

in web/addcons/view_calendar/widgets/_base.py

class ICalendar, function get_events neat line 253

found code below and put all in comment, for fine for our customer until this bug solve.

#if self.color_field and self.fields[self.color_field].get('relation') and self.color_field not in [item[0] for item in domain]:
        # if self.options and self.options.get('_terp_color_filters'):
        # clr_field = self.options['_terp_color_filters']
        # else:
        # search_limit = 10
        # need_to_add_the_user_to_the_list_of_users = False
        # if self.context and self.color_field and \
        # self.context.get('search_default_user_id') and \
        # self.color_field == 'user_id' and \
        # self.fields[self.color_field].get('relation') == 'res.users':
        # need_to_add_the_user_to_the_list_of_users = True
        # clr_field = rpc.RPCProxy(self.fields[self.color_field]['relation']).search([], 0, search_limit, 0, ctx)
        # if need_to_add_the_user_to_the_list_of_users and self.context.get('search_default_user_id') not in clr_field:
        # clr_field[search_limit-1] = self.context.get('search_default_user_id')

        # domain.append((self.color_field, 'in', clr_field))

*****Note : il you have LOT of event, calendar can take few moment to load.

Changed in openobject-client-web:
status: Confirmed → In Progress
Revision history for this message
Sananaz (Open ERP) (sma-tiny) wrote :

Hello Pieter van der Merwe,

The fix for web-client has been committed to stable web-client branch
with the following revision. Please update your code.

Revision-info:
4648 <email address hidden>

Thanks for reporting.

Changed in openobject-client-web:
status: In Progress → Fix Committed
Changed in openobject-client-web:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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