When running the cloned code I noticed that everytime I logout my account and login again, the core framework cannot seem to find the 'current' logged-in user.
I traced the code to bit of code in the OdooActivity, which I have not yet changed since the beginning of the project.
private void validateUserObject() {
if (OdooAccountManager.anyActiveUser(this)) {
OUser user = OUser.current(this);
if (!OdooAccountManager.isValidUserObj(this, user)
&& app.inNetwork()) {
OdooUserObjectUpdater.showUpdater(this, new OdooUserObjectUpdater.OnUpdateFinish() {
@Override
public void userObjectUpdateFinished() {
startActivity(new Intent(OdooActivity.this, OdooLogin.class));
finish();
}
@Override
public void userObjectUpdateFail() {
Toast.makeText(OdooActivity.this, OResource.string(OdooActivity.this,
R.string.toast_something_gone_wrong), Toast.LENGTH_LONG).show();
finish();
}
});
}
}
}
If the app cannot get the current user, I seem to not also access the models created by the app and thus crash the app entirely.
Any help would be appreciated! I just need to be pointed out at the right direction...
When running the cloned code I noticed that everytime I logout my account and login again, the core framework cannot seem to find the 'current' logged-in user.
I traced the code to bit of code in the OdooActivity, which I have not yet changed since the beginning of the project.
If the app cannot get the current user, I seem to not also access the models created by the app and thus crash the app entirely.
Any help would be appreciated! I just need to be pointed out at the right direction...