Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0012276Openbravo ERPA. Platformpublic2010-02-15 13:162010-03-10 18:30
sureshbabu 
shuehner 
highmajoralways
closedno change required 
30
 
 
Core
No
0012276: In the Audit trial - Deleted Records window, dummy row appears while showing Price adjustment details
In the Audit trial - Deleted Records window, dummy row appears while showing Price adjustment details

Login as system Admin

Then Naviagte to Application Dictionary || Tables and Columns || Table
And check the "Fully audited checkbox" for all the below tables
C_order,
C_Order_Discount
C_Order_Header_V
C_OrderLine,
C_Orderline_Offer,
C_OrderLineTax,
C_OrderLineTax_V,
C_order_Open,
C_orderTax


Then start the "Update Audit Trail Infrasture" process


Navigate to Master Data Management || Pricing || Price Adjustments || Adjustments
click new
Enter Name: testing 2
Starting Date: 01-01-2010
Discount: 10%
Include Business Partner: All Selected
Include Products: All Selected


Move to product tab;
Click new
Select : any valid product (Product 1)
Click new
Select : any valid product (Product 2)
Click new
Select : any valid product (Product 3)

Move to Business partner tab
Click new
Select : any valid BP (BP1)



Navigate to Sales Orde window
Clck new to create a new sales order
And enter the required details
Document Type: Standard oder
BP: Any valid Customer (BP1)
Click Save
Move to lines tab
Click new to create a new line item:10
Select any product (Product 1)

Then Click new to create a new line item:20
Select any product (Product 2)
Qty : 10

Save the grid

Again open the product 2 in form view
And change the Qty from 10 to 20

Then Delete line item:20

"One Row Deleted" message appears

From Line Item:10

Click "Show Audit Trial" icon
Then click "View Deleted Records" link
verify the line 20 appears in the table.

Then click the "Price Adjustments" link at the bottom of the window..


Actual Result: Two records (rows) appears, both with having same "Price Adjustment Amt" & "Adjusted price"
Audit trial
jpg Attribute set details appears with same Adjusted price.JPG (221,289) 2010-02-15 13:16
https://issues.openbravo.com/file_download.php?file_id=2220&type=bug
jpg
Issue History
2010-02-15 13:16sureshbabuNew Issue
2010-02-15 13:16sureshbabuAssigned To => alostale
2010-02-15 13:16sureshbabuFile Added: Attribute set details appears with same Adjusted price.JPG
2010-02-15 13:16sureshbabuTag Attached: Audit trial
2010-02-15 13:37alostaleStatusnew => scheduled
2010-02-15 13:37alostaleAssigned Toalostale => shuehner
2010-02-15 13:37alostalefix_in_branch => pi
2010-02-15 16:01shuehnerNote Added: 0024274
2010-02-15 16:01shuehnerStatusscheduled => closed
2010-02-15 16:01shuehnerResolutionopen => no change required
2010-02-16 00:00anonymoussf_bug_id0 =>
2010-03-10 18:30anonymoussf_bug_id => 2968073

Notes
(0024274)
shuehner   
2010-02-15 16:01   
The described behaviour is correct, as after executing the given steps to reproduce there are two deleted price adjustment lines for the order line (20).

Background:
When some fields of an order line line are changed (i.e. quantity ordered) then the trigger c_orderline_trg2 deletes the attached price adjustments lines (and probably recreates them with changes values thereafter).

This leads to two deleted lines, first one for the quantity change from 10 to 20, second one for the order line deletion.

Can be checked by changing the quantity multiple times, then deleting the order line. Which leads to having even more 'duplicate looking' price adjustment lines.

Note: If that behaviour is unwanted a independent issue should/needs to be opened against the c_orderline_trg2 logic to update the price adjustments instead of deleting/creating them (on a order line change), if that is technically feasible.