コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
6421 ビュー

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
5865
8
5月 23
61562
4
2月 23
71879
2
7月 18
7093
2
2月 18
6968