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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0058227
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Retail APImajorhave not tried2025-03-13 10:042025-03-20 13:10
ReporterAgatheBertinView Statuspublic 
Assigned Toinaki_luque 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0058227: Update of a unactive product through API is failing

DescriptionWhen trying to update a product through API, if the product is set as inactive we have the following issue

duplicate key value violates unique constraint "m_product_value"
  Detail: Key (value, ad_org_id, ad_client_id)
Steps To ReproduceSend this json 2 times in a row

{
    "client": "AWO-QA",
    "organization": "0",
    "searchKey": "TestProd1_ABE",
    "name": "Test Product 1",
    "description": "Test Product 1",
    "uom": "Unit",
    "productCategory": "Alcohol",
    "taxCategory": "IVA Normal",
    "active": false,
    "productType": "I",
    "generic": false,
    "stocked": true,
    "purchased": true,
    "sold": true,
    "showCharactDesc": true,
    "scale": false,
    "showStock": false,
    "allowAnonymousSale": true,
    "multiSelectable": false,
    "groupedProduct": true,
    "printServices": true,
    "allowDeferredSell": false,
    "linkedToProduct": false,
    "uniquePerDocument": false,
    "priceRuleBased": false,
    "printDescription": false,
    "returnable": true,
    "summaryLevel": false,
    "billOfMaterials": false,
    "printDetailsOnInvoice": false,
    "printDetailsOnPickList": false,
    "verified": false,
    "calculated": false,
    "production": false,
    "quantityVariable": false,
    "discontinued": false,
    "quantityType": false,
    "printPrice": true,
    "volume": 15,
    "weight": 17
}


===> the second is failing

NOTE : if you send the same one with active=true, there is no issues

Proposed SolutionAllow to update a product as inactive (as it's working when the product is active) and do not try to create a new one.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0176779)
hgbot (developer)
2025-03-13 11:41

Merge Request created: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.api/-/merge_requests/447 [^]
(0177027)
hgbot (developer)
2025-03-20 13:10

Merge request merged: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.api/-/merge_requests/447 [^]
(0177028)
hgbot (developer)
2025-03-20 13:10

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.api [^]
Changeset: e345fc85d4638af76c8ebe615ea10fae71771240
Author: IƱaki <i.luque@orisha.com>
Date: 20-03-2025 13:08:44
URL: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.api/-/commit/e345fc85d4638af76c8ebe615ea10fae71771240 [^]

Fixed ISSUE-58227: Making available to update an unactive product through API

---
M src/org/openbravo/api/hook/product/ImportedProductBaseOBObjectFetcher.java
---

- Issue History
Date Modified Username Field Change
2025-03-13 10:04 AgatheBertin New Issue
2025-03-13 10:04 AgatheBertin Assigned To => Retail
2025-03-13 10:04 AgatheBertin Triggers an Emergency Pack => No
2025-03-13 11:41 hgbot Note Added: 0176779
2025-03-13 12:18 jorgewederago Assigned To Retail => inaki_luque
2025-03-13 12:18 jorgewederago Status new => acknowledged
2025-03-13 12:21 jorgewederago Status acknowledged => scheduled
2025-03-20 13:10 hgbot Note Added: 0177027
2025-03-20 13:10 hgbot Resolution open => fixed
2025-03-20 13:10 hgbot Status scheduled => closed
2025-03-20 13:10 hgbot Note Added: 0177028


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker