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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0051553
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Retail APImajoralways2023-02-09 13:222023-02-13 11:41
Reporternicola_uvaView Statuspublic 
Assigned Tovmromanos 
PriorityimmediateResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Versionpi
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0051553: Inventory API - When we have 2 products same searckey on different organization, we cannot do an inventory

DescriptionWhen we have 2 products same searckey on different organizations, we cannot do an inventory on the product.
Steps To Reproduce1) Configure in the backoffice 2 products with same searchkey and different orgs
1.1) product search key 123, name "Product 1" org *
1.2) product search key 123, name "Product 2", org "Vall Blanca Store"
2) Execute a call to the "Inventory" API endpoint, to create a inventory for a product defined in "Vall Blanca Store"
3)Edl "Inventory" in error

The code fail on this method
org.openbravo.api.mappings.inventoryline.ImportInventoryLineJavaPropertyMappingHandler.setInventoryLineProduct(InventoryCountLine, Object)
Proposed SolutionWhen we find a product must be added as filter the organization.
Product search key is not a global unique. global unique should be org and product key
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0051547pi closedcaristu PriceList API - Product price is wrongly added when same products searchKey on different Orgs are in OB backoffice 

-  Notes
(0146332)
vmromanos (developer)
2023-02-09 17:33
edited on: 2023-02-09 17:42

Technical proposed solution:

org.openbravo.api.mappings.inventoryline.ImportInventoryLineJavaPropertyMappingHandler.setInventoryLineProduct():

In the query that gets the products:
1. Limit the query to return 1 record
2. Order the results by the inventory line organization's natural tree, i.e. to try to get first the product closest to the line's organization.
3. In the unlikely case of having the same searchkey at the same level in the parent tree and in the child tree (for example the same searchkey found in the immediate parent organization and in the immediate child organization), then take the one defined at the parent tree.

(0146391)
hgbot (developer)
2023-02-10 15:00

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.api/-/merge_requests/128 [^]
(0146393)
hgbot (developer)
2023-02-10 15:02

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.distributionorder.api/-/merge_requests/12 [^]
(0146431)
hgbot (developer)
2023-02-13 11:41

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.distributionorder.api/-/merge_requests/12 [^]
(0146432)
hgbot (developer)
2023-02-13 11:41

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.distributionorder.api [^]
Changeset: 86142f0582c8946b4df3a8db3aece8bff96fbbe9
Author: Víctor Martínez Romanos <victor.martinez@openbravo.com>
Date: 10-02-2023 15:02:02
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.distributionorder.api/-/commit/86142f0582c8946b4df3a8db3aece8bff96fbbe9 [^]

Fixed ISSUE-51553: Product searchkey might not be unique, take closest one

---
M src/org/openbravo/distributionorder/api/mappings/distributionorderline/ImportDOLineJavaPropertyMappingHandler.java
---
(0146433)
hgbot (developer)
2023-02-13 11:41

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.api [^]
Changeset: 4ffa39a621803fd0508539907e0261407ece584e
Author: Víctor Martínez Romanos <victor.martinez@openbravo.com>
Date: 10-02-2023 15:01:21
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.api/-/commit/4ffa39a621803fd0508539907e0261407ece584e [^]

Fixed ISSUE-51553: Product searchkey might not be unique, take closest one

Besides, removed useless order by in locator query

---
M src/org/openbravo/api/mappings/goodsmovementline/ImportGoodsMvmtLineJavaPropertyMappingHandler.java
M src/org/openbravo/api/mappings/inventoryline/ImportInventoryLineJavaPropertyMappingHandler.java
---
(0146434)
hgbot (developer)
2023-02-13 11:41

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.api/-/merge_requests/128 [^]

- Issue History
Date Modified Username Field Change
2023-02-09 13:22 nicola_uva New Issue
2023-02-09 13:22 nicola_uva Assigned To => Triage Omni OMS
2023-02-09 13:22 nicola_uva Triggers an Emergency Pack => No
2023-02-09 14:28 aferraz Assigned To Triage Omni OMS => Triage Omni WMS
2023-02-09 17:33 vmromanos Note Added: 0146332
2023-02-09 17:33 vmromanos Relationship added related to 0051547
2023-02-09 17:42 vmromanos Note Edited: 0146332 View Revisions
2023-02-10 14:57 vmromanos Status new => scheduled
2023-02-10 14:57 vmromanos Assigned To Triage Omni WMS => vmromanos
2023-02-10 15:00 hgbot Note Added: 0146391
2023-02-10 15:02 hgbot Note Added: 0146393
2023-02-13 11:41 hgbot Note Added: 0146431
2023-02-13 11:41 hgbot Resolution open => fixed
2023-02-13 11:41 hgbot Status scheduled => closed
2023-02-13 11:41 hgbot Note Added: 0146432
2023-02-13 11:41 hgbot Note Added: 0146433
2023-02-13 11:41 hgbot Note Added: 0146434


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker