콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다

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
5864
8
5월 23
61559
DateTime Python 해결 완료
4
2월 23
71877
Datetime in Odoo 해결 완료
2
7월 18
7093
2
2월 18
6963