Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0038206
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] I. Performancemajoralways2018-03-22 18:292018-05-09 19:29
ReportergorkaionView Statuspublic 
Assigned Tocollazoandy4 
PriorityurgentResolutionfixedFixed in Version3.0PR18Q3
StatusclosedFix in branchFixed in SCM revision4a8d9e451d4d
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Todmiguelez
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0038206: Cost Adjustment Process generates too much lines

DescriptionA 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 ReproduceOn 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 SolutionChange 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)
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0038205 closedcollazoandy4 Cost Adjustment Process very slow 

-  Notes
(0104213)
collazoandy4 (developer)
2018-05-02 18:16

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
(0104273)
hgbot (developer)
2018-05-04 09:27

Repository: erp/devel/pi
Changeset: 4a8d9e451d4dc7635a15dd4f399ef00053f475d1
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.

---
M src-test/src/org/openbravo/test/costing/TestCostingNoSourceAdjustments.java
M src-test/src/org/openbravo/test/costing/assertclass/CostAdjustmentAssert.java
M src-test/src/org/openbravo/test/costing/utils/TestCostingUtils.java
M src/org/openbravo/costing/CostAdjustmentUtils.java
M src/org/openbravo/costing/CostingAlgorithmAdjustmentImp.java
---
(0104277)
dmiguelez (developer)
2018-05-04 09:29

Code Review + Testing Ok
(0104430)
hudsonbot (developer)
2018-05-09 19:29

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

- Issue History
Date Modified Username Field Change
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 Checkin
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 Checkin
2018-05-09 19:29 hudsonbot Note Added: 0104430


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker