Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0014908Openbravo ERP03. Procurement managementpublic2010-10-19 09:032011-05-24 10:57
dalsasua 
dalsasua 
urgentmajoralways
closedfixed 
20Ubuntu 9.04
pi 
2.50MP23 
Core
No
0014908: ERP must allow extension modules to add new document types to work in purchase/sales invoice windows.
Nowadays, c_invoice_post has got the doc base types hardcoded in one of the checks. This means that, if an extension module includes a new doc base type, with new document types, using c_invoice table, when processing an invoice that uses that new document type, it will always fail.
Install storno ivoice module.
Process an invoice with storno invoice document type.
Check that it fails.
--- a/src-db/database/model/functions/C_INVOICE_POST.xml
+++ b/src-db/database/model/functions/C_INVOICE_POST.xml
@@ -422,7 +422,7 @@
       SELECT COUNT(*) INTO v_Count
       FROM C_INVOICE C,
            C_DOCTYPE
- WHERE C_DOCTYPE.DocBaseType IN ('ARI', 'API','ARC','APC')
+ WHERE C_DOCTYPE.DocBaseType IN (select docbasetype from c_doctype where isactive='Y' and ad_table_id='318' and ad_client_id=C.AD_Client_ID)
         AND C_DOCTYPE.IsSOTrx=C.ISSOTRX
         AND Ad_Isorgincluded(C.AD_Org_ID,C_DOCTYPE.AD_Org_ID, C.AD_Client_ID) <> -1
         AND C.C_DOCTYPETARGET_ID = C_DOCTYPE.C_DOCTYPE_ID
closingMay2011
Issue History
2010-10-19 09:03dalsasuaNew Issue
2010-10-19 09:03dalsasuaAssigned To => dalsasua
2010-10-19 13:49hgbotCheckin
2010-10-19 13:49hgbotNote Added: 0031974
2010-10-19 13:49hgbotStatusnew => resolved
2010-10-19 13:49hgbotResolutionopen => fixed
2010-10-19 13:49hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d60f21a506384807bc9674254a011406390927f0 [^]
2010-10-19 23:51hudsonbotCheckin
2010-10-19 23:51hudsonbotNote Added: 0031994
2011-05-24 09:59dalsasuaTag Attached: closingMay2011
2011-05-24 10:57dalsasuaStatusresolved => closed

Notes
(0031974)
hgbot   
2010-10-19 13:49   
Repository: erp/devel/pi
Changeset: d60f21a506384807bc9674254a011406390927f0
Author: David Alsasua <david.alsasua <at> openbravo.com>
Date: Tue Oct 19 09:24:18 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d60f21a506384807bc9674254a011406390927f0 [^]

Fixes issue 14908
Now C_Invoice_Post takes dynamically the doc base type elements that works with the invoice documents

---
M src-db/database/model/functions/C_INVOICE_POST.xml
---
(0031994)
hudsonbot   
2010-10-19 23:51   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/d60f21a50638 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/483e8e77ad0a [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18564.obx [^]