Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

odoo android mobile framework

By
Amzz
on 10/26/16, 2:22 AM 235 views

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));

1
marshall
On 10/27/16, 8:12 AM

it must be called in AsyncTask or new Thread
this must resolve it

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 10/26/16, 2:22 AM
Seen: 235 times
Last updated: 10/27/16, 8:13 AM