Odoo-mobile / framework

Odoo Mobile Framework
https://play.google.com/store/apps/dev?id=8607973775002477408
Other
327 stars 374 forks source link

Login fails with "java.lang.Double.intValue()' on a null object reference" error. #248

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hi everyone, I downloaded the framework and tried to connect to a self hosted url. I get this error in OdooResult permanently. The error is that for odoo version > 7 in the session a company_id is needed for the specified user, but in my case I have version 8 but there appears no company_id. The specified user has a company, i.e. user - partner has a company.

Since the code is in the jars it is hard to handle this error. Thanks for a hint what is going wrong here.

cheers Michael Goetz-Schneider


E/AndroidRuntime: FATAL EXCEPTION: main Process: com.odoo.test, PID: 2513 java.lang.NullPointerException: Attempt to invoke virtual method 'int

java.lang.Double.intValue()' on a null object reference at odoo.helper.utils.gson.OdooResult.getInt(OdooResult.java:58) at odoo.wrapper.OdooWrapper.bindOdooSession(OdooWrapper.java:588) at odoo.wrapper.OdooWrapper.access$200(OdooWrapper.java:68) at odoo.wrapper.OdooWrapper$10.onResponse(OdooWrapper.java:564) at odoo.wrapper.OdooWrapper.onResponse(OdooWrapper.java:1235) at odoo.wrapper.OdooWrapper.onResponse(OdooWrapper.java:68) at com.android.volley.toolbox.JsonRequest.deliverResponse(JsonRequest.java:65) at com.android.volley.ExecutorDelivery$ResponseDeliveryRunnable.run(ExecutorDelivery.java:99)

ghost commented 7 years ago

Hi everybody, after studying the issues list, I saw in #245 the same issue I have. So this issue is a duplicate and can be closed. With darfats workaround I can step around the problem. More discussions about this issue will take place there. cheers Michael Götz Schneider