Skip to content

Instantly share code, notes, and snippets.

@Electron-libre
Created June 19, 2014 09:11
Show Gist options
  • Select an option

  • Save Electron-libre/7dd2c0c267c2ec3b929c to your computer and use it in GitHub Desktop.

Select an option

Save Electron-libre/7dd2c0c267c2ec3b929c to your computer and use it in GitHub Desktop.

Revisions

  1. Electron-libre created this gist Jun 19, 2014.
    13 changes: 13 additions & 0 deletions partner.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    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