Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
4753 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Autore

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

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

Post correlati Risposte Visualizzazioni Attività
1
giu 24
4208
5
giu 23
35292
1
dic 23
19165
2
giu 16
3101
3
gen 16
4426