Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0001980Openbravo ERPZ. Otherspublic2007-09-19 17:412008-06-12 09:43
cromero 
cromero 
normalminoralways
closedfixed 
5
 
2.35 
No
Core
No
0001980: Error in Postgre CRemitance & ExpenseReportLine
I use next versions:

Openbravo 2.22
Postgress 8.2
Tomcat 5.5
Debian


For example, if i create a remitance line, it returns an error message 'error
0' with next log:

12:52:07 [http-8080-Processor19] ERROR
org.openbravo.erpCommon.ad_actionButton.CreateFromCRemittanceData - SQL error
in query: SELECT COALESCE(MALINE),0) AS LINE FROM C_REMITTANCELINE WHERE
C_REMITTANCE_ID = ? Exceptionrg.postgresql.util.PSQLException: Se retornó un
resultado cuando no se esperaba ninguno.
12:52:07 [http-8080-Processor19] ERROR
org.openbravo.erpCommon.ad_actionButton.CreateFrom - Error captured: 0

*************

And if i create a report line, it returns the next one:

12:53:35 [http-8080-Processor19] ERROR
org.openbravo.erpWindows.ExpenseReport.ReportLineData - SQL error in query:
INSERT INTO S_TimeExpenseLine (AD_Client_ID, AD_Org_ID, S_TimeExpense_ID, Line,
IsTimeReport, IsInvoiced, M_Product_ID, Qty, C_UOM_ID, C_Currency_ID, InvoicePrice,
Description, Note, C_BPartner_ID, C_Campaign_ID, C_Project_ID, C_ProjectPhase_ID,
C_ProjectTask_ID, C_Activity_ID, C_InvoiceLine_ID, S_ResourceAssignment_ID,
ConvertedAmt, ExpenseAmt, DateExpense, IsActive, S_TimeExpenseLine_ID,
C_OrderLine_ID, S_TimeType_ID, created, createdby, updated, updatedBy) VALUES
(TO_NUMBER, TO_NUMBER, TO_NUMBER, TO_NUMBER, , , TO_NUMBER, TO_NUMBER, TO_NUMBER,
TO_NUMBER, TO_NUMBER, , , TO_NUMBER, TO_NUMBER, TO_NUMBER, TO_NUMBER, TO_NUMBER,
TO_NUMBER, TO_NUMBER, TO_NUMBER, TO_NUMBER, TO_NUMBER, TO_DATE, , TO_NUMBER,
TO_NUMBER, TO_NUMBER, now(), to_number, now(), to_number)
Exceptionrg.postgresql.util.PSQLException: ERROR: record "old" is not assigned
yet
Detail: The tuple structure of a not-yet-assigned record is indeterminate.
12:53:35 [http-8080-Processor19] ERROR
org.openbravo.erpWindows.ExpenseReport.ReportLine - Error captured: 0
No tags attached.
Issue History

Notes
(0005569)
user71   
2005-06-01 00:00   
(edited on: 2008-06-12 09:43)
This bug was originally reported in SourceForge bug tracker and then migrated to Mantis.

You can see the original bug report in:
https://sourceforge.net/support/tracker.php?aid=1798120 [^]
(0002160)
cromero   
2007-10-10 00:05   
(edited on: 2008-06-12 09:21)
Logged In: YES
user_id=1500614
Originator: YES

There should be an operation check before the ReadOnly check in the s_timeexpenseline_trg():

  -- ReadOnly Check
  if(TG_OP = 'UPDATE') THEN

This Bug will be fixed in the next release (2.35).

Carlos Romero
Openbravo Team
(0002161)
user71   
2007-10-10 09:18   
(edited on: 2008-06-12 09:21)
Logged In: YES
user_id=1815195
Originator: NO

I found this in s_timeexpenseline_trg() function, so I don know what i may change:

  IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN
    v_TimeExpense_ID := NEW.S_TIMEEXPENSE_ID;
  ELSE
    v_TimeExpense_ID := OLD.S_TIMEEXPENSE_ID;
  END IF;
   -- ReadOnly Check


Could you give me a provitional solution?

Thank you
(0002162)
cromero   
2007-10-19 20:09   
(edited on: 2008-06-12 09:21)
Logged In: YES
user_id=1500614
Originator: YES

Trigger S_TimeExpenseLine_trg has been modified, so it will work in next release (2.35).

I have tested in OB2.34 Postgre version the remittance process and it has work fine.

Carlos Romero
Openbravo Team
(0002163)
user71   
2007-10-22 08:19   
(edited on: 2008-06-12 09:21)
Logged In: YES
user_id=1815195
Originator: NO

Could you tell us how did you fixed this?

Thank you.
(0002164)
pjuvara   
2007-10-31 15:58   
(edited on: 2008-06-12 09:21)
Logged In: YES
user_id=1871571
Originator: NO

This bug does not reproduce anymore. However in Postgre, I cannot save an expense sheet line (remittances are fine).
I'll log a separate bug.
(0002165)
pjuvara   
2007-10-31 16:13   
(edited on: 2008-06-12 09:21)
Logged In: YES
user_id=1871571
Originator: NO

The new bug is:1823536
http://sourceforge.net/tracker/index.php?func=detail&aid=1823536&group_id=162271&atid=823129 [^]
(0002166)
rafaroda   
2007-10-31 16:15   
(edited on: 2008-06-12 09:21)
Logged In: YES
user_id=1892190
Originator: NO

Verification assigned to rafaroda.