Openbravo Issue Tracking System - Retail Modules
View Issue Details
0054613Retail ModulesRetail APIpublic2024-02-07 16:312024-04-23 10:50
dorian_robillard 
Rajesh_18 
highmajoralways
closedfixed 
5
 
 
No
0054613: In the POST assortment API, it is not possible to update the new object requisitionDefaults
In the POST assortment API, it is not possible to update the new object requisitionDefaults

Here a json used to import.
{
    "client": "CLIENT",
    "organization": "*",
    "name": "ASS France",
    "description": "ASS France",
    "active": true,
    "products": [
      {
        "product": "182496",
        "bestseller": false,
        "active": true,
        "requisitionDefaults": [
          {
            "organization": "*",
            "active": true,
            "defaultAction": "PO",
            "businessPartner": "V/001",
            "priceList": "LISTE DE PRIX D'ACHAT",
            "minQuantity": 5,
            "standardQuantity": 15,
            "quantityType": "Multiple"
          }
        ]
      }
    ]
  }

If I import it a second time changin standardQuantity, I have this error in EDL request : ERROR: duplicate key value violates unique constraint "obdo_prol_product_unique"
  Detail: Key (obretco_prol_product_id, ad_org_id)=(8F576B1A76E241F399B47A370EEA1CDB, 0) already exists.
Use POST API assortment with requisitionDefaults
Change standardQuantity in JSON
Use again POST API assortment with requisitionDefaults
Key Key (obretco_prol_product_id, ad_org_id) should not be a unicity contrainst for API but allow to update requisitionDefault.
Maybe add organisation in the key
No tags attached.
Issue History
2024-02-07 16:31dorian_robillardNew Issue
2024-02-07 16:31dorian_robillardAssigned To => Triage Platform Conn
2024-02-07 16:31dorian_robillardTriggers an Emergency Pack => No
2024-03-01 13:54adrianromeroAssigned ToTriage Platform Conn => Retail
2024-04-08 07:15marvintmTypedesign defect => defect
2024-04-08 09:44jorgewederagoStatusnew => acknowledged
2024-04-10 11:42Rajesh_18Assigned ToRetail => Rajesh_18
2024-04-10 11:42Rajesh_18Statusacknowledged => scheduled
2024-04-11 09:55hgbotNote Added: 0163085
2024-04-16 16:08hgbotResolutionopen => fixed
2024-04-16 16:08hgbotStatusscheduled => closed
2024-04-16 16:08hgbotNote Added: 0163294
2024-04-16 16:08hgbotNote Added: 0163295
2024-04-23 09:56AgatheBertinNote Added: 0163579
2024-04-23 09:56AgatheBertinStatusclosed => new
2024-04-23 09:56AgatheBertinResolutionfixed => open
2024-04-23 10:50Rajesh_18Statusnew => scheduled
2024-04-23 10:50Rajesh_18Statusscheduled => resolved
2024-04-23 10:50Rajesh_18Resolutionopen => fixed
2024-04-23 10:50Rajesh_18Statusresolved => closed

Notes
(0163085)
hgbot   
2024-04-11 09:55   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.distributionorder.api/-/merge_requests/30 [^]
(0163294)
hgbot   
2024-04-16 16:08   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.distributionorder.api [^]
Changeset: 203a8c6c188b052ed9c86e2421901a79add33395
Author: Rajesh Senthilkumar <rajesh@qualiantech.com>
Date: 16-04-2024 14:08:07
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.distributionorder.api/-/commit/203a8c6c188b052ed9c86e2421901a79add33395 [^]

Fixed ISSUE-54613: Added identifier for requisition defaults in assortment api

---
M src-db/database/sourcedata/OBEI_PROP_MAP_INSTANCE.xml
---
(0163295)
hgbot   
2024-04-16 16:08   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.distributionorder.api/-/merge_requests/30 [^]
(0163579)
AgatheBertin   
2024-04-23 09:56   
Hello

We still have the database constraint, failing in the EDL

ERROR: duplicate key value violates unique constraint "obdo_prol_product_unique"
  Detail: Key (obretco_prol_product_id, ad_org_id)=(5DA0A48749F8434F945F7AE3D513959B, 0) already exists.