Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
7678 Lượt xem

Hello,

I am trying to create an automated action upon creation of a Partner. The problem is that the create_date field is not accessible , the filed exists in the database but not in the model.

Can anyone helps?

regards,

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

First of all inherit the 'res.partner' and add the fields

'create_date': fields.datetime('Creation Date' , readonly=True),

Then put this field in view...so that you can see or access the partner created date.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

You have to add the database field to the model as a read-only field.

For an example that adds the create_uid to the sale.order model so users can see who entered sales orders, see:

https://www.openerp.com/apps/6.1/add_user_sales_order/

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 5 17
5635
3
thg 2 16
6357
1
thg 12 23
9062
0
thg 4 24
1925
1
thg 4 24
2162