This question has been flagged
1 Reply
3166 Views

Hi everyone , i have a form i would like when i create an object in this form in the same time i execute a method (Restful request) ,how can i do this? Is there any way to call a python method from the xml view? THanks

Avatar
Discard
Best Answer

Hi,

redefine method create:

class class_name(osv.osv):        

    def create(self, cr, uid, values, context=None):            
       #implement your method here    
       res = super(class_name, self).create(cr, uid, values, context=context)
       return res
Avatar
Discard
Author

and how to do the same thing for Update/Delete actions?