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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0016702
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 03. Procurement managementmajoralways2011-04-07 17:142011-04-09 00:00
ReporterpsanjuanView Statuspublic 
Assigned Tomtaal 
PriorityimmediateResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisionbddb50a59643
ProjectionnoneETAnoneTarget Version3.0RC6
OSLinux 32 bitDatabaseOracleJava version1.6
OS VersionUbuntu 8.04.1Database version11.1.0.6.0Ant version1.7.0
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

0016702: Not possible to create a purchase invoice by using "Create Lines From"

DescriptionIt is not possible to create a purchase invoice by using "Create Lines From"
Steps To ReproduceCreate a purchase order for Vendor A.
Complete
Navigate to purchase invoice window and create a new one for Vendor A.
Click on "Create Lines From" button in order to select the just created Purchase Order.
Select the purchase order and press ok.
Below error is shown.

Same error in live builds - Oracle.
TagsNo tags attached.
Attached Filespng file icon 16702.png [^] (105,612 bytes) 2011-04-07 17:21

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0035745)
egoitz (developer)
2011-04-07 17:59

on CreateFrom.java file
on the
saveInvoice method
there is one catch where the message to show when error is not managed properly.

 
    } catch (final Exception e) {
      try {
        releaseRollbackConnection(conn);
      } catch (final Exception ignored) {
      }
      e.printStackTrace();
      log4j.warn("Rollback in transaction");
      myMessage = Utility.translateError(this, vars, vars.getLanguage(), "ProcessRunError");
    }
    return myMessage;
  }
(0035747)
egoitz (developer)
2011-04-07 18:37

LOG:

 SQL error in query: SELECT ROUND(M_GET_OFFERS_PRICE(TO_DATE(?),?,?,TO_NUMBER(?), TO_NUMBER(?), ?), (SELECT PRICEPRECISION FROM C_CURRENCY C, C_INVOICE I WHERE C.C_CURRENCY_ID = I.C_CURRENCY_ID AND I.C_INVOICE_ID = ?)) AS TOTAL FROM DUALException:java.sql.SQLDataException: ORA-01861: literal does not match format string
(0035749)
adrianromero (manager)
2011-04-07 20:03

The problem is executing the line

https://code.openbravo.com/erp/devel/pi/file/8d002e0b6285/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java#l1485 [^]

It is because the date format of the date in the var strDateInvoiced that is

2011-04-04T02:00:00

Because of this date format even this sql sentence fails:

select TO_DATE('2011-04-04T02:00:00') FROM DUAL
(0035751)
marvintm (developer)
2011-04-07 20:35

The problem is the following:

when a process is called, a call to the getContextInfo() is done, to retrieve the record values which are set in the request to the servlet.

These values need to be in "classic" format for our classic processes to work. Therefore, this function is called with the option classicMode=true (which is correct).

However, it seems like this getContextInfo() function only attempts to transform into classic format, values whose type contains a createClassicString function property, and it looks like dates do not have this function defined. Therefore, the dates are sent unchanged (so, in Javascript format), and this doesn't work in the servlet, which expects to receive a classic format.
(0035752)
mtaal (manager)
2011-04-07 20:53

This changeset is the cause:
https://code.openbravo.com/erp/devel/pi/rev/f12d09feabb5 [^]

It was done for this issue:
https://issues.openbravo.com/view.php?id=16380 [^]

I will investigate further
(0035753)
hgbot (developer)
2011-04-08 08:16

Repository: erp/devel/pi
Changeset: bddb50a596435e4581dec99770d01c32cee7a5f3
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri Apr 08 08:07:51 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/bddb50a596435e4581dec99770d01c32cee7a5f3 [^]

Fixes issue 16702: Not possible to create a purchase invoice by using Create Lines From

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/DateUIDefinition.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/NumberUIDefinition.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/TimeUIDefinition.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/UIDefinition.java
---
(0035801)
iperdomo (reporter)
2011-04-08 18:19

Tested using QA Test client on pi @ rev ab8b8b1cc6be

- Issue History
Date Modified Username Field Change
2011-04-07 17:14 psanjuan New Issue
2011-04-07 17:14 psanjuan Assigned To => adrianromero
2011-04-07 17:14 psanjuan Modules => Core
2011-04-07 17:20 psanjuan Assigned To adrianromero => alostale
2011-04-07 17:20 psanjuan Target Version => 3.0RC6
2011-04-07 17:20 psanjuan Steps to Reproduce Updated View Revisions
2011-04-07 17:21 psanjuan Assigned To alostale => adrianromero
2011-04-07 17:21 psanjuan File Added: 16702.png
2011-04-07 17:59 egoitz Note Added: 0035745
2011-04-07 17:59 egoitz Issue Monitored: egoitz
2011-04-07 18:37 egoitz Note Added: 0035747
2011-04-07 20:03 adrianromero Note Added: 0035749
2011-04-07 20:30 dmitry_mezentsev Issue Monitored: dmitry_mezentsev
2011-04-07 20:33 adrianromero Assigned To adrianromero => mtaal
2011-04-07 20:35 marvintm Note Added: 0035751
2011-04-07 20:53 mtaal Note Added: 0035752
2011-04-08 08:16 hgbot Checkin
2011-04-08 08:16 hgbot Note Added: 0035753
2011-04-08 08:16 hgbot Status new => resolved
2011-04-08 08:16 hgbot Resolution open => fixed
2011-04-08 08:16 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/bddb50a596435e4581dec99770d01c32cee7a5f3 [^]
2011-04-08 18:19 iperdomo Note Added: 0035801
2011-04-08 18:19 iperdomo Status resolved => closed
2011-04-09 00:00 anonymous sf_bug_id 0 => 3281282


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker