In may application i want to call python def
and i m doing something like these:
bg = new AccountSharing(getApplicationContext(), OUser.current(this));
OLog.log(String.valueOf(bg.getServerDataHelper()==null));
//which return true, it return false when the app is newly installed and as in Odoologin class sets the odoo value of application class
Object o=bg.getServerDataHelper().callMethod("account.sharing","send_invite_via_email",new OArguments(),new HashMap<String, Object>(),new HashMap<String, Object>());
And i get these error:
com.test E/AndroidRuntime: FATAL EXCEPTION: IntentService[OdooRegisterService]
Process: com.test, PID: 5022 java.lang.NullPointerException: Attempt to read from field 'odoo.helper.utils.gson.OdooResult odoo.helper.utils.gson.OdooResponse.result' on a null object reference at odoo.wrapper.OdooWrapper.authenticate(OdooWrapper.java:448) at odoo.wrapper.OdooWrapper.authenticate(OdooWrapper.java:441) at com.om.OdooRegisterService.onHandleIntent(OdooRegisterService.java:52) at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.os.HandlerThread.run(HandlerThread.java:61)
The main issue is caused due to
OLog.log(String.valueOf(app.getOdoo(OUser.current(this))==null));