Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0012187Openbravo ERP07. Sales managementpublic2010-01-29 18:082010-04-26 07:22
maite 
sivaraman 
highmajoralways
closedfixed 
5
2.40MP11 
 
Core
No
0012187: Is not possible to modify the price of a sales order line if it has been delivered
You have a sales order and its goods shipment. Then you realize that price of one of the lines is incorrect and you reactivate the order to modify it (as it has not been invoiced yet).
When you try to save the line you get the following error:

Cannot modify an order line that has deliveries or invoices ORA-06512: at "TAD_240_FULL.C_ORDLINE_CHK_RESTRICTIONS_TRG", line 62 ORA-04088: error during execution of trigger 'TAD_240_FULL.C_ORDLINE_CHK_RESTRICTIONS_TRG'
1. Sales Management || Transactions || Sales Order: create standard order for any business partner
2. Sales Management || Transactions || Sales Order || Header >> Lines :add one line for any product and complete the order.
3. Generate its goods shipment
4. Come back to the order and reactivate it
5. Go to the line and modify its unit price
6. Try to save the line and you will get the error.
No tags attached.
blocks defect 0012091 closed harikrishnan Is not possible to modify the price of a sales order line if it has been delivered 
jpg 240error.JPG (218,930) 2010-02-12 12:28
https://issues.openbravo.com/file_download.php?file_id=2204&type=bug
jpg
Issue History
2010-02-09 12:06rafarodaTypedefect => backport
2010-02-09 12:06rafarodafix_in_branch => 2.40
2010-02-09 13:18hgbotCheckin
2010-02-09 13:18hgbotNote Added: 0024059
2010-02-09 13:18hgbotStatusscheduled => resolved
2010-02-09 13:18hgbotResolutionopen => fixed
2010-02-09 13:18hgbotFixed in SCM revision => http://code.openbravo.com/erp/stable/2.40/rev/8b4a8278ece7c61fd9d500d4abad7a488ee46556 [^]
2010-02-09 13:22harikrishnanNote Added: 0024060
2010-02-12 12:28arunkumarNote Added: 0024202
2010-02-12 12:28arunkumarStatusresolved => new
2010-02-12 12:28arunkumarResolutionfixed => open
2010-02-12 12:28arunkumarFile Added: 240error.JPG
2010-02-12 12:28arunkumarStatusnew => scheduled
2010-02-12 12:28arunkumarfix_in_branch2.40 => pi
2010-02-12 12:50arunkumarNote Added: 0024203
2010-03-26 06:25sivaramanAssigned Toharikrishnan => sivaraman
2010-03-26 06:27hgbotCheckin
2010-03-26 06:27hgbotNote Added: 0025746
2010-03-26 06:27hgbotStatusscheduled => resolved
2010-03-26 06:27hgbotResolutionopen => fixed
2010-03-26 06:27hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/stable/2.40/rev/8b4a8278ece7c61fd9d500d4abad7a488ee46556 [^] => http://code.openbravo.com/erp/stable/2.40/rev/7be5072247133c10f48728319bf6b9b1e06c231f [^]
2010-03-26 06:30sivaramanNote Added: 0025747
2010-04-26 07:22sureshbabuNote Added: 0026662
2010-04-26 07:22sureshbabuStatusresolved => closed

Notes
(0024059)
hgbot   
2010-02-09 13:18   
Repository: erp/stable/2.40
Changeset: 8b4a8278ece7c61fd9d500d4abad7a488ee46556
Author: Harikrishnan Raja <harikrishnan.raja <at> openbravo.com>
Date: Tue Feb 09 17:48:14 2010 +0530
URL: http://code.openbravo.com/erp/stable/2.40/rev/8b4a8278ece7c61fd9d500d4abad7a488ee46556 [^]

Fixes Issue 12187: Is not possible to modify the price of a sales order line if it has been delivered.

---
M src-db/database/model/triggers/C_ORDLINE_CHK_RESTRICTIONS_TRG.xml
---
(0024060)
harikrishnan   
2010-02-09 13:22   
Steps To test:

*Create a sales order (Sales Management || Transactions || Sales Order || Header ) with any value in Business Partner field.
*Select a product inside the line and complete the sales order.
*Go to Goods Shipment (Sales Management || Transactions || Goods Shipment || Header ) and create the shipment for the above sales order using the button "Create Lines From".Complete the Goods Shipment.
*Reactivate the above created sales order.And try to change the Net Unit Price of the Product and save it.Now the price can be changed.Again complete the sales order.
*Create a new sales invoice for the above created sales order.And complete the sales invoice.
*Again reactivate the above sales order,now the price can't be changed.
(0024202)
arunkumar   
2010-02-12 12:28   
I completed a sales order and Goods shipment. Now I created and completed a sales invoice for this. Now I reactivated the sales order and went to the sales order lines and tried to change the unit net price . I have got the error message. That is correct But it adds up the trigger also there. The trigger message should be avoided.(Please refer the screenshot).
(0024203)
arunkumar   
2010-02-12 12:50   
The trigger message shows up only in oracle environment. In postgres environment only error message shows up. No trigger message is there.
(0025746)
hgbot   
2010-03-26 06:27   
Repository: erp/stable/2.40
Changeset: 7be5072247133c10f48728319bf6b9b1e06c231f
Author: Sivaraman Rajagopal <sivaraman.rajagopal <at> openbravo.com>
Date: Fri Mar 26 11:05:23 2010 +0530
URL: http://code.openbravo.com/erp/stable/2.40/rev/7be5072247133c10f48728319bf6b9b1e06c231f [^]

Fixes issue 12187: Is not possible to modify the price of a sales order line if it has been delivered

---
M src-db/database/model/triggers/C_ORDLINE_CHK_RESTRICTIONS_TRG.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
---
(0025747)
sivaraman   
2010-03-26 06:30   
Trigger message has been changed as reported by arunkumar.
(0026662)
sureshbabu   
2010-04-26 07:22   
Tested working fine