Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0018189
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2011-08-04 07:372011-08-08 09:09
ReportermtaalView Statuspublic 
Assigned Toadrianromero 
PriorityimmediateResolutionfixedFixed in Version
StatusclosedFix in branchpiFixed in SCM revisionc651835ae4cd
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0018189: After changing a product the sales order line can not be saved again

DescriptionWhen 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 ReproduceThe 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 SolutionChanging 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
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00171193.0MP3 closediperdomo Out Fields in OBUISEL selectors not working 

-  Notes
(0039858)
hgbot (developer)
2011-08-04 10:09

Repository: erp/devel/pi
Changeset: c651835ae4cdc05d0438d834822130c6f2de69cf
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Thu Aug 04 10:08:40 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/c651835ae4cdc05d0438d834822130c6f2de69cf [^]

Fixes issue 0018189: After changing a product the sales order line can not be saved again
The change applied ignores columnnames empty because audit fields do not use the column name property and must be ignored as outfields
This change is related to the issue 17119

---
M modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
---
(0039859)
adrianromero (manager)
2011-08-04 10:13

* Testing the issue

** Go to a draft Sales order and try to modify an existing order line selecting a new product
** Save. It must succeed.

* Other areas affected

Because the change has been in selectors other windows may be affected. Verify also that this issue is also fixed for:

** Purchase and Sales invoices when modifying the product in lines,
** Purchase and Sales orders and invoices in header when modifying the business partner.
(0039960)
hudsonbot (developer)
2011-08-06 05:33

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/5744448753e7 [^]

Maturity status: Test
(0039979)
iperdomo (reporter)
2011-08-08 09:09

Tested on pi @ rev cd93116382e9

- 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 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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker