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 11Odoo 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+
47A Java API to connect to Odoo and manage data using the XMLRPC interface.
58
69The API reduces the amount of boiler plate code needed to communicate with Odoo
710by 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
Original file line number Diff line number Diff line change 2525import java .util .ArrayList ;
2626import java .util .Collections ;
2727import java .util .HashMap ;
28+ import java .util .TimeZone ;
2829
2930import 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 }
You can’t perform that action at this time.
0 commit comments