2

I would like to do load testing in openerp using jmeter, i tried the login function by the below code:

<?xml version="1.0"?>
        <methodCall>
      <methodName>login</methodName>
      <params>
        <param>
          <value>db</value>
        </param>
        <param>
            <value>admin</value>
        </param>
        <param>
            <value>admin</value>
        </param>
      </params>

but i couldn't be able to run the execute function to read res.partner:

<?xml version="1.0"?>
<methodCall>
<methodName>execute</methodName>
<params>
<param>
    <value><string>db</string></value>
</param>
<param>
    <value>admin</value>
</param>
<param>
    <value><string>res.partner</string></value>
</param>
<param>
    <value><string>read</string></value>
</param>

<param>
    <array>
    <data>   <int>1</int>  </data>
    <data>   <int>2</int></data>
    </array>
</param>

<param>
    <array>
     <data>   <string>name</string> </data>
      <data>   <string>title</string>  </data>
</array>
</param>
</params>
</methodCall>

Anyone could direct me in this. Thanks

1 Answers1

1

You're missing the user's password in the call to read res.partner. If you add it after the user id, it should work.

You might find this client class helpful as a reference for all the parameters that the different OpenERP RPC calls require.

Don Kirkby
  • 53,582
  • 27
  • 205
  • 286
  • Thanks, it works :) i missed the password and the class "object" on the url.. Can i create an osv wizard to print a report from it? – user1310181 Apr 04 '12 at 09:07
  • You can do anything the client can do, @user1310181. To figure out the details, put a breakpoint or a print statement in the `LocalService.__call__()` method in `netsvc.py`. If you're having trouble with something specific, ask a separate question on Stack Overflow. – Don Kirkby Apr 04 '12 at 17:32