Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
4736 Переглядів

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

Аватар
Відмінити
Найкраща відповідь

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
Аватар
Відмінити
Автор

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

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

Related Posts Відповіді Переглядів Дія
1
черв. 24
4208
Domain one2many field? Вирішено
5
черв. 23
35191
1
груд. 23
19115
2
черв. 16
3048
3
січ. 16
4358