Skip to content

Commit eb023fa

Browse files
committed
More permissive version control
1 parent 983bce1 commit eb023fa

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/main/java/com/odoojava/api/Session.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
import com.odoojava.api.OdooXmlRpcProxy.RPCProtocol;
2929
import com.odoojava.api.OdooXmlRpcProxy.RPCServices;
30+
import com.odoojava.api.OdooApiException;
3031
import java.util.Arrays;
3132

3233
/**
@@ -148,12 +149,9 @@ public void startSession() throws Exception {
148149

149150
private void checkVersionCompatibility() throws XmlRpcException, OdooApiException {
150151

151-
if (this.getServerVersion().getMajor() < 8) {
152+
if (this.getServerVersion().getMajor() < 8 || this.getServerVersion().getMajor() > 10 ) {
152153
throw new OdooApiException(
153-
"Only Odoo Version 8.x and Up are maintained. " + "Please choose another version of the library");
154-
}else if (this.getServerVersion().getMajor() < 10) {
155-
throw new OdooApiException(
156-
"Only Odoo Version 10.x and Up are maintained. " + "Please choose another version of the library");
154+
"Only Odoo Version from v8.x to 10.x are maintained. " + "Please choose another version of the library");
157155
}
158156

159157
}

0 commit comments

Comments
 (0)