Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0001931Openbravo ERP07. Sales managementpublic2007-09-11 07:502008-06-12 09:43
user71 
cromero 
normalminoralways
closedfixed 
5
 
2.35 
No
Core
No
0001931: Generate/create shipment fail under Postgres
Both Generate Shipments and Create Shipments from Orders fail when using Postgres as the database.

The displayed error is
      
@ERROR=SPI_execute_plan failed executing query "SAVEPOINT sp_new_shipment": SPI_ERROR_TRANSACTION


The source of the error is the m_inout_create procedure.
Specifically the statement "SAVEPOINT sp_new_shipment" (around line 226) causes the error.

I believe that Postgres does not fully (at all?) support the use of savepoints & that is the source of the error.

That savepoint is only used in one place in the procedure (if v_lines == 0). I commented out the savepoint & the rollback to savepoint & the error appeared fixed. To play it safe I changed the NOTICE where the rollback used to occur to an exception.

Amended defintion is attached

No tags attached.
Issue History

Notes
(0005520)
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=1792141 [^]
(0002047)
psarobe   
2007-09-18 09:10   
(edited on: 2008-06-12 09:21)
Logged In: YES
user_id=1500703
Originator: NO

Please tell us the enviroment:

http://wiki.openbravo.com/wiki/index.php/Bug_Reporting_Guidelines [^]

Thanks in advance
(0002048)
user71   
2007-09-18 09:13   
(edited on: 2008-06-12 09:21)
Logged In: YES
user_id=1737231
Originator: YES

Environment

OS: Linux - Centos 4 (test/prod) & Windows XP (dev)
DB: Postgres 8.1.9 (test/prod) & 8.2.4 (dev)
Release: 2.33
Browser: Firefox 2.0.0.6, IE 7
(0002049)
user71   
2007-09-26 14:36   
(edited on: 2008-06-12 09:21)
Logged In: YES
user_id=1673954
Originator: NO

OS: Linux - Fedora Core 6
DB: Postgres 8.1.4
OB Release: 2.33
Browser: Firefox 2.0.0.6

When I go to "Sales Management > Transaction > Sales Order" and complete a sales order using the "Complete" button, I got the following error message at the top in a red box:

Error:
invalid input-syntax for type numeric: >>XX000<<

Then I did a change in the Document type (i.e) I changed the document type from "POS order" to "Standard Order" and tried to complete the sales order. Now I get the following error message:

@ERROR=SPI_execute_plan failed executing query "SAVEPOINT sp_new_shipment":SPI_ERROR_TRANSACTION

Somebody please advice me on this issue. I see that this bug has been reported on 11-09-2007, So if someone is working for on a fix for this bug, please tell me when can I expect the fix.

Please let me know if you want more details regarding this issue.

Thanks
Sarin
(0002050)
cromero   
2007-10-10 00:23   
(edited on: 2008-06-12 09:21)
Logged In: YES
user_id=1500614
Originator: NO

Yes, you are right: there is a bug in the M_INOUT_CREATE function because the use of the SAVEPOINT it's only available in postgreSQL for transactions and not for functions.

This bug should be fixed in the next release (r2.35).

Thank you for your feedback

Carlos Romero
Openbravo Team
(0002051)
rafaroda   
2007-10-31 16:35   
(edited on: 2008-06-12 09:21)
Logged In: YES
user_id=1892190
Originator: NO

Verification assigned to rafaroda.