跳至內容
選單
此問題已被標幟
1 回覆
6447 瀏覽次數

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

相關帖文 回覆 瀏覽次數 活動
1
7月 16
5870
8
5月 23
61611
4
2月 23
71923
2
7月 18
7097
2
2月 18
6985