Openbravo Issue Tracking System - Retail Modules |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0051553 | Retail Modules | Retail API | public | 2023-02-09 13:22 | 2023-02-13 11:41 |
|
Reporter | nicola_uva | |
Assigned To | vmromanos | |
Priority | immediate | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | pi | |
Target Version | pi | Fixed in Version | | |
Merge Request Status | approved |
Review Assigned To | |
OBNetwork customer | Gold |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0051553: Inventory API - When we have 2 products same searckey on different organization, we cannot do an inventory |
Description | When we have 2 products same searckey on different organizations, we cannot do an inventory on the product. |
Steps To Reproduce | 1) 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 Solution | When 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 |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | defect | 0051547 | pi | closed | caristu | PriceList API - Product price is wrongly added when same products searchKey on different Orgs are in OB backoffice |
|
Attached Files | |
|
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 | OBNetwork customer | => Gold |
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 | bug_revision_view_page.php?bugnote_id=0146332#r25515 |
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 | Merge Request Status | => open |
2023-02-10 15:00 | hgbot | Note Added: 0146391 | |
2023-02-10 15:02 | hgbot | Note Added: 0146393 | |
2023-02-13 10:44 | hgbot | Merge Request Status | open => approved |
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 | |
Notes |
|
(0146332)
|
vmromanos
|
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
|
2023-02-10 15:00
|
|
|
|
(0146393)
|
hgbot
|
2023-02-10 15:02
|
|
|
|
(0146431)
|
hgbot
|
2023-02-13 11:41
|
|
|
|
(0146432)
|
hgbot
|
2023-02-13 11:41
|
|
|
|
(0146433)
|
hgbot
|
2023-02-13 11:41
|
|
|
|
(0146434)
|
hgbot
|
2023-02-13 11:41
|
|
|