Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029094Openbravo ERP03. Procurement managementpublic2015-02-27 15:182015-03-31 00:07
VictorVillar 
reinaldoguerra 
urgentmajoralways
closedfixed 
5
 
3.0PR15Q2 
vmromanos
Core
No
0029094: Wrong behaviour of Generate Receipt from invoice, generates too many receipts
Wrong behaviour of Generate Receipt from invoice, generate too many receipts.
As group Admin role,
 Go to Purchase Order
    create a new one.
    qty: 1
    Complete it
 Go to Goods Receipt
    create a new one related to the previous Order
    Complete it.
 Go to Purchase order,
    create a new one related to the previous Receipt
    Complete it.
Click on Generate Receipt from invoice (shoudl be shown, is not displayed by default). You can repeat this action as many times you like.

That is wrong. Also, it is generated a wrong relation between Receipt and the invoice. Should be fixed with a script/module script.
No tags attached.
Issue History
2015-02-27 15:18VictorVillarNew Issue
2015-02-27 15:18VictorVillarAssigned To => Sandrahuguet
2015-02-27 15:18VictorVillarModules => Core
2015-02-27 15:18VictorVillarResolution time => 1426806000
2015-02-27 15:18VictorVillarTriggers an Emergency Pack => No
2015-02-27 15:18VictorVillarIssue Monitored: networkb
2015-03-03 21:20reinaldoguerraAssigned ToSandrahuguet => reinaldoguerra
2015-03-03 21:20reinaldoguerraStatusnew => scheduled
2015-03-05 00:38reinaldoguerraNote Added: 0075181
2015-03-27 11:42hgbotCheckin
2015-03-27 11:42hgbotNote Added: 0076070
2015-03-27 11:42hgbotStatusscheduled => resolved
2015-03-27 11:42hgbotResolutionopen => fixed
2015-03-27 11:42hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/91b7e873c3b12a21f0a08de5d1140d69454b6890 [^]
2015-03-27 11:43vmromanosReview Assigned To => vmromanos
2015-03-27 11:43vmromanosNote Added: 0076071
2015-03-27 11:43vmromanosStatusresolved => closed
2015-03-31 00:07hudsonbotCheckin
2015-03-31 00:07hudsonbotNote Added: 0076159

Notes
(0075181)
reinaldoguerra   
2015-03-05 00:38   
Test plan used:
1- Login into Openbravo ERP
2- As syetem administrator go to Purchase Invoice window
3- Select header tab and go to Fields tab
4- Check Displayed option for the field "Generate Receipt from Invoice"
5- Logout and login again
6- Go to Purchase Order and create a new header
7- Go to lines tab and create a new one.
8- Select a product, qty: 1
9- Book it
10- Go to Goods Receipt window and create a new header (same order's business partner and organization)
11- Click on Create Lines From button, select previous created order, enter a storage bin in the grid's record and click OK button
12- Complete the receipt.
13- Go to Purchase invoice window and create a new header
14- Click on Create Lines From button, select previous created receipt, select grid's record and click OK button
15- Realize that button "Generate Receipt from Invoice" does not appear.
16- Complete the invoice
17- Now the button will be shown. Click on it and a new receipt will be generated
18- Click the button again and now an error message will be shown indicating that a Receipt (Shipment) already exists for this invoice.
(0076070)
hgbot   
2015-03-27 11:42   
Repository: erp/devel/pi
Changeset: 91b7e873c3b12a21f0a08de5d1140d69454b6890
Author: Reinaldo Guerra <reinaldo.guerra <at> peoplewalking.com>
Date: Wed Mar 04 22:20:33 2015 -0500
URL: http://code.openbravo.com/erp/devel/pi/rev/91b7e873c3b12a21f0a08de5d1140d69454b6890 [^]

Fixed bug 29094: Generate Receipt from Invoice generates too many receipts.

Stored procedure called when Generate Receipt from Invoice process is executed, was returning null when catching the exception launched during regeneration of receitp from the same invoice. This code was removed from the stored procedure, so now the exception is raised and the error message is shown successfuly. No wrong relation is generated between the new Receipt and the Invoice.
Another solution would be to relaunch the exception instead of returning null.
Also display's logic for field "Generate Receipt from Invoice" was changed to show the button when the invoice is processed.

---
M src-db/database/model/functions/C_INVOICE_CREATERECEIPT.xml
M src-db/database/sourcedata/AD_FIELD.xml
---
(0076071)
vmromanos   
2015-03-27 11:43   
Code review + testing OK
(0076159)
hudsonbot   
2015-03-31 00:07   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/34da08f135b8 [^]
Maturity status: Test