Odoo Help
Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM
|
e-Commerce
|
Accounting
|
Inventory
|
PoS
|
Project management
|
MRP
|
etc.
Create automatically a record when users creates one
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.
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.
RegisterOdoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.
Test it nowQuestion tools
Stats
Asked: 4/2/13, 1:02 PM |
Seen: 1173 times |
Last updated: 3/16/15, 8:10 AM |