Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0032504Openbravo ERP04. Warehouse managementpublic2016-03-18 11:142016-06-28 16:43
VictorVillar 
aferraz 
immediatemajoralways
closedfixed 
5
pi 
3.0PR16Q33.0PR16Q3 
dmiguelez
Core
No
0032504: Huge performance problem in the costing background process and using the Negative stock correction too
Huge performance problem in the costing background process and using the Negative stock correction too
Huge performance problem in the costing background process and using the Negative stock correction too
No tags attached.
depends on defect 00327033.0PR16Q3 closed aferraz API Change Request: Change cumqty column name in M_Costing table 
related to design defect 0032493 closed vmromanos Pareto Product Report takes too long in an environment with big amount of data 
related to defect 00334113.0PR17Q1 closed dmiguelez Bad performance Costing Background process using 3 types of adjustments 
related to defect 0035959 closed markmm82 Performance problem in Costing Migration Process with high volume of records in m_transaction table 
blocks feature request 0032676 new Triage Omni WMS It would be nice to have a process to calculate old cumqty values in m_coting table 
causes defect 00333913.0PR16Q4 closed dmiguelez Not possible to launch the costing background process because manual costing registers 
causes defect 00339683.0PR17Q1 closed dmiguelez Wrong costs calculated with Backdated Transactions 
Issue History
2016-03-18 11:14VictorVillarNew Issue
2016-03-18 11:14VictorVillarAssigned To => Triage Finance
2016-03-18 11:14VictorVillarModules => Core
2016-03-18 11:14VictorVillarResolution time => 1458860400
2016-03-18 11:14VictorVillarTriggers an Emergency Pack => No
2016-03-18 11:23aferrazStatusnew => scheduled
2016-03-18 11:23aferrazAssigned ToTriage Finance => aferraz
2016-03-29 11:14VictorVillarResolution time1458860400 => 1460066400
2016-04-15 11:18aferrazRelationship addedblocks 0032676
2016-04-19 10:24aferrazRelationship addeddepends on 0032703
2016-04-19 14:45aferrazRelationship addedrelated to 0032493
2016-04-20 21:01hgbotCheckin
2016-04-20 21:01hgbotNote Added: 0085800
2016-04-20 21:01hgbotStatusscheduled => resolved
2016-04-20 21:01hgbotResolutionopen => fixed
2016-04-20 21:01hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/5406f70dad91912646aa834dbe7b097e0d11f65e [^]
2016-04-20 21:01hgbotCheckin
2016-04-20 21:01hgbotNote Added: 0085801
2016-04-20 21:02hgbotCheckin
2016-04-20 21:02hgbotNote Added: 0085802
2016-04-21 10:07dmiguelezReview Assigned To => dmiguelez
2016-04-21 10:07dmiguelezNote Added: 0085815
2016-04-21 10:07dmiguelezStatusresolved => closed
2016-04-25 19:28hgbotCheckin
2016-04-25 19:28hgbotNote Added: 0085968
2016-05-11 17:08hgbotCheckin
2016-05-11 17:08hgbotNote Added: 0086385
2016-06-17 19:37hudsonbotCheckin
2016-06-17 19:37hudsonbotNote Added: 0087473
2016-06-17 19:37hudsonbotCheckin
2016-06-17 19:37hudsonbotNote Added: 0087474
2016-06-17 19:37hudsonbotCheckin
2016-06-17 19:37hudsonbotNote Added: 0087490
2016-06-17 19:37hudsonbotCheckin
2016-06-17 19:37hudsonbotNote Added: 0087533
2016-06-28 16:43aferrazFixed in Version => 3.0PR16Q3
2016-06-28 16:43aferrazTarget Version => 3.0PR16Q3
2016-07-20 11:25aferrazRelationship addedrelated to 0033411
2016-08-20 11:43aferrazRelationship addedcauses 0033391
2016-09-16 13:32aferrazRelationship addedcauses 0033968
2017-05-09 12:30aferrazRelationship addedrelated to 0035959

Notes
(0085800)
hgbot   
2016-04-20 21:01   
Repository: erp/devel/pi
Changeset: 5406f70dad91912646aa834dbe7b097e0d11f65e
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Apr 18 17:42:14 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/5406f70dad91912646aa834dbe7b097e0d11f65e [^]

Fixes issue 32504: Improve performance of Costing process

- Add new column cumcost in M_Costing table
- Make some queries in CostingUtils and CostAdjustmentUtils incremental using cumqty and cumcost from current m_costing record to avoid sum every record in m_transaction and m_transaction_cost tables.
- Avoid join m_transaction with m_locator if current costing rule has no warehouse dimension.
- Improve CostingServer checkCostAdjustments method to do query only if needed.
- Avoid count query in CostingBackground process.
- Add indexes in m_costing table: (m_product_id, datefrom, dateto) and (m_transaction_id).
- Change in AverageCostAdjustment: cost will be taken from trxPrice in case current stock is zero.
- Update cumqty column name to cumstock in M_Costing table to set it as NULL and delete it in F&B International Group and QA Testing clients sampledata.
- Assert new m_costing cumcost column in TestCosting.

---
M referencedata/sampledata/F_B_International_Group/M_COSTING.xml
M referencedata/sampledata/QA_Testing/M_COSTING.xml
M src-db/database/model/tables/M_COSTING.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src-test/src/org/openbravo/test/costing/TestCosting.java
M src/org/openbravo/costing/AverageAlgorithm.java
M src/org/openbravo/costing/AverageCostAdjustment.java
M src/org/openbravo/costing/CostAdjustmentUtils.java
M src/org/openbravo/costing/CostingBackground.java
M src/org/openbravo/costing/CostingMigrationProcess.java
M src/org/openbravo/costing/CostingServer.java
M src/org/openbravo/costing/CostingUtils.java
M src/org/openbravo/costing/InventoryAmountUpdateProcess.java
---
(0085801)
hgbot   
2016-04-20 21:01   
Repository: erp/devel/pi
Changeset: 3a6d42921cb68f7b2021ec998718bcd26fb393d8
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed Apr 13 16:32:27 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/3a6d42921cb68f7b2021ec998718bcd26fb393d8 [^]

Related to issue 32504: Add some sleeps in TestCosting to avoid assert errors

---
M src-test/src/org/openbravo/test/costing/TestCosting.java
---
(0085802)
hgbot   
2016-04-20 21:02   
Repository: erp/devel/api-checks
Changeset: 02dbd212f15bfe1a84f0d0ba3fcf44ab956de789
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed Apr 20 21:00:35 2016 +0200
URL: http://code.openbravo.com/erp/devel/api-checks/rev/02dbd212f15bfe1a84f0d0ba3fcf44ab956de789 [^]

Fixes issue 32703: API change for issue 32504

---
M model/src-db/database/model/tables/M_COSTING.xml
M model/src-db/database/sourcedata/AD_COLUMN.xml
M model/src-db/database/sourcedata/AD_ELEMENT.xml
M model/src-db/database/sourcedata/AD_FIELD.xml
A java.japi.gz
---
(0085815)
dmiguelez   
2016-04-21 10:07   
Code Review + Testing OK
(0085968)
hgbot   
2016-04-25 19:28   
Repository: erp/devel/pi
Changeset: 5df88a3c4cd138158bb26d1fc7467caa57b57cbe
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Apr 25 18:48:59 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/5df88a3c4cd138158bb26d1fc7467caa57b57cbe [^]

Related to issue 32504: Remove cumqty value calculation in production

References to old m_costing cumqty column have been removed from Production cost calculation and old Cost Engine as it was calculated but never used.

---
M src-db/database/model/functions/MA_PRODUCTION_COST.xml
M src-db/database/model/functions/M_GENERATE_AVERAGE_COSTS.xml
M src-db/database/model/functions/M_GENERATE_STANDARD_COSTS.xml
---
(0086385)
hgbot   
2016-05-11 17:08   
Repository: erp/devel/pi
Changeset: 20100cb9945a14007ac0fe9fddd03e77b0a6daa2
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed May 11 12:36:52 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/20100cb9945a14007ac0fe9fddd03e77b0a6daa2 [^]

Related to issue 32504: Add one more sleep in MCC1 costing test.

---
M src-test/src/org/openbravo/test/costing/TestCosting.java
---
(0087473)
hudsonbot   
2016-06-17 19:37   
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/0dc7be081b1c [^]
Maturity status: Test
(0087474)
hudsonbot   
2016-06-17 19:37   
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/0dc7be081b1c [^]
Maturity status: Test
(0087490)
hudsonbot   
2016-06-17 19:37   
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/0dc7be081b1c [^]
Maturity status: Test
(0087533)
hudsonbot   
2016-06-17 19:37   
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/0dc7be081b1c [^]
Maturity status: Test