Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
6418 Widoki

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?


Awatar
Odrzuć
Najlepsza odpowiedź

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.

Awatar
Odrzuć
Autor

Hii Goood,very useful, thanks for your help

Powiązane posty Odpowiedzi Widoki Czynność
1
lip 16
5865
8
maj 23
61561
DateTime Python Rozwiązane
4
lut 23
71878
Datetime in Odoo Rozwiązane
2
lip 18
7093
2
lut 18
6967