zikzakmedia / android-openerp

Android class connect to OpenERP (webservices)
15 stars 21 forks source link

still: problem with search method #2

Closed whisnu closed 12 years ago

whisnu commented 12 years ago

Hi, I download your last code and try to search, here is the code:

TextView TextDisplay = (TextView) findViewById(R.id.textView1); OpenErpConnect oc = OpenErpConnect.connect("localhost", 8069, "testdb", "admin", "admin"); Long[] ids = oc.search("res.users", true, new Object[0]); String result = ""; for(int index = 0; index < ids.length ; index++) { result += ids[index] + "\n"; } TextDisplay.setText(result);

But its always error with message: cannot serialize null (same as the first and closed issue). Also, I think you need to update your README file...

caumons commented 12 years ago

Hi Whisnu!

I have fixed a bug in search() shortcut methods: the parameter count (your true value in the code provided) was not used, false instead. However, I do not think the issue you are reporting is caused by this.

I have also updated the README file as you suggested to make it clearer how to work with this connector.

I have not been able to reproduce your issue, but in your code I see that your are trying to connect to localhost, this is not right as you do not have any OpenERP server inside your device, am I wrong? ;)

So... check the commit diff, pull the latest commit and try again using your real IP server instead of wrong "localhost". Also use the tip I writed in README to debug, it is really useful!

Please, once you have done all this provide feedback. Cheers!

whisnu commented 12 years ago

thanks so much for your reply.. yes, its was my mistake :-)

caumons commented 12 years ago

Perfect! So, the real problem was that you were trying to connect to "localhost" instead of your real IP server.

Enjoy! :)