コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
4794 ビュー

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....;)

関連投稿 返信 ビュー 活動
1
6月 24
4208
5
6月 23
35350
1
12月 23
19212
2
6月 16
3155
3
1月 16
4468