Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
4871 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Autor

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

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

Related Posts Odpovědi Zobrazení Aktivita
1
čvn 24
4208
5
čvn 23
35612
1
pro 23
19411
2
čvn 16
3336
3
led 16
4647