Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0021957Openbravo ERP05. Production managementpublic2012-10-16 18:232012-10-22 13:27
VictorVillar 
dmiguelez 
immediatemajoralways
closedfixed 
5
pi 
 
Core
Production - QA Approved
2012-08-31
https://code.openbravo.com/erp/devel/pi/rev/8af60f70a49cc3abf00bdb3245742298b3abda84 [^]
yes
0021957: The costing migration process does not work
The costing migration process does not work. The process finishes successfully but it does not create the closing physical inventory and the opening physical inventory, after that no cost could be calculated.

The problem is the null date parameter passed to the createCostingRuleInits method

crp.createCostingRuleInits(rule.getId(), childOrgs, null);

the getStockLines query does not get any register
In MP 15 and followings..

As system admin role ,

Go to Costing migration Process and launch it.

realise that the process finishes successfully.

As group admin role,
   Go to Physical inventory window and realise that no closed physical inventory and opening physical inventory were created.
1.- add in CostingRuleProcess.java Line 347

if (date != null) {
      select.append(" and trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE
          + " < :date");
    }

check that PROPERTY_TRANSACTIONPROCESSDATE is correct.

2.- Add in Line 368:
  if (date != null) {
      stockLinesQry.setDate("date", date);
    }

The fix proposed before is not complete, it is necessary to make a decision what date pass to the method because in Costingruleprocess.java -- method CreateCostingRuleInitLine fails with date null because violates the not-null constratint inserting in the movementdate
No tags attached.
related to defect 0021406 closed gorkaion Costing Background Process blocked by Transactions without cost calculated. 
Issue History
2012-10-16 18:23VictorVillarNew Issue
2012-10-16 18:23VictorVillarAssigned To => dmiguelez
2012-10-16 18:23VictorVillarModules => Core
2012-10-16 18:24VictorVillarRegression level => Production - QA Approved
2012-10-16 18:24VictorVillarIssue Monitored: networkb
2012-10-17 13:59hgbotCheckin
2012-10-17 13:59hgbotNote Added: 0053421
2012-10-17 13:59hgbotStatusnew => resolved
2012-10-17 13:59hgbotResolutionopen => fixed
2012-10-17 13:59hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a6c8cf620986bba854fb6c5570cc361eb8fbfbdc [^]
2012-10-17 15:31VictorVillarReview Assigned To => VictorVillar
2012-10-17 15:31VictorVillarNote Added: 0053424
2012-10-17 15:31VictorVillarStatusresolved => closed
2012-10-17 17:44VictorVillarNote Added: 0053432
2012-10-17 17:44VictorVillarStatusclosed => new
2012-10-17 17:44VictorVillarResolutionfixed => open
2012-10-17 17:46VictorVillarRegression date => 2012-08-31
2012-10-17 17:46VictorVillarRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/8af60f70a49cc3abf00bdb3245742298b3abda84 [^]
2012-10-17 17:47VictorVillarStatusnew => scheduled
2012-10-17 17:47VictorVillarNote Added: 0053433
2012-10-17 17:47VictorVillarfix_in_branch => pi
2012-10-17 17:47VictorVillarNote Added: 0053434
2012-10-17 17:47VictorVillarStatusscheduled => resolved
2012-10-17 17:47VictorVillarResolutionopen => fixed
2012-10-17 17:48VictorVillarNote Added: 0053436
2012-10-17 17:48VictorVillarStatusresolved => closed
2012-10-17 18:20dmiguelezStatusclosed => new
2012-10-17 18:20dmiguelezResolutionfixed => open
2012-10-17 18:20dmiguelezRelationship addedrelated to 0021406
2012-10-17 18:20dmiguelezStatusnew => scheduled
2012-10-17 18:20dmiguelezStatusscheduled => resolved
2012-10-17 18:20dmiguelezResolutionopen => fixed
2012-10-17 18:20dmiguelezStatusresolved => closed
2012-10-22 13:27hudsonbotCheckin
2012-10-22 13:27hudsonbotNote Added: 0053512

Notes
(0053421)
hgbot   
2012-10-17 13:59   
Repository: erp/devel/pi
Changeset: a6c8cf620986bba854fb6c5570cc361eb8fbfbdc
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Wed Oct 17 13:58:55 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a6c8cf620986bba854fb6c5570cc361eb8fbfbdc [^]

Fixes issue 21957: Fixes issue when date is null.

---
M src/org/openbravo/costing/CostingMigrationProcess.java
M src/org/openbravo/costing/CostingRuleProcess.java
---
(0053424)
VictorVillar   
2012-10-17 15:31   
Verified by Victor Villar + Code Review by Gorka Ion
(0053432)
VictorVillar   
2012-10-17 17:44   
fill regression fields
(0053433)
VictorVillar   
2012-10-17 17:47   
Closed again after filling the Regression fields
(0053434)
VictorVillar   
2012-10-17 17:47   
Closed again after filling the Regression fields
(0053436)
VictorVillar   
2012-10-17 17:48   
Closed again after filling the Regression fields
(0053512)
hudsonbot   
2012-10-22 13:27   
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/483f2e6dc1af [^]

Maturity status: Test