How to set my date default value as 05/08/2022??
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Бухгалтерия
- Склад
- PoS
- Project
- MRP
Этот вопрос был отмечен
1
Ответить
2812
Представления
You can do it as below:
my_date = fields.Date(string='My Date', default=lambda self: fields.Date.context_today(self).replace(day=8,month=5,year=2022))
It's working, where we can define the specific date format like DD/MM/YYYY
You can change it from Languages, Enable developer mode then Go to Settings -> Translations -> Languages -> open your language and edit the date format field to %d/%m/%Y
I tried the same but date showing 2022-05-08
You need to refresh the page. Which screen you check it?
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 | Ответы | Просмотры | Активность | |
---|---|---|---|---|
|
1
июн. 25
|
1625 | ||
|
3
июл. 25
|
3268 | ||
|
1
мая 25
|
1416 | ||
|
1
мая 25
|
1667 | ||
|
4
мая 25
|
2825 |