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

In odoo every model will be having a write_date column which will store the last edited time and date of the record.I want to take the value of that field to a variable/ field. But when I print this , it is printing False . What to do.?

code

variable = self.write_date

Thanks in Advance..

아바타
취소

to catch the write_date information, simply add new field name write_date, that's it. the value will be auto filled.

베스트 답변

Hi,

Even though you can see a field named write_date in the table,  First of all, what you have to do is that you have to add a field named write_date into your model and then try the same.

write_date = fields.Datetime(string='Write Date')


Thanks

아바타
취소
베스트 답변
First you need to check database table had 'write_date' field.
If yes, then also check whether you get any record in 'self' or not.
아바타
취소
베스트 답변

If value is False then you need to check self.

check self.name or any other field data is showing...?

if no then your self with no record.


Thank you.

아바타
취소
관련 게시물 답글 화면 활동
1
5월 22
5795
1
8월 21
6316
1
12월 20
2466
0
7월 21
2647
1
2월 23
5340