Openbravo Issue Tracking System - Retail Modules
View Issue Details
0058227Retail ModulesRetail APIpublic2025-03-13 10:042025-03-20 13:10
AgatheBertin 
inaki_luque 
normalmajorhave not tried
closedfixed 
5
 
 
approved
No
No
0058227: Update of a unactive product through API is failing
When 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)
Send 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

Allow to update a product as inactive (as it's working when the product is active) and do not try to create a new one.
No tags attached.
Issue History
2025-03-13 10:04AgatheBertinNew Issue
2025-03-13 10:04AgatheBertinAssigned To => Retail
2025-03-13 10:04AgatheBertinOBNetwork customer => No
2025-03-13 10:04AgatheBertinTriggers an Emergency Pack => No
2025-03-13 11:41hgbotMerge Request Status => open
2025-03-13 11:41hgbotNote Added: 0176779
2025-03-13 12:18jorgewederagoAssigned ToRetail => inaki_luque
2025-03-13 12:18jorgewederagoStatusnew => acknowledged
2025-03-13 12:21jorgewederagoStatusacknowledged => scheduled
2025-03-20 13:09hgbotMerge Request Statusopen => approved
2025-03-20 13:10hgbotNote Added: 0177027
2025-03-20 13:10hgbotResolutionopen => fixed
2025-03-20 13:10hgbotStatusscheduled => closed
2025-03-20 13:10hgbotNote Added: 0177028

Notes
(0176779)
hgbot   
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   
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   
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
---