Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0005175Openbravo ERP00. Application dictionarypublic2008-09-23 09:302009-04-21 11:07
galderromo 
alostale 
immediatemajoralways
closedfixed 
20Gentoo 2.6.24
 
 
Core
No
0005175: Doc sequences and database restrictions
Right now, when working with Sales Invoices, WAD generated code updates the document's sequence before is sure the invoice has been created. This way it is possible to update the sequence but not to create the record due to database restrictions.

This issue is critica because can generate sequence jumps on Sales Invoices, which is ilegal.

In some how, this request is related to 4439 and 5054.
Suppose you do not want the user to create an invoice with no c_project_id or not user1_id. So you create on the database this restriction (there is no way to do it through the AP).

Then, when you press the SAVE button, the WAD generated code updates the sequence and later inserts the record on the database. But the restriction avoids this inserting, so the sequence has been lost.
Change the sequence control, and make sure the inserting has been properly done, before updating the sequence.
No tags attached.
depends on backport 0005196 closed alostale Doc sequences and database restrictions 
depends on backport 0005197 closed alostale Doc sequences and database restrictions 
Issue History
2008-09-23 09:30galderromoNew Issue
2008-09-23 09:30galderromoAssigned To => cromero
2008-09-23 09:30galderromosf_bug_id0 => 2124106
2008-09-23 12:59cromeroPrioritynormal => high
2008-09-23 12:59cromeroSeveritycritical => major
2008-09-23 13:01cromeroStatusnew => scheduled
2008-09-23 13:01cromeroAssigned Tocromero => alostale
2008-09-23 13:01cromerofix_in_branch => trunk
2008-12-01 11:18networkbPriorityhigh => immediate
2008-12-01 11:18networkbfix_in_branchtrunk =>
2008-12-01 11:18networkbIssue Monitored: networkb
2008-12-01 15:09alostaleNote Added: 0010846
2008-12-01 15:12svnbotCheckin
2008-12-01 15:12svnbotNote Added: 0010847
2008-12-01 15:12svnbotStatusscheduled => resolved
2008-12-01 15:12svnbotResolutionopen => fixed
2008-12-01 15:12svnbotsvn_revision => 10784
2008-12-15 10:11svnbotCheckin
2008-12-15 10:11svnbotNote Added: 0011351
2008-12-15 10:11svnbotsvn_revision10784 => 11193
2009-04-21 11:07psarobeStatusresolved => closed

Notes
(0010846)
alostale   
2008-12-01 15:09   
The solution is to make transactional the insert and update processes so when it fails a rollback is done.
(0010847)
svnbot   
2008-12-01 15:12   
Repository: openbravo
Revision: 10784
Author: alostale
Date: 2008-12-01 15:12:41 +0100 (Mon, 01 Dec 2008)

fixed bug 0005175: Doc sequences and database restrictions

---
U trunk/src/org/openbravo/erpCommon/utility/DocumentNo_data.xsql
U trunk/src/org/openbravo/erpCommon/utility/Utility.java
U trunk/src-wad/src/org/openbravo/wad/Wad.java
U trunk/src-wad/src/org/openbravo/wad/datasource.xsqlxml
U trunk/src-wad/src/org/openbravo/wad/javasource.javaxml
---

https://dev.openbravo.com/websvn/openbravo/?rev=10784&sc=1 [^]
(0011351)
svnbot   
2008-12-15 10:11   
Repository: openbravo
Revision: 11193
Author: rafaroda
Date: 2008-12-15 10:11:47 +0100 (Mon, 15 Dec 2008)

Fixes bug 0005175 Made fix PotgreSQL compatible

---
U trunk/src/org/openbravo/erpCommon/utility/DocumentNo_data.xsql
---

https://dev.openbravo.com/websvn/openbravo/?rev=11193&sc=1 [^]