Hi, this is my code:
In models.py:
%%%something here%%%
my_field = fields.DateTime('MyField')
%%%something here%%%
In views.xml:
%%%something here%%%
<tree>
%%%something here%%%
<field name="my_field" />
%%%something here%%%
</tree>
%%%something here%%%
I just want to hide seconds for my_field in this tree view. I did some research but everything i found was about qweb or python. Is it possible in this context???
This question has been flagged
1
Reply
10311
डेटा देखने का तरीका
Rolando
datetime.strptime(Date, '%Y-%m-%d %H:%M:%S').strftime('%Y-%m-%d %H:%M')
It will appear date without seconds. (as a string not date time)
Thank You
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
साइन अप करें| Related Posts | Replies | डेटा देखने का तरीका | ऐक्टिविटी | |
|---|---|---|---|---|
|
|
1
अक्तू॰ 16
|
5761 | ||
|
|
1
सित॰ 15
|
12230 | ||
|
|
0
अक्तू॰ 23
|
4894 | ||
|
|
1
अक्तू॰ 19
|
4096 | ||
|
|
2
जुल॰ 19
|
24524 |
You can change date format according to your needs: http://learnopenerp.blogspot.com/2018/02/python-strftime-datetime-formatting.html