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

Hi

I am developing a module that display a lot of pictures. I want to create a thumbnail each time user upload a picture.

How can I trigger automatically a function when the user creates a record (= upload a picture) ?

openerp 6.1

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

You must use the super on create function. This is an example how to use it:

def create(self, cr, uid, vals, context=None):
    res = super(YOUR_CLASSE, self).create(cr, uid, vals, context=context)
    YOUR CODE HERE
    return res
Ảnh đại diện
Huỷ bỏ
Tác giả

That's look more simple than expected ! Thank you very much for your fast answer.

I'm happy you solved your problem....;)

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 6 24
4208
5
thg 6 23
35320
1
thg 12 23
19192
2
thg 6 16
3127
3
thg 1 16
4453