Openbravo Issue Tracking System - Openbravo ERP | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0018189 | Openbravo ERP | A. Platform | public | 2011-08-04 07:37 | 2011-08-08 09:09 | |||||||
Reporter | mtaal | |||||||||||
Assigned To | adrianromero | |||||||||||
Priority | immediate | Severity | major | Reproducibility | have not tried | |||||||
Status | closed | Resolution | fixed | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | ||||||||||||
Target Version | Fixed in Version | |||||||||||
Merge Request Status | ||||||||||||
Review Assigned To | ||||||||||||
OBNetwork customer | No | |||||||||||
Web browser | ||||||||||||
Modules | Core | |||||||||||
Support ticket | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0018189: After changing a product the sales order line can not be saved again | |||||||||||
Description | When changing the product the sales order line can not be saved. The eclipse console shows the error below. The error indicates that the creationDate field contains the productIdentifier. a3196480 21004372 [http-8080-2] ERROR org.openbravo.service.json.DefaultJsonDataService - Exception when updating OrderLine(B24647BF9C4B461494D19F5126E6E958) (salesOrder: DF3D3B4F206B4396B6B4ED19444408C7, lineNo: 20, lineNetAmount: 16.08) org.openbravo.base.exception.OBException: Exception when updating OrderLine(B24647BF9C4B461494D19F5126E6E958) (salesOrder: DF3D3B4F206B4396B6B4ED19444408C7, lineNo: 20, lineNetAmount: 16.08) at org.openbravo.service.json.JsonToDataConverter.setData(JsonToDataConverter.java:366) at org.openbravo.service.json.JsonToDataConverter.toBaseOBObject(JsonToDataConverter.java:328) at org.openbravo.service.json.DefaultJsonDataService.update(DefaultJsonDataService.java:394) at org.openbravo.service.datasource.DefaultDataSourceService.update(DefaultDataSourceService.java:152) at org.openbravo.service.datasource.DataSourceServlet.doPut(DataSourceServlet.java:619) at javax.servlet.http.HttpServlet.service(HttpServlet.java:640) at org.openbravo.base.HttpBaseServlet.serviceInitialized(HttpBaseServlet.java:225) at org.openbravo.base.secureApp.HttpSecureAppServlet.service(HttpSecureAppServlet.java:429) at org.openbravo.client.kernel.BaseKernelServlet.callServiceInSuper(BaseKernelServlet.java:89) at org.openbravo.client.kernel.BaseKernelServlet.service(BaseKernelServlet.java:65) at org.openbravo.service.datasource.DataSourceServlet.service(DataSourceServlet.java:117) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.openbravo.utils.SessionExpirationFilter.doFilter(SessionExpirationFilter.java:66) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.openbravo.utils.CharsetFilter.doFilter(CharsetFilter.java:35) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.openbravo.dal.core.DalRequestFilter$1.doAction(DalRequestFilter.java:81) at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:46) at org.openbravo.dal.core.DalRequestFilter.doFilter(DalRequestFilter.java:103) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:662) Caused by: java.text.ParseException: Unparseable date: "Agua sin Gas 1L+0000" at java.text.DateFormat.parse(DateFormat.java:337) at org.openbravo.service.json.JsonToDataConverter.setData(JsonToDataConverter.java:357) ... 34 more | |||||||||||
Steps To Reproduce | The error started occuring after this changeset (afaics): https://code.openbravo.com/erp/devel/pi/rev/f8298218fb69 [^] The problem is in this line in ob-selector-item.js: if (form.fields[j].columnName === outFields[i].fieldName) { fields like creationDate and updated have a columnName which is an empty string, in this specific case the outField has a fieldName with an empty space also (the id field). So the condition is true and the value (which is not a date) is placed in the creationDate property. | |||||||||||
Proposed Solution | Changing the condition to ignore empty columnName/fieldName is a solution, the columnName is empty because for audit fields this is not used (see the class: OBViewFormComponent.OBViewFieldAudit and specifically the getColumnName method). I wonder though why the fieldName is empty, maybe also because in this case the outfield is the id | |||||||||||
Additional Information | ||||||||||||
Tags | No tags attached. | |||||||||||
Relationships |
| |||||||||||
Attached Files | ||||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2011-08-04 07:37 | mtaal | New Issue | ||||||||||
2011-08-04 07:37 | mtaal | Assigned To | => adrianromero | |||||||||
2011-08-04 07:37 | mtaal | Modules | => Core | |||||||||
2011-08-04 07:37 | mtaal | OBNetwork customer | => No | |||||||||
2011-08-04 09:27 | adrianromero | Status | new => scheduled | |||||||||
2011-08-04 09:27 | adrianromero | fix_in_branch | => pi | |||||||||
2011-08-04 10:09 | hgbot | Checkin | ||||||||||
2011-08-04 10:09 | hgbot | Note Added: 0039858 | ||||||||||
2011-08-04 10:09 | hgbot | Status | scheduled => resolved | |||||||||
2011-08-04 10:09 | hgbot | Resolution | open => fixed | |||||||||
2011-08-04 10:09 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/c651835ae4cdc05d0438d834822130c6f2de69cf [^] | |||||||||
2011-08-04 10:10 | adrianromero | Relationship added | related to 0017119 | |||||||||
2011-08-04 10:13 | adrianromero | Note Added: 0039859 | ||||||||||
2011-08-06 05:33 | hudsonbot | Checkin | ||||||||||
2011-08-06 05:33 | hudsonbot | Note Added: 0039960 | ||||||||||
2011-08-08 09:09 | iperdomo | Note Added: 0039979 | ||||||||||
2011-08-08 09:09 | iperdomo | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|