Skip to Content
Menú
This question has been flagged
1 Respondre
6437 Vistes

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?


Avatar
Descartar
Best Answer

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.

Avatar
Descartar
Autor

Hii Goood,very useful, thanks for your help

Related Posts Respostes Vistes Activitat
1
de jul. 16
5868
8
de maig 23
61573
4
de febr. 23
71884
2
de jul. 18
7095
2
de febr. 18
6973