Em 06/05/2014 18:20, Cédric Krier escreveu:
On 06 May 18:06, Iasmini - Gmail wrote:
I updated the server and the client to 3.2 and when I try to create a new
work_order it gives me this error:
File "/opt/tryton/tryton/gui/window/form.py", line 335, in sig_new
self.screen.new()
File "/opt/tryton/tryton/gui/window/view_form/screen/screen.py", line 453,
in new
self.display()
File "/opt/tryton/tryton/gui/window/view_form/screen/screen.py", line 706,
in display
view.display()
File "/opt/tryton/tryton/gui/window/view_form/view/form.py", line 121, in
display
widget.display(record, field)
File "/opt/tryton/tryton/gui/window/view_form/view/form_gtk/calendar.py",
line 66, in display
value = field.get_client(record)
File "/opt/tryton/tryton/gui/window/view_form/model/field.py", line 217,
in get_client
value = common.timezoned_date(value)
File "/opt/tryton/tryton/common/common.py", line 1523, in timezoned_date
return date.replace(tzinfo=szone).astimezone(lzone)
It seems you got a string instead of a datetime.date for a Date field.
I found out why the error. I was using the function of Tryton
Date_.today() to set the default in a datetime field. I changed to
datetime.datetime.now()
Thank you.
--
Iasmini Gomes
Sílex Sistemas
www.silexsistemas.com.br
---
Este email está limpo de vírus e malwares porque a proteção do avast! Antivírus
está ativa.
http://www.avast.com