Skip to Content
Menu
This question has been flagged
1 Atsakyti
4776 Rodiniai

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

Portretas
Atmesti
Best Answer

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
Portretas
Atmesti
Autorius

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

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

Related Posts Replies Rodiniai Veikla
1
birž. 24
4208
5
birž. 23
35316
1
gruod. 23
19185
2
birž. 16
3113
3
saus. 16
4447