Dates before 01/01/1900 crashes the GUI

Bug #568513 reported by Similys
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Web Client
Fix Released
Wishlist
OpenERP R&D Web Team

Bug Description

We are developping a cemetery management module in openERP.

We have dead people who were born before 1900.

We have found two problems in openerp-web:

1 - The date control calendar is restricted and cannot go below 01/01/1900

2 - There are validation errors raised from openerp/i18n/format.py when trying to save

Point 1, the javascript widget can be easily fixed in

 openerp/static/calandar/calendar.js

 => find:

  param_default("range",[1900,2999])

 => and replace with:

  param_default("range",[1,2999])

Point 2, replace in

 openerp/i18n/format.py

 => find the two occurances of:

  return time.strftime(server_format, value)

 => and replace with:

  return mx.DateTime.Date(value[0],value[1],value[2],value[3],value[4],value[5]).strftime(server_format)

Question: how should I process if I want this fix to be included in the trunk of openerp-web ?
 What is the process ? Who is doing quality checking ?

Thanks for your support,

Tristan - Similys

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

The usual way would be to either create your own branch and propose a merge, or create a patch and attach it on this bug.

Now on your proposals, I have yet to check to code paths you're mentioning but from a quick reading of your comment:
* have you tested them on your side? I don't know if the server itself can handle that kind of ranges
* the first change is ok, though I doubt there is a real need to handle 3000 years, maybe a start date in the 1700s or 1800s would be sufficient no?
* the second fix doesn't look very good, and mx.DateTime isn't used anymore in trunk. I would suggest checking how others have solved that issue (I'm sure openerp-web isn't the first package ever to encounter this limitation of Python) and learn from it. For instance, Django has an utility package specifically for that kind of troubles (http://code.djangoproject.com/browser/django/trunk/django/utils/datetime_safe.py), as long as we include django's copyright notice in the file I believe we could use it to no ill effect.

Changed in openobject-client-web:
assignee: nobody → OpenERP SA's Web Client R&D (openerp-dev-web)
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Navrang Oza (noz-tiny) wrote :

Hello Similys,

What is status at your side for Xavier's comment on your bug ?
Did you check this from your side ?

You are still facing this problem ?

Please check it once.
Thanks.

Changed in openobject-client-web:
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.