File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
src/main/java/com/odoojava/api Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 1
1
Odoo Java Api
2
2
================
3
3
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
+
4
7
A Java API to connect to Odoo and manage data using the XMLRPC interface.
5
8
6
9
The API reduces the amount of boiler plate code needed to communicate with Odoo
7
10
by doing error checking and type conversions.
8
11
9
- The Api IS known to work perfectly :
12
+ The Api IS known to work for :
10
13
* openerp-java-api-1.3.0 works perfectly up to OpenERP v7
11
14
* openerp-java-api-2.0.x si supposed to work with the new API introduced in odoo v8
12
15
** Take care, the package name have replace openerp by odoo so that compatibility is broken
Original file line number Diff line number Diff line change 25
25
import java .util .ArrayList ;
26
26
import java .util .Collections ;
27
27
import java .util .HashMap ;
28
+ import java .util .TimeZone ;
28
29
29
30
import com .odoojava .api .Field .FieldType ;
30
31
@@ -130,6 +131,7 @@ public Object get(String fieldName){
130
131
131
132
if (value instanceof String && fieldType == Field .FieldType .DATE ){
132
133
DateFormat dfm = new SimpleDateFormat ("yyyy-MM-dd" );
134
+ dfm .setTimeZone (TimeZone .getTimeZone ("UTC" ));
133
135
try {
134
136
return dfm .parse (value .toString ());
135
137
}
@@ -140,6 +142,7 @@ public Object get(String fieldName){
140
142
141
143
if (value instanceof String && fieldType == Field .FieldType .DATETIME ){
142
144
DateFormat dfm = new SimpleDateFormat ("yyyy-MM-dd HH:mm:ss" );
145
+ dfm .setTimeZone (TimeZone .getTimeZone ("UTC" ));
143
146
try {
144
147
return dfm .parse (value .toString ());
145
148
}
You can’t perform that action at this time.
0 commit comments