Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
4741 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Auteur

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

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

Gerelateerde posts Antwoorden Weergaven Activiteit
1
jun. 24
4208
5
jun. 23
35209
1
dec. 23
19125
2
jun. 16
3068
3
jan. 16
4372