Skip to content

Instantly share code, notes, and snippets.

@Electron-libre
Created June 19, 2014 09:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Electron-libre/7dd2c0c267c2ec3b929c to your computer and use it in GitHub Desktop.
Save Electron-libre/7dd2c0c267c2ec3b929c to your computer and use it in GitHub Desktop.
Bintje model example
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