Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
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
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

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(
    at org.openbravo.service.json.JsonToDataConverter.toBaseOBObject(
    at org.openbravo.service.json.DefaultJsonDataService.update(
    at org.openbravo.service.datasource.DefaultDataSourceService.update(
    at org.openbravo.service.datasource.DataSourceServlet.doPut(
    at javax.servlet.http.HttpServlet.service(
    at org.openbravo.base.HttpBaseServlet.serviceInitialized(
    at org.openbravo.base.secureApp.HttpSecureAppServlet.service(
    at org.openbravo.client.kernel.BaseKernelServlet.callServiceInSuper(
    at org.openbravo.client.kernel.BaseKernelServlet.service(
    at org.openbravo.service.datasource.DataSourceServlet.service(
    at javax.servlet.http.HttpServlet.service(
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(
    at org.openbravo.utils.SessionExpirationFilter.doFilter(
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(
    at org.openbravo.utils.CharsetFilter.doFilter(
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(
    at org.openbravo.dal.core.DalRequestFilter$1.doAction(
    at org.openbravo.dal.core.DalRequestFilter.doFilter(
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(
    at org.apache.catalina.core.StandardWrapperValve.invoke(
    at org.apache.catalina.core.StandardContextValve.invoke(
    at org.apache.catalina.core.StandardHostValve.invoke(
    at org.apache.catalina.valves.ErrorReportValve.invoke(
    at org.apache.catalina.core.StandardEngineValve.invoke(
    at org.apache.catalina.connector.CoyoteAdapter.service(
    at org.apache.coyote.http11.Http11Processor.process(
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
Caused by: java.text.ParseException: Unparseable date: "Agua sin Gas 1L+0000"
    at java.text.DateFormat.parse(
    at org.openbravo.service.json.JsonToDataConverter.setData(
    ... 34 more
Steps To ReproduceThe error started occuring after this changeset (afaics): [^]

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
hgbot (developer)
2011-08-04 10:09

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

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
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.
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: [^]

Maturity status: Test
iperdomo (developer)
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 => [^]
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