Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0012879Openbravo ERP03. Procurement managementpublic2010-04-06 11:392010-05-18 12:12
networkb 
sivaraman 
urgentmajoralways
closedfixed 
5
2.50MP14 
2.50MP17 
Core
No
0012879: The Document Type is wrong when we use Requisition to Order
We have a two Document Type for purchase order. One Default. When we create a Purchase Order using 'Requisition to Order', the Purchase Order has the Document Type set as NO default.
-As Openbravo Admin go to Financial Management || Accounting || Setup || Document Type
-Create a new record.
    - Name: Document Type New
    - G/L Category: Standard.
    - Document Category: Purchase Order
    - Table: C_Order
    - Set Default.
-Go to rocurement Management || Transactions || Requisition
-Create a new record.
   -BP: McGiver
   -Product: Hammer
-Complete
-Go to Procurement Management || Transactions || Requisition To Order
-Select the requisition created.
-Create the purchase order.
-Go to Procurement Management || Transactions || Purchase Order
-Realize that the purchase order created has Trnsaction Document: Purchase Order, when it must be 'Document Type New'
No tags attached.
Issue History
2010-04-06 11:39networkbNew Issue
2010-04-06 11:39networkbAssigned To => adrianromero
2010-04-12 11:32adrianromeroStatusnew => scheduled
2010-04-12 11:32adrianromerofix_in_branch => pi
2010-04-16 16:05adrianromeroRelationship addedrelated to 0012857
2010-04-16 16:29adrianromeroNote Added: 0026320
2010-04-16 16:49psarobeNote Added: 0026321
2010-04-16 16:51psarobeNote Deleted: 0026321
2010-04-21 12:49adrianromeroRelationship deletedrelated to 0012857
2010-04-22 06:37sivaramanAssigned Toadrianromero => sivaraman
2010-04-22 08:18hgbotCheckin
2010-04-22 08:18hgbotNote Added: 0026558
2010-04-22 08:18hgbotStatusscheduled => resolved
2010-04-22 08:18hgbotResolutionopen => fixed
2010-04-22 08:18hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/783d62a775119eb164ee5e29b15fd196602d676e [^]
2010-04-22 08:23sivaramanNote Added: 0026559
2010-04-23 18:34sureshbabuNote Added: 0026655
2010-04-23 18:34sureshbabuStatusresolved => new
2010-04-23 18:34sureshbabuResolutionfixed => open
2010-04-26 11:56adrianromeroStatusnew => scheduled
2010-04-26 13:05adrianromeroStatusscheduled => resolved
2010-04-26 13:05adrianromeroResolutionopen => fixed
2010-04-26 13:09sureshbabuNote Edited: 0026655bug_revision_view_page.php?bugnote_id=0026655#r281
2010-04-26 13:11sureshbabuNote Added: 0026676
2010-04-26 13:11sureshbabuStatusresolved => closed
2010-04-27 00:00anonymoussf_bug_id0 => 2992607
2010-05-14 15:27hudsonbotCheckin
2010-05-14 15:27hudsonbotNote Added: 0027266
2010-05-18 12:12gorka_gilTarget Version2.50MP15 => 2.50MP17

Notes
(0026320)
adrianromero   
2010-04-16 16:29   
Probably the error is in the function AD_GET_DOCTYPE and has to be added a DESC modifier when ordering by field ISDEFAULT in the query:

SELECT C_DocType_ID, NAME,ISDEFAULT
      FROM C_DOCTYPE
      WHERE DOCBASETYPE='POO'
        AND ISACTIVE='Y'
        AND AD_Client_Id='1000000'
        AND AD_ISORGINCLUDED('0', AD_Org_ID, '1000000') <> -1
      ORDER BY AD_ISORGINCLUDED('0', AD_Org_ID, '1000000'),
        IsDefault DESC,
        C_DocType_ID


Be very carefull when modifying this function because it is used in several places
(0026558)
hgbot   
2010-04-22 08:18   
Repository: erp/devel/pi
Changeset: 783d62a775119eb164ee5e29b15fd196602d676e
Author: Sivaraman Rajagopal <sivaraman.rajagopal <at> openbravo.com>
Date: Thu Apr 22 11:47:46 2010 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/783d62a775119eb164ee5e29b15fd196602d676e [^]

Fixes issue 12879: The Document Type is wrong when we use Requisition to Order

---
M src-db/database/model/functions/AD_GET_DOCTYPE.xml
---
(0026559)
sivaraman   
2010-04-22 08:23   
Steps to test: kindly follow all the steps as given in 'Steps To Reproduce' section.
(0026655)
sureshbabu   
2010-04-23 18:34   
(edited on: 2010-04-26 13:09)
Tested working fine

(0026676)
sureshbabu   
2010-04-26 13:11   
Tested in live qa PI build working fine
(0027266)
hudsonbot   
2010-05-14 15:27   
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/783d62a77511 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/36f76c8d7193 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17198.obx [^]