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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0042868
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] 04. Warehouse managementmajoralways2020-01-14 12:432020-01-20 12:38
ReportergorkaionView Statuspublic 
Assigned ToAtulOpenbravo 
PriorityimmediateResolutionfixedFixed in Version3.0PR20Q1
StatusclosedFix in branchFixed in SCM revision6d075d938075
ProjectionnoneETAnoneTarget Version3.0PR20Q1
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Todmiguelez
Web browser
ModulesCore
Regression levelProduction - Confirmed Stable
Regression date
Regression introduced in release3.0PR19Q3
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/e4ecb0f34be7fcdd0626f218bf39fe5573ea0fff [^]
Triggers an Emergency PackNo
Summary

0042868: Inventory Amount Update process tries to create Physical Inventories in organizations no trx allowed

DescriptionThe Inventory Amount Update process generates closing and init inventories to adjust the cost. These inventories as per fix of issue 0040539 are created on the organization where the warehouse adjusted is created.

If the warehouse is defined in a organization of type "Organization" that do not allow transaction the process fails. As it is trying to generate the Physical Inventories on that organization.

In this scenario it should search the first parent organization that allows transactions (business unit or legal entity) and generate the physical inventories on it.
Steps To ReproduceOn F&B client.

1. Create a new organization (name: Org A) child of F&B España, S.A of type Organization.
2. Create a new organization (name: Generic) child of "Org A" of type Generic.
3. Create a new warehouse (name: Test WH) on organization "Org A"
3. Create a new Product (name: Test) of type item and stocked.
4. Create a physical inventory to initialize the stock of the product "Test" on the warehouse "Test WH" set a cost of 10 EUR before processing the inventory.
5. Ensure that the coting background process is executed and that the transaction of the physical inventory is calculated.
6. Create a new Inventory Amount Update headed on "F&B España, S.A"
7. Create a new line of product "Test" and change the cost to 15.
8. Process the Inventory Amount Update.

The process fails as it is trying to create an inventory on the organization "Org A" which is not allowed.
Proposed SolutionIn case the warehouse is defined on a organization that does not allow transactions the process should search the first parent organization that allow transactions and create the physical inventory on it.

This parent organization can be a Business Unit or the Legal Organization. Initialize a OrganziationStructureProvider and calculate the org as:
invOrg = osp.getLegalEntityOrBusinessUnit(closeInv.getWarehouse().getOrganization());
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0042847 closedAtulOpenbravo Inventory Amount Update process tries to create Physical Inventories in organizations no trx allowed 

-  Notes
(0116910)
AtulOpenbravo (developer)
2020-01-15 20:14

Test Plan

Login with F&B International Group Admin.

- Using Initial Organization Setup, create a new organization (name: Org A) child of F&B España, S.A of type Organization.
- Navigate to Organization window, select organization created in above step, set Summary Level = Yes, Set it as Ready.
- Using Initial Organization setup, Create a new organization (name: Generic) child of "Org A" of type Generic.
- Navigate to Organization window, select above created organization, Set it as Ready
- Create a new warehouse (name: Test WH) on organization "Org A"
- Create a new Product (name: Test) of type item and stocked.
- Create a physical inventory to initialize the stock of the product "Test" on the warehouse "Test WH" set a cost of 10 EUR before processing the inventory.
- Ensure that the costing background process is executed and that the transaction of the physical inventory is calculated.
- Create a new Inventory Amount Update headed on "F&B España, S.A"
- Create a new line of product "Test" and change the cost to 15.
- Process the Inventory Amount Update.
- Realize that process is completed successfully, Physical Inventory transactions for Inventory Amount Update Closing & Opening Inventory are created in Organization F&B España, S.A as this is organization in parent organization list of Org A having Org Type where Transactions are allowed.
(0116953)
AtulOpenbravo (developer)
2020-01-17 05:21

Login with F&B International Group Admin.

- Create a new warehouse (name: Test WH) in organization "F&B International Group Org" and create a Storage Bin under it.
- Create a new Product (name: Test) of type item and stocked in same Org as above.
- Create a physical inventory in "F&B España, S.A" org to initialize the stock of the product "Test" in the warehouse "Test WH", set a cost of 10 EUR before processing the inventory.
- Ensure that the costing background process is executed and that the transaction of the physical inventory is calculated.
- Create a new Inventory Amount Update headed on "F&B España, S.A"
- Create a new line of product "Test" and change the cost to 15.
- Process the Inventory Amount Update.
- Realize that process is completed successfully, Physical Inventory transactions for Inventory Amount Update Closing & Opening Inventory are created in Organization F&B España, S.A. (Is the one referred from Inventory Line)
(0117062)
hgbot (developer)
2020-01-20 12:37

Repository: erp/backports/3.0PR20Q1
Changeset: 6d075d938075e0b5e4298efa1766c7bf820245a7
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Fri Jan 17 09:44:40 2020 +0530
URL: http://code.openbravo.com/erp/backports/3.0PR20Q1/rev/6d075d938075e0b5e4298efa1766c7bf820245a7 [^]

Fixes BUG-42868:Inventory Amount Update process tries to create
Physical Inventories in organizations no trx allowed

**Use Organization from the Parent list of Warehouse Organization
whose organization type has transaction allowed flag set as Yes,
if no such organization is found, the use Organization from the
Inventory Line.

---
M src/org/openbravo/costing/InventoryAmountUpdateProcess.java
---
(0117063)
hgbot (developer)
2020-01-20 12:37

Repository: erp/backports/3.0PR20Q1
Changeset: e1e688afa43137de4d3df62a7593e1e56b71265c
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Mon Jan 20 11:37:25 2020 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR20Q1/rev/e1e688afa43137de4d3df62a7593e1e56b71265c [^]

Related to ISSUE-42868: Code Review Changes.

* Added final modifier to variables and parameters
* Extracted code to it's own method to improve redability

---
M src/org/openbravo/costing/InventoryAmountUpdateProcess.java
---
(0117068)
dmiguelez (developer)
2020-01-20 12:38

Code Review + Testing Ok

- Issue History
Date Modified Username Field Change
2020-01-14 16:48 AtulOpenbravo Type defect => backport
2020-01-14 16:48 AtulOpenbravo Target Version => 3.0PR20Q1
2020-01-15 20:14 AtulOpenbravo Note Added: 0116910
2020-01-17 05:21 AtulOpenbravo Note Added: 0116953
2020-01-20 12:37 hgbot Checkin
2020-01-20 12:37 hgbot Note Added: 0117062
2020-01-20 12:37 hgbot Status scheduled => resolved
2020-01-20 12:37 hgbot Resolution open => fixed
2020-01-20 12:37 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR20Q1/rev/6d075d938075e0b5e4298efa1766c7bf820245a7 [^]
2020-01-20 12:37 hgbot Checkin
2020-01-20 12:37 hgbot Note Added: 0117063
2020-01-20 12:38 dmiguelez Review Assigned To => dmiguelez
2020-01-20 12:38 dmiguelez Note Added: 0117068
2020-01-20 12:38 dmiguelez Status resolved => closed
2020-01-20 12:38 dmiguelez Fixed in Version => 3.0PR20Q1


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker