Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0031347Openbravo ERP04. Warehouse managementpublic2015-11-03 19:312015-11-23 21:17
aferraz 
aferraz 
immediatecriticalalways
closedfixed 
30Professional Appliance
 
3.0PR16Q1 
dmiguelez
Core
Packaging and release
2015-09-01
main
https://code.openbravo.com/erp/devel/pi/rev/d824566905ac [^]
No
0031347: Error when validating a Costing Rule with "Backdated Transactions Fixed" flag enabled
Error when validating a Costing Rule with "Backdated Transactions Fixed" flag enabled and a backdated adjustment needs to be created.
As F&B Admin:

- Create a Purchase Order for any product. Book it.
  Create a Goods Receipt from order and dated 10 days after today. Complete it.
  Run Costing Background process.

- Go to Costing Rule window and create a new one for España and Average algorithm, with warehouse dimension flag disabled and backdated transactions fixed flag enabled.
  Click on Validate Costing Rule.
  Run Costing Background process.

- Create another Costing Rule for España and Average algorithm, with warehouse dimension flag disabled and backdated transactions fixed flag enabled.
  Click on Validate Costing Rule.

Check an Error is shown: could not initialize proxy - no Session.
Check also in the log the following error is raised: @NoCostingRuleFoundForOrganizationAndDate@
Check if closing inventories created by a Costing Rule should create BDT adjustments.
If that case, check getCostDimensionRule method of CostingUtils.java
In any case, check also getCostDimensionRule method of CostingServer.java
No tags attached.
related to defect 0021406 closed gorkaion Costing Background Process blocked by Transactions without cost calculated. 
depends on backport 00313483.0PR15Q4 closed aferraz Error when validating a Costing Rule with "Backdated Transactions Fixed" flag enabled 
caused by defect 00307103.0PR15Q4 closed aferraz getCostDimensionRule method is not checking if Costing Rule is validated 
Issue History
2015-11-03 19:31aferrazNew Issue
2015-11-03 19:31aferrazAssigned To => aferraz
2015-11-03 19:31aferrazModules => Core
2015-11-03 19:31aferrazRegression level => Packaging and release
2015-11-03 19:31aferrazRegression date => 2015-09-01
2015-11-03 19:31aferrazRegression introduced in release => main
2015-11-03 19:31aferrazRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/d824566905ac [^]
2015-11-03 19:31aferrazTriggers an Emergency Pack => No
2015-11-03 19:54aferrazDescription Updatedbug_revision_view_page.php?rev_id=10038#r10038
2015-11-03 19:54aferrazSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=10040#r10040
2015-11-03 19:54aferrazProposed Solution updated
2015-11-03 20:31aferrazRelationship addedcaused by 0030710
2015-11-03 20:31aferrazRelationship addedrelated to 0021406
2015-11-03 20:49aferrazSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=10041#r10041
2015-11-03 21:07aferrazSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=10042#r10042
2015-11-03 21:25aferrazSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=10043#r10043
2015-11-03 21:26aferrazStatusnew => scheduled
2015-11-04 10:59psanjuanNote Added: 0081466
2015-11-04 11:00psanjuanNote Edited: 0081466bug_revision_view_page.php?bugnote_id=0081466#r10045
2015-11-04 11:01psanjuanNote Edited: 0081466bug_revision_view_page.php?bugnote_id=0081466#r10046
2015-11-04 11:05psanjuanNote Edited: 0081466bug_revision_view_page.php?bugnote_id=0081466#r10047
2015-11-04 11:06psanjuanNote Edited: 0081466bug_revision_view_page.php?bugnote_id=0081466#r10048
2015-11-04 11:06psanjuanNote Added: 0081467
2015-11-04 13:17hgbotCheckin
2015-11-04 13:17hgbotNote Added: 0081474
2015-11-04 13:17hgbotStatusscheduled => resolved
2015-11-04 13:17hgbotResolutionopen => fixed
2015-11-04 13:17hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/35ad61062735394def6e5c51fcce9ad46f5f9ac6 [^]
2015-11-04 13:18dmiguelezReview Assigned To => dmiguelez
2015-11-04 13:18dmiguelezNote Added: 0081475
2015-11-04 13:18dmiguelezStatusresolved => closed
2015-11-23 21:17hudsonbotCheckin
2015-11-23 21:17hudsonbotNote Added: 0082171

Notes
(0081466)
psanjuan   
2015-11-04 10:59   
(edited on: 2015-11-04 11:06)
Test Plan

In F&B España. Check that there is a costing rule validated set up as shown below:
* Costing Algorithm = Average
* Warehouse Dimension = No
* Backdated Transaction Fixed = No

Run Costing Background process so you can check it ends successfully.

Create a product named "Product 31347" for "F&B España", enter a price list "Tarifa Bebidas Alegres", unit/list price = 10.00

Go to purchase order window.
Create a Purchase Order for the product dated on today's date. Book it.
Create a Goods Receipt from order and dated 10 days after today's date. Complete it.
Run Costing Background process.

Go to Costing Rule window and create a new one for España and Average algorithm, with warehouse dimension flag disabled and backdated transactions fixed flag enabled.
Click on Validate Costing Rule.
Run Costing Background process.
Check that the process ends successfully.

Create another Costing Rule for España and Average algorithm, with warehouse dimension flag disabled and backdated transactions fixed flag enabled.
Click on Validate Costing Rule.
Check that the costing rule can be validated without any error.

(0081467)
psanjuan   
2015-11-04 11:06   
Issue verified.
Test Plan above also verified.

Issue can be code reviewed and closed.
(0081474)
hgbot   
2015-11-04 13:17   
Repository: erp/devel/pi
Changeset: 35ad61062735394def6e5c51fcce9ad46f5f9ac6
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Nov 03 21:18:14 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/35ad61062735394def6e5c51fcce9ad46f5f9ac6 [^]

Fixes issue 31347: Error when validating a Costing Rule with backdated enabled

When checking for the current validated costing rule, it should have an ending date greater or equal than current date.

---
M src/org/openbravo/costing/CostingServer.java
M src/org/openbravo/costing/CostingUtils.java
---
(0081475)
dmiguelez   
2015-11-04 13:18   
Code Review + Testing Ok
(0082171)
hudsonbot   
2015-11-23 21:17   
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/7b56bebaaa88 [^]
Maturity status: Test