Odoo Help

Welcome!

This community 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.

0

i would like when i create an object in this form in the same time i execute a method (Restful request)

By
Hachem Chraiti
on 4/11/14, 11:03 AM 751 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

1

Borni DHIFI

--Borni DHIFI--
5102
| 6 8 9
Tunis, Tunisia
--Borni DHIFI--

Techno Functional Consultant Odoo(OpenERP) 

http://www.linkedin.com/in/borni

Skype : dhifi.borni

Borni DHIFI
On 4/11/14, 11:17 AM

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

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

Hachem Chraiti
on 4/14/14, 3:26 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 4/11/14, 11:03 AM
Seen: 751 times
Last updated: 3/16/15, 8:10 AM