|View Issue Details|
|Type||Category||Severity||Reproducibility||Date Submitted||Last Update|
|defect||[Openbravo ERP] I. Performance||major||always||2018-03-22 18:29||2018-05-09 19:29|
|Priority||urgent||Resolution||fixed||Fixed in Version||3.0PR18Q3|
|Status||closed||Fix in branch||Fixed in SCM revision||4a8d9e451d4d|
|OS Version||Database version||Ant version|
|Product Version||SCM revision|
|Review Assigned To||dmiguelez|
|Regression introduced in release|
|Regression introduced by commit|
|Triggers an Emergency Pack||No|
0038206: Cost Adjustment Process generates too much lines
|Description||A Cost Adjustment on an environment with 16k transactions and adjusting 11.5k transactions generates 237k lines when attributes and manufacturing are involved.|
When adjusting a product used as Raw Material in a Production the same m_transaction can be added several times in different cost adjustment lines.
For example, consider a manufacturing that generates 2 different products of different lots. and consumes different lots of the same raw material.
We have these transactions-
Trx 1 P- Raw Material A Lot1 -5
Trx 2 P- Raw Material A Lot2 -5
Trx 3 P- Raw Material A Lot3 -2
Trx 4 P+ Produced A Lot1 +2
Trx 5 P+ Produced A Lot2 +2
Trx 6 P+ Produced B Lot1 +1
Trx 7 P+ Produced B Lot1 +1
When adjusting the trx1 the searchManufacturingProduced() addes a cost adjustment line for trx 4 to 7.
Next trx2 is adjusted and again it addes new lines for trx4 to 7.
Next trx3 is adjusted and again it addes new lines for trx4 to 7.
Resulting in 12 cost adjustment lines for 4 transactions. In a customer instance there is and adjustment where a single transaction has been adjusted in more than 200 lines.
|Steps To Reproduce||On an environment with around 16k transactions using manufacturing.|
Execute a Cost Adjustment on one of the oldest transactions of a raw material.
This adjustment will also impact all items produced with that raw material resulting in a cost adjustment including many m_transactions, and much more adjustment lines.
|Proposed Solution||Change how related lines are added to reduce the number of cost adjustment lines.It has no sense to have an average of 20 cost adjustment lines on a cost adjustment (237k lines of just 11.5k trx)|
|Tags||No tags attached.|
On an environment with 13 559 transactions made and adjustment of one transaction for a BOM product, the adjustment process create a cost adjustment with 264 760 lines.
With the fix for this issue applied on this environment the adjustment process create a cost adjustment with only 53 751 lines
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Wed Apr 25 21:37:01 2018 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/4a8d9e451d4dc7635a15dd4f399ef00053f475d1 [^]
Fixes issue 38206: Cost Adjustment Process generates too much lines
When adjusting a product used as Raw Material in a Production the same
m_transaction can be added several times in different cost adjustment lines.
Now when exists a non processed cost adjustment line for the same transaccion,
currency, accounting date and source the adjusted amount is added instance of
create a new adjustment line.
|Code Review + Testing Ok|
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/2be7d3efe606 [^]
Maturity status: Test
|2018-03-22 18:29||gorkaion||New Issue|
|2018-03-22 18:29||gorkaion||Assigned To||=> Triage Finance|
|2018-03-22 18:29||gorkaion||Modules||=> Core|
|2018-03-22 18:29||gorkaion||Triggers an Emergency Pack||=> No|
|2018-03-22 18:29||gorkaion||Issue generated from||0038205|
|2018-03-22 18:31||gorkaion||Relationship added||related to 0038205|
|2018-03-23 10:16||ngarcia||Issue Monitored: ngarcia|
|2018-04-09 19:35||aferraz||Assigned To||Triage Finance => collazoandy4|
|2018-04-12 17:22||collazoandy4||Status||new => scheduled|
|2018-04-17 08:48||dmiguelez||Status||scheduled => feedback|
|2018-04-20 13:09||gorkaion||Status||feedback => scheduled|
|2018-05-02 18:16||collazoandy4||Note Added: 0104213|
|2018-05-04 09:27||hgbot||Note Added: 0104273|
|2018-05-04 09:27||hgbot||Status||scheduled => resolved|
|2018-05-04 09:27||hgbot||Resolution||open => fixed|
|2018-05-04 09:27||hgbot||Fixed in SCM revision||=> http://code.openbravo.com/erp/devel/pi/rev/4a8d9e451d4dc7635a15dd4f399ef00053f475d1 [^]|
|2018-05-04 09:29||dmiguelez||Review Assigned To||=> dmiguelez|
|2018-05-04 09:29||dmiguelez||Note Added: 0104277|
|2018-05-04 09:29||dmiguelez||Status||resolved => closed|
|2018-05-04 09:29||dmiguelez||Fixed in Version||=> 3.0PR18Q3|
|2018-05-09 19:29||hudsonbot||Note Added: 0104430|
|Copyright © 2000 - 2009 MantisBT Group|