İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
4769 Görünümler

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

Avatar
Vazgeç
En İyi Yanı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
Avatar
Vazgeç
Üretici

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

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

İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Haz 24
4208
5
Haz 23
35313
1
Ara 23
19182
2
Haz 16
3110
3
Oca 16
4445