c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #09902
[Bug 683169] Re: Graph fails if date field is empty (patch included)
Thank you, it works.
--
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/683169
Title:
Graph fails if date field is empty (patch included)
Status in Qt/KDE OpenObject Client:
Fix Released
Bug description:
Hello!
If you have a graph with a dates on the x axis and some of the records have an empty date, the bar chart fails.
Example view:
<graph string="Sales by Products" type="bar">
<field name="date"/>
<field name="price_total" operator="+"/>
<field group="True" name="product_id"/>
</graph>
Traceback (most recent call last):
File "Koo/Dialogs/KooMainWindow.py", line 782, in callChildView
res = wid.handlers[action]()
File "Koo/Dialogs/FormWidget.py", line 278, in switchView
self.screen.switchView( viewType )
File "Koo/Screen/Screen.py", line 481, in switchView
self.display()
File "Koo/Screen/Screen.py", line 826, in display
self.currentView().display(self.currentRecord(), self.group)
File "Koo/View/Chart/ChartView.py", line 53, in display
self.widget.display(models)
File "Koo/View/Chart/ChartGraphicsView.py", line 131, in display
date = time.strptime(m.value(x), DT_FORMAT)
File "/usr/lib/python2.6/_strptime.py", line 454, in _strptime_time
return _strptime(data_string, format)[0]
File "/usr/lib/python2.6/_strptime.py", line 322, in _strptime
found = format_regex.match(data_string)
TypeError: expected string or buffer
References