Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
6425 Переглядів

I have a field type datetime.

date=fields.Datetime('Request date',default=fields.Date.today, required=True,readonly=True,copy=True)

When I duplicate, the field date copy the date of created not the current date when I duplicate.

I want to duplicate the field with current date. Can I duplicate the date with the current date?


Аватар
Відмінити
Найкраща відповідь

hello,

You may try like this(copy=False):

date=fields.Datetime('Request date',default=fields.Date.today, required=True,readonly=True,copy=False)

Hope this will help you.

Аватар
Відмінити
Автор

Hii Goood,very useful, thanks for your help

Related Posts Відповіді Переглядів Дія
1
лип. 16
5865
8
трав. 23
61562
DateTime Python Вирішено
4
лют. 23
71879
Datetime in Odoo Вирішено
2
лип. 18
7093
2
лют. 18
6968