← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 693330] Re: Calendar View breaks if the data contains a date with value close to the lower threshold (i.e. 1900)

 

** Attachment added: "screenshot_2010-12-22-17:29:03.jpeg"
   https://bugs.launchpad.net/bugs/693330/+attachment/1773431/+files/screenshot_2010-12-22-17%3A29%3A03.jpeg

-- 
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/693330

Title:
  Calendar View breaks if the data contains a date with value close to the lower threshold (i.e. 1900)

Status in OpenObject GTK Client:
  New

Bug description:
  Calendar view of GTK client breaks down when trying to display records that contain a date field with value that is close to the date lowest threshold (1 Jan 1900) (web client tested and worked fine).

The attached screen shot shows the data used for testing.

This bug was shared with Jay(OpenERP) during our technical training (Dec 2010).

The resulting error message from the GTK client is as follow:

Traceback (most recent call last):
  File "/home/heryatmadja/workspace/openerp-training/6.0/trunk/openobject-client/bin/modules/gui/main.py", line 1339, in _sig_child_call
    res = wid.handlers[button_name]()
  File "/home/heryatmadja/workspace/openerp-training/6.0/trunk/openobject-client/bin/modules/gui/window/form.py", line 150, in sig_switch_calendar
    return self.sig_switch(widget, 'calendar')
  File "/home/heryatmadja/workspace/openerp-training/6.0/trunk/openobject-client/bin/modules/gui/window/form.py", line 239, in sig_switch
    self.screen.switch_view(mode=mode)
  File "/home/heryatmadja/workspace/openerp-training/6.0/trunk/openobject-client/bin/widget/screen/screen.py", line 564, in switch_view
    self.current_model.validate_set()
  File "/home/heryatmadja/workspace/openerp-training/6.0/trunk/openobject-client/bin/widget/model/record.py", line 188, in validate_set
    self.reload()
  File "/home/heryatmadja/workspace/openerp-training/6.0/trunk/openobject-client/bin/widget/model/record.py", line 263, in reload
    return self._reload(self.mgroup.mfields.keys() + [CONCURRENCY_CHECK_FIELD])
  File "/home/heryatmadja/workspace/openerp-training/6.0/trunk/openobject-client/bin/widget/model/record.py", line 277, in _reload
    self.set(value)
  File "/home/heryatmadja/workspace/openerp-training/6.0/trunk/openobject-client/bin/widget/model/record.py", line 260, in set
    self.signal('record-changed')
  File "/home/heryatmadja/workspace/openerp-training/6.0/trunk/openobject-client/bin/signal_event.py", line 28, in signal
    fnct(self, signal_data, *data)
  File "/home/heryatmadja/workspace/openerp-training/6.0/trunk/openobject-client/bin/widget/model/group.py", line 310, in _record_changed
    self.signal('model-changed', model)
  File "/home/heryatmadja/workspace/openerp-training/6.0/trunk/openobject-client/bin/signal_event.py", line 28, in signal
    fnct(self, signal_data, *data)
  File "/home/heryatmadja/workspace/openerp-training/6.0/trunk/openobject-client/bin/widget/screen/screen.py", line 443, in _model_changed
    self.display()
  File "/home/heryatmadja/workspace/openerp-training/6.0/trunk/openobject-client/bin/widget/screen/screen.py", line 823, in display
    self.current_view.display()
  File "/home/heryatmadja/workspace/openerp-training/6.0/trunk/openobject-client/bin/widget/view/calendar.py", line 62, in display
    self.view.display(self.screen.models)
  File "/home/heryatmadja/workspace/openerp-training/6.0/trunk/openobject-client/bin/widget/view/calendar_gtk/parser.py", line 333, in display
    self.cal_model.add_events(self.__get_events())
  File "/home/heryatmadja/workspace/openerp-training/6.0/trunk/openobject-client/bin/widget/view/calendar_gtk/parser.py", line 391, in __get_events
    e = self.__get_event(model)
  File "/home/heryatmadja/workspace/openerp-training/6.0/trunk/openobject-client/bin/widget/view/calendar_gtk/parser.py", line 472, in __get_event
    ends= time.localtime(time.mktime(starts)+(h * 60 * 60) + (n * 24 * 60 * 60))
OverflowError: mktime argument out of range







References