Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong version check with last version #31

Open
quentinsup opened this issue Oct 1, 2024 · 0 comments
Open

Wrong version check with last version #31

quentinsup opened this issue Oct 1, 2024 · 0 comments

Comments

@quentinsup
Copy link

quentinsup commented Oct 1, 2024

To begin, I really thank you for your works on this lib !

I've tried to use it with the version 17 (using lib in development from the branch V17), but there is a check version compability from the startSession() which fail. I've extract the source code and saw that there is an issue by extraction the major and minor version.

For example, my version is "saas~17.4+pre" and the Version class is looking for a '-' into the version string to split and extract the major and minor, which appears -1 in my situation.

I've modified the source code to extract the major / minor value from the new version tag and everything is working well after that.

I recommand to update the Version class extraction method, and maybe change the checkVersionCompatibility() too to be more permissive on major upper version.

    private void checkVersionCompatibility() throws XmlRpcException, OdooApiException {
        if (this.getServerVersion().getMajor() < 8) {
            throw new OdooApiException("Only Odoo Version from v8.x to 17.x are maintained. "
                    + "Please choose another version of the library");
        }
        if (this.getServerVersion().getMajor() > 17) {
            System.out.println("Only Odoo Version from v8.x to 17.x are maintained. Some features should not work properly. Please upgrade the version of the library");
        }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant