Skip to content

Commit f67aff3

Browse files
committed
2 parents 4402f49 + 37050b3 commit f67aff3

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
Odoo Java Api
22
================
33

4+
This reppo is no longer maintained for new odoo versions. https://github.com/odoo-java/odoo-java-api is the appropriate project for improvements.
5+
Current issues and PR will be maintained on the new repo.
6+
47
A Java API to connect to Odoo and manage data using the XMLRPC interface.
58

69
The API reduces the amount of boiler plate code needed to communicate with Odoo
710
by doing error checking and type conversions.
811

9-
The Api IS known to work perfectly :
12+
The Api IS known to work for :
1013
* openerp-java-api-1.3.0 works perfectly up to OpenERP v7
1114
* openerp-java-api-2.0.x si supposed to work with the new API introduced in odoo v8
1215
** Take care, the package name have replace openerp by odoo so that compatibility is broken

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import java.util.ArrayList;
2626
import java.util.Collections;
2727
import java.util.HashMap;
28+
import java.util.TimeZone;
2829

2930
import com.odoojava.api.Field.FieldType;
3031

@@ -130,6 +131,7 @@ public Object get(String fieldName){
130131

131132
if (value instanceof String && fieldType == Field.FieldType.DATE){
132133
DateFormat dfm = new SimpleDateFormat("yyyy-MM-dd");
134+
dfm.setTimeZone(TimeZone.getTimeZone("UTC"));
133135
try{
134136
return dfm.parse(value.toString());
135137
}
@@ -140,6 +142,7 @@ public Object get(String fieldName){
140142

141143
if (value instanceof String && fieldType == Field.FieldType.DATETIME){
142144
DateFormat dfm = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
145+
dfm.setTimeZone(TimeZone.getTimeZone("UTC"));
143146
try{
144147
return dfm.parse(value.toString());
145148
}

0 commit comments

Comments
 (0)