Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda

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
Buang
Jawaban Terbai

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
Buang
Penulis

Hii Goood,very useful, thanks for your help

Post Terkait Replies Tampilan Aktivitas
1
Jul 16
5865
8
Mei 23
61561
DateTime Python Diselesaikan
4
Feb 23
71878
Datetime in Odoo Diselesaikan
2
Jul 18
7093
2
Feb 18
6965