Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028136Openbravo ERP02. Master data managementpublic2014-11-10 22:382015-02-04 20:34
jecharri 
fsoto82 
highminoralways
closedfixed 
5
 
3.0PR15Q2pi 
umartirena
Core
No
0028136: Error duplicate key value violates unique constraint "m_product_trl_product_langu_un" trying to create product variants
Erro duplicate key value violates unique constraint "m_product_trl_product_langu_un" trying to create product variants
-Go to window client and check checkbox "Multilingual Document"
-Create a variant product characteristic like color with "red" value
-Go to window product
-Create a generic product and assign the created characteristic
-Verify that translation is automatically generated
-Press in "Generate Variants"

Verify that error
ERROR: duplicate key value violates unique constraint "m_product_trl_product_langu_un" Detail: Key (m_product_id, ad_language)=(3A62711A0668445F83BD63B1CD65076A, en_US) already exists.
is displayed
Check before generating a key. If exist, overwrite or skip.
No tags attached.
related to defect 0031866 closed nonofrancisco Cannot manage variants if Multilingual Documents selected at Client level because it is trying to create duplicated translation 
Issue History
2014-11-10 22:38jecharriNew Issue
2014-11-10 22:38jecharriAssigned To => dmiguelez
2014-11-10 22:38jecharriModules => Core
2014-11-10 22:38jecharriResolution time => 1422054000
2014-11-10 22:38jecharriTriggers an Emergency Pack => No
2014-12-01 13:40egoitzTarget Version3.0PR15Q1 => 3.0PR15Q2
2014-12-05 12:03maarten1962Note Added: 0072308
2014-12-05 12:03maarten1962SummaryErro duplicate key value violates unique constraint "m_product_trl_product_langu_un" trying to create product variants => Error duplicate key value violates unique constraint "m_product_trl_product_langu_un" trying to create product variants
2014-12-05 12:03maarten1962Proposed Solution updated
2015-01-08 14:20fsoto82Statusnew => scheduled
2015-01-08 14:20fsoto82Assigned Todmiguelez => fsoto82
2015-01-08 14:20fsoto82fix_in_branch => pi
2015-01-15 10:12hgbotCheckin
2015-01-15 10:12hgbotNote Added: 0073509
2015-01-15 10:12hgbotStatusscheduled => resolved
2015-01-15 10:12hgbotResolutionopen => fixed
2015-01-15 10:12hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/caeee416813b4ad1a51ff0a6a7c3b9fca5127076 [^]
2015-01-15 10:16hgbotCheckin
2015-01-15 10:16hgbotNote Added: 0073510
2015-01-15 10:17umartirenaReview Assigned To => umartirena
2015-01-15 10:17umartirenaNote Added: 0073511
2015-01-15 10:17umartirenaStatusresolved => closed
2015-01-15 10:17umartirenaFixed in Version => pi
2015-02-04 20:34hudsonbotCheckin
2015-02-04 20:34hudsonbotNote Added: 0074147
2015-02-04 20:34hudsonbotCheckin
2015-02-04 20:34hudsonbotNote Added: 0074148
2016-01-12 18:43ngarciaRelationship addedrelated to 0026573
2016-01-12 18:43ngarciaRelationship deletedrelated to 0026573
2016-01-12 18:44ngarciaRelationship addedrelated to 0031866

Notes
(0072308)
maarten1962   
2014-12-05 12:03   
I confirm this error in the training. As it appears, it was solved when I removed the translation that was (automatically) generated for the generic item. After that, the variants were created without problem.
(0073509)
hgbot   
2015-01-15 10:12   
Repository: erp/devel/pi
Changeset: caeee416813b4ad1a51ff0a6a7c3b9fca5127076
Author: Fernando Soto <fernando.soto <at> peoplewalking.com>
Date: Fri Jan 09 09:08:39 2015 -0500
URL: http://code.openbravo.com/erp/devel/pi/rev/caeee416813b4ad1a51ff0a6a7c3b9fca5127076 [^]

Fixed bug 28136: Error duplicate key value when create product variants

Modified class VariantAutomaticGenerationProcess to check if the Client has the flag "Multilingual Documents"
If checked then remove the translations list from the generic product clone.

---
M src/org/openbravo/materialmgmt/VariantAutomaticGenerationProcess.java
---
(0073510)
hgbot   
2015-01-15 10:16   
Repository: erp/devel/pi
Changeset: 1c2f947969bc77baf8d3e66ef5d7f64be77b5d2f
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Thu Jan 15 10:15:40 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/1c2f947969bc77baf8d3e66ef5d7f64be77b5d2f [^]

Related to bug 28136: Fix copyright and imports

---
M src/org/openbravo/materialmgmt/VariantAutomaticGenerationProcess.java
---
(0073511)
umartirena   
2015-01-15 10:17   
Code Review + Testing OK
(0074147)
hudsonbot   
2015-02-04 20:34   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/f36c91d0ad63 [^]
Maturity status: Test
(0074148)
hudsonbot   
2015-02-04 20:34   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/f36c91d0ad63 [^]
Maturity status: Test