Created
June 19, 2014 09:11
-
-
Save Electron-libre/7dd2c0c267c2ec3b929c to your computer and use it in GitHub Desktop.
Bintje model example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class OpenObject::Partner | |
include OpenObjectModel | |
set_open_object_model 'res.partner' | |
## Where user context is the trinity : {uid: Int , dbname: String , pwd: String} | |
def my_custom_method(user_context) | |
OpenObject.rescue_xmlrpc_fault do | |
response = self.class.connection(user_context).execute(self.class.open_object_model, 'remoteOpenObjectMethod', self.id.to_i) | |
OpenObject::BackendResponse.new(success: true, content: response) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment