تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
4731 أدوات العرض

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
يونيو 24
4208
5
يونيو 23
35181
1
ديسمبر 23
19113
2
يونيو 16
3040
3
يناير 16
4356