Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
4789 มุมมอง

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
35333
[Solved] Close window on button press แก้ไขแล้ว
1
ธ.ค. 23
19205
2
มิ.ย. 16
3149
3
ม.ค. 16
4465