Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
4726 Представления

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
5
июн. 23
35169
1
дек. 23
19105
2
июн. 16
3035
3
янв. 16
4349