Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
6417 Vistas

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
Mejor respuesta

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

Publicaciones relacionadas Respuestas Vistas Actividad
1
jul 16
5865
8
may 23
61561
4
feb 23
71878
2
jul 18
7093
2
feb 18
6965