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
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....;)
Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!
Inscrever-se| Publicações relacionadas | Respostas | Visualizações | Atividade | |
|---|---|---|---|---|
|
0
nov. 25
|
10 | |||
|
1
jun. 24
|
4208 | |||
|
Domain one2many field?
Resolvido
|
5
jun. 23
|
37200 | ||
|
[Solved] Close window on button press
Resolvido
|
1
dez. 23
|
20930 | ||
|
2
jun. 16
|
4317 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.