Re: [tryton] Unable to display timezone-aware date on reports

2018-03-13 Thread Khurram Shahzad
Thank you so much for your kind response.

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/e63afdbb-508d-4db5-ba75-f9f004006124%40googlegroups.com.


Re: [tryton] Unable to display timezone-aware date on reports

2018-03-12 Thread Cédric Krier
On 2018-03-11 23:48, Khurram Shahzad wrote:
> My question is, is there any way that we can do this adjustment in the
> report and eliminate the need of writing/calling method just to get
> the date adjusted?

There will always be the need to call a method with the proper timezone
to use.
There is https://bugs.tryton.org/issue7202 which aims to simplify the work.

> By the way, I tried to use the same line to adjust the date but it gives 
> error on 'pytz'.

Normal timezone applies only on datetime, there is no timezone for date
(as the name implies).

> How can I import it in my reports? And, which python packages are by-default 
> available in reports?

The default context in Report has only datetime module everything else
must be adding by override Report.get_context.

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: cedric.kr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/20180312091101.GJ11830%40kei.