File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
src/main/java/com/odoojava/api Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 2727
2828import com .odoojava .api .OdooXmlRpcProxy .RPCProtocol ;
2929import com .odoojava .api .OdooXmlRpcProxy .RPCServices ;
30+ import com .odoojava .api .OdooApiException ;
3031import 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 }
You can’t perform that action at this time.
0 commit comments