On 18 Sep., 20:38, [email protected] wrote:
> http://codereview.tryton.org/113002/diff/1/tryton/common/datetime_str...
> File tryton/common/datetime_strftime.py (right):
>
> http://codereview.tryton.org/113002/diff/1/tryton/common/datetime_str...
> tryton/common/datetime_strftime.py:15: year, month, day  =
> dt.isoformat().split('-')
> Don't understand why you change this code
It seemed, that this code did not handle some formats the right way.
For example
date_strftime(d, '%Y-%m-%d') cuts off leading zeros. The code in
Calendar.display that added leading zeros to the format, looked like a
work
around for this. Maybe this is a simpler approach.

> http://codereview.tryton.org/113002/diff/1/tryton/gui/window/view_for...
> File tryton/gui/window/view_form/model/field.py (right):
>
> http://codereview.tryton.org/113002/diff/1/tryton/gui/window/view_for...
> tryton/gui/window/view_form/model/field.py:224: return value
> get_client must return a str
I changed this

> http://codereview.tryton.org/113002/diff/1/tryton/gui/window/view_for...
> File tryton/gui/window/view_form/view/form_gtk/calendar.py (right):
>
> http://codereview.tryton.org/113002/diff/1/tryton/gui/window/view_for...
> tryton/gui/window/view_form/view/form_gtk/calendar.py:81: date =
> datetime.date(*time.strptime(value, self.format)[:3])
> Why duplicate the code?
The aim was to prevent converting the date back and forth between str
and
datetime.date.

> http://codereview.tryton.org/113002/diff/1/tryton/gui/window/view_for...
> tryton/gui/window/view_form/view/form_gtk/calendar.py:94: value =
> datetime_strftime(value, self.format)
> Why not keeping the year fix?
I dont understand.
> http://codereview.tryton.org/113002/

-- 
[email protected] mailing list

Reply via email to