Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0037279Openbravo ERP04. Warehouse managementpublic2017-11-13 12:182018-03-23 21:22
ngarcia 
nonofrancisco 
urgentmajoralways
closedfixed 
5
 
3.0PR18Q2 
dmiguelez
Core
No
0037279: Physical Inventory lines which increase stock and do not have a cost defined are not adjusted
Physical Inventory lines which increase stock and do not have a cost defined are not adjusted
As group admin role:
   Create a new product and add a purchase price list of 3 to it
   Create a purchase order and goods receipt for 1 unit of that product
   Launch Costing Background Process
   Create a Purchase Invoice, add the previously created goods receipt and increase its price to 10
   Launch Process Price Difference Adjustment process for the product
   Check the current average cost has been increased from 3 to 10 and the goods receipt adjusted
   Create a physical inventory and increase the stock of the product in 1 unit
   Void the purchase invoice and create a new one without modifying product price (leaving it as 3)
   Launch Process Price Difference Adjustment process for the product
   Check goods receipt line has been adjusted but physical inventory line hasn't been adjusted. The current average cost has been calculated as 6.5 and it should be 3
No tags attached.
causes defect 0038157 closed collazoandy4 Receipts originally calculated with avg and adjusted by price difference correction are readjusted if avg cost changes 
diff propsed_solution.diff (3,581) 2017-12-24 18:35
https://issues.openbravo.com/file_download.php?file_id=11390&type=bug
Issue History
2017-11-13 12:18ngarciaNew Issue
2017-11-13 12:18ngarciaAssigned To => Triage Finance
2017-11-13 12:18ngarciaModules => Core
2017-11-13 12:18ngarciaResolution time => 1512342000
2017-11-13 12:18ngarciaTriggers an Emergency Pack => No
2017-11-13 12:18ngarciaIssue Monitored: networkb
2017-11-13 12:25ngarciaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=16273#r16273
2017-11-13 16:15dmiguelezAssigned ToTriage Finance => nonofrancisco
2017-11-14 16:09nonofranciscoStatusnew => scheduled
2017-11-16 16:13dmiguelezNote Added: 0100552
2017-12-24 18:35dmiguelezFile Added: propsed_solution.diff
2018-01-04 16:30dmiguelezResolution time1512342000 => 1516834800
2018-01-17 17:04PracticsIssue Monitored: Practics
2018-01-17 17:08hgbotCheckin
2018-01-17 17:08hgbotNote Added: 0101759
2018-01-17 17:08hgbotStatusscheduled => resolved
2018-01-17 17:08hgbotResolutionopen => fixed
2018-01-17 17:08hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/6fc5c9829dff02db5bb10f5f3b09c2cb137ef0d0 [^]
2018-01-17 17:08hgbotCheckin
2018-01-17 17:08hgbotNote Added: 0101760
2018-01-17 17:09dmiguelezReview Assigned To => dmiguelez
2018-01-17 17:10dmiguelezNote Added: 0101763
2018-01-17 17:10dmiguelezStatusresolved => closed
2018-01-17 17:10dmiguelezFixed in Version => 3.0PR18Q2
2018-01-18 17:38hgbotCheckin
2018-01-18 17:38hgbotNote Added: 0101774
2018-01-30 14:38jfrancesIssue Monitored: jfrances
2018-02-22 18:18hudsonbotCheckin
2018-02-22 18:18hudsonbotNote Added: 0102660
2018-02-22 18:18hudsonbotCheckin
2018-02-22 18:18hudsonbotNote Added: 0102661
2018-02-22 18:18hudsonbotCheckin
2018-02-22 18:18hudsonbotNote Added: 0102666
2018-03-16 10:53gorkaionRelationship addedcauses 0038157
2018-03-23 09:34hgbotCheckin
2018-03-23 09:34hgbotNote Added: 0103461
2018-03-23 21:22hudsonbotCheckin
2018-03-23 21:22hudsonbotNote Added: 0103480

Notes
(0100552)
dmiguelez   
2017-11-16 16:13   
As group admin role:
   Create a new product and add a purchase price list of 3 to it
   Create a purchase order and a related goods receipt for 1 unit of that product
   Launch Costing Background Process
   Create a Purchase Invoice, add the previously created goods receipt and increase its price to 10
   Launch Process Price Difference Adjustment process for the product
   Check the current average cost has been increased from 3 to 10 and the goods receipt adjusted
   Create a physical inventory and increase the stock of the product in 1 unit
   Launch Costing Background Process
   Check that the physical inventory transaction has been calculated and it's cost is 10
   Void the purchase invoice and create a new one without modifying product price (leaving it as 3)
   Launch Process Price Difference Adjustment process for the product
   Check that both goods receipt line and physical inventory has been adjusted and the cost for both is 3.
   Also, the current average cost is 3
(0101759)
hgbot   
2018-01-17 17:08   
Repository: erp/devel/pi
Changeset: 6fc5c9829dff02db5bb10f5f3b09c2cb137ef0d0
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Mon Jan 15 12:58:08 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/6fc5c9829dff02db5bb10f5f3b09c2cb137ef0d0 [^]

Fixes Issue 37279. Corrects Transactions affected by Average cost adjustments

When a Cost Adjustment is created, some transactions are affected by this change
For Average Cost adjustment, the transactions that modifies the average cost,
but has used the actual average cost in it's calculation must be taken into
account.

---
M src/org/openbravo/costing/AverageCostAdjustment.java
---
(0101760)
hgbot   
2018-01-17 17:08   
Repository: erp/devel/pi
Changeset: 77e3e788178b8c8ee6d48e160e69a337688d5b7a
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Wed Jan 17 16:50:04 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/77e3e788178b8c8ee6d48e160e69a337688d5b7a [^]

Related to Issue 37279. Fixes automated test after fixing issue:

* Changed amounts of automated test LC3LC4
* Changed logic asserting the distributed amount of a Landed Cost between
  it's related Recipt lines
    * For each transacion it calculates it's cost as the original Transaction
      Cost plus the Cost of the previous Unit Cost adjustments
* Reload and refresh the Landed Cost object when needed
* Add isNeedPosting variable to costAdjustmentAssertLine and use it to check
  if a transaction has been posted or not

---
M src-test/src/org/openbravo/test/costing/TestCosting.java
---
(0101763)
dmiguelez   
2018-01-17 17:09   
Code Review + Testing Ok
(0101774)
hgbot   
2018-01-18 17:38   
Repository: erp/devel/pi
Changeset: a48e8a98e5ea60a270ada8f9ebc6e2d3987b7c59
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Jan 18 17:36:48 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/a48e8a98e5ea60a270ada8f9ebc6e2d3987b7c59 [^]

Related to Issue 37279. Added sleeps to automated test cases to avoid
problems while launching them in Oracle.

---
M src-test/src/org/openbravo/test/costing/TestCosting.java
---
(0102660)
hudsonbot   
2018-02-22 18:18   
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/980a6ad5bbf5 [^]
Maturity status: Test
(0102661)
hudsonbot   
2018-02-22 18:18   
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/980a6ad5bbf5 [^]
Maturity status: Test
(0102666)
hudsonbot   
2018-02-22 18:18   
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/980a6ad5bbf5 [^]
Maturity status: Test
(0103461)
hgbot   
2018-03-23 09:34   
Repository: erp/devel/pi
Changeset: 5117700335fbce7a2d983b4007269eaace3d4205
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Tue Mar 20 18:01:55 2018 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/5117700335fbce7a2d983b4007269eaace3d4205 [^]

Related to issue 38157: Updated test 37279 with the new behavior

The JUnit test for issue 37279 was updated to take into account the new behavior
when the Goods Receipts have not Purchase Order related and the avg cost is updated

---
M src-test/src/org/openbravo/test/costing/TestIssue37279.java
M src-test/src/org/openbravo/test/costing/utils/TestCostingUtils.java
---
(0103480)
hudsonbot   
2018-03-23 21:22   
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/42e5233f5207 [^]
Maturity status: Test