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

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
5804
1
8月 21
6326
1
12月 20
2475
0
7月 21
2659
1
2月 23
5344