Hi,I want to change date format for some date field.Not for all date field.I know I can change for all using Settings --> Translations --> Languages.But I want to change some particular field only.I try to use this but not work.
My code example:
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi,I want to change date format for some date field.Not for all date field.I know I can change for all using Settings --> Translations --> Languages.But I want to change some particular field only.I try to use this but not work.
My code example:
Hello, you can try below process :
Translations --> Language --> Edit
Replace time format : %H:%M:%S to %I:%M:%S %p
import following:
from odoo.tools import float_is_zero, float_compare, DEFAULT_SERVER_DATETIME_FORMAT
define in your function in place of time format DEFAULT_SERVER_DATETIME_FORMAT i hope it helps you.
For Reports and XML(QWeb) you can do it this way:
<span t-esc="datetime.datetime.
Hope it helps
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
3
जन॰ 25
|
5261 | ||
|
1
अग॰ 24
|
3401 | ||
|
0
सित॰ 21
|
3497 | ||
|
0
मार्च 15
|
5341 | ||
Accounting app on localhost
Solved
|
|
3
मई 25
|
7035 |