Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
4709 Widoki

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

Awatar
Odrzuć
Najlepsza odpowiedź

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
Awatar
Odrzuć
Autor

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

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

Powiązane posty Odpowiedzi Widoki Czynność
1
cze 24
4208
5
cze 23
35114
1
gru 23
19084
2
cze 16
3012
3
sty 16
4320