Openbravo Issue Tracking System - Retail Modules
View Issue Details
0055222Retail ModulesRetail APIpublic2024-04-17 14:302024-04-18 10:37
azzeddine_meftoh 
Retail 
normalmajorhave not tried
closedno change required 
5
main 
 
No
0055222: Price API - importing price for deactivated product
When importing a price for a deativated product we get the error :
ERROR: duplicate key value violates unique constraint "m_productprice_pricelist_ve_un"
deactivate a product
import a price for this product with the API
No tags attached.
Issue History
2024-04-17 14:30azzeddine_meftohNew Issue
2024-04-17 14:30azzeddine_meftohAssigned To => Triage Platform Conn
2024-04-17 14:30azzeddine_meftohTriggers an Emergency Pack => No
2024-04-17 14:49victor_perezSeverityminor => major
2024-04-18 10:29jorgewederagoAssigned ToTriage Platform Conn => Retail
2024-04-18 10:29jorgewederagoStatusnew => acknowledged
2024-04-18 10:37adrianromeroNote Added: 0163352
2024-04-18 10:37adrianromeroStatusacknowledged => closed
2024-04-18 10:37adrianromeroResolutionopen => no change required

Notes
(0163352)
adrianromero   
2024-04-18 10:37   
This is the expected behaviour when trying to import any Openbravo entity with the same keys as another existing deactivated entity.

Deactivated entities are maintanined in the database for reference and reporting purposes but cannot be used in new processes or selected, etc... and as consequence:

* Deactivated records cannot be updated by the import API and kept deactivated
* Deactivated records cannot be reactivated and updated as a result of an import API request
* Openbravo cannot create a new activated record due the database constraints that can end in an inconsistent database with two records with the same keys, one activated and the other deactivated.