Search code examples
pythonodooxml-rpc

How can i override a save action in odoo?


I'm just a newbie in Odoo.I want to override the save method in creating customer in the sales tab(i'm using odoo 8). SO when i click save i will send an XML RPC message to some other system(ESB). I will do this kind of overriding in many odoo modules(including ad dons) but i don't know from where i start? I have right now installed odoo on my system as well as downloading the source code from the git repository (https://github.com/odoo/odoo/tree/8.0) Any idea please how can i do that?

Thanks


Solution

  • Actually two ORM methods could be called. On creation the save button will call the models create() and on update/write it will call write(). So you have to create you own custom module and override these methods. You should call the super() and then do what ever you want to do with your external system. There are a lot of examples in Odoo itself where such overrides are done, already.