Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0027102Openbravo ERP01. General setuppublic2014-07-16 21:082014-12-30 23:23
jecharri 
fsoto82 
urgentmajoralways
closedfixed 
5
 
3.0PR15Q1 
eduardo_Argal
Google Chrome
Core
No
0027102: Create Variants method is not setting the correct organization in table m_product_ch_value
Create Variants method is not setting the correct organization in table m_product_ch_value
-Go to ERP and create a "product characteristic" with check "Variant" checked.
-Go to window product and create a product with org '*'
-Set the product as generic and insert created "product characteristic"
-Change the user organization to "Vall blanca User"
-After that, select again the product and press in "Create variants"

You will see that created product has "Vall blanca User" organization in table "m_product_ch_value" instead of "*"

You can use the following query to check

select chv.ad_org_id,p.ad_org_id,c.ad_org_id,v.ad_org_id
from m_product_ch_value chv
  join m_product p on p.m_product_id = chv.m_product_id
  join m_characteristic c on c.m_characteristic_id = chv.m_characteristic_id
  join m_ch_value v on v.m_ch_value_id = chv.m_ch_value_id

It will be necessary to create a module script

When this issue is fixed, check also related issue 27117
No tags attached.
related to defect 0027117 closed fsoto82 Modules Create Variants method is not setting the correct organization in table m_product_ch_value importing product with "IDL Variants" 
blocks defect 00272193.0PR15Q1 closed reinaldoguerra Openbravo ERP Product characteristics with numbers as variants are difficult to identify 
Issue History
2014-07-16 21:08jecharriNew Issue
2014-07-16 21:08jecharriAssigned To => dmiguelez
2014-07-16 21:08jecharriWeb browser => Google Chrome
2014-07-16 21:08jecharriModules => Core
2014-07-16 21:08jecharriResolution time => 1408485600
2014-07-16 21:08jecharriTriggers an Emergency Pack => No
2014-07-16 21:10jecharriWeb browserGoogle Chrome => Google Chrome
2014-07-16 21:10jecharriSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=6075#r6075
2014-07-17 18:17jecharriRelationship addedrelated to 0027117
2014-07-17 18:18jecharriWeb browserGoogle Chrome => Google Chrome
2014-07-17 18:18jecharriSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=6090#r6090
2014-07-28 20:55jecharriRelationship addedblocks 0027219
2014-09-22 16:36jonalegriaesarteTarget Version => 3.0PR15Q1
2014-09-22 16:37jonalegriaesarteTarget Version3.0PR15Q1 => 3.0PR14Q4
2014-09-29 16:12jonalegriaesarteTarget Version3.0PR14Q4 => 3.0PR15Q1
2014-10-07 16:30fsoto82Statusnew => scheduled
2014-10-07 16:30fsoto82Assigned Todmiguelez => fsoto82
2014-10-07 16:30fsoto82fix_in_branch => pi
2014-10-09 06:01fsoto82Note Added: 0070826
2014-10-27 10:56hgbotCheckin
2014-10-27 10:56hgbotNote Added: 0071182
2014-10-27 10:56hgbotStatusscheduled => resolved
2014-10-27 10:56hgbotResolutionopen => fixed
2014-10-27 10:56hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/3547f6b6e776cb27d8238786712f591b2adc269c [^]
2014-10-28 13:44eduardo_ArgalReview Assigned To => eduardo_Argal
2014-10-28 13:44eduardo_ArgalNote Added: 0071224
2014-10-28 13:44eduardo_ArgalStatusresolved => closed
2014-12-30 23:23hudsonbotCheckin
2014-12-30 23:23hudsonbotNote Added: 0072991

Notes
(0070826)
fsoto82   
2014-10-09 06:01   
-Go to ERP and create a "product characteristic" with check "Variant" checked.
-Go to window product and create a product with org '*'
-Set the product as generic and insert created "product characteristic"
-Change the user organization to other than *
-After that, select again the product and press in "Create variants"
Check the "m_product_ch_value" organization (as described in the steps to reproduce), now is the same as the product organization
(0071182)
hgbot   
2014-10-27 10:56   
Repository: erp/devel/pi
Changeset: 3547f6b6e776cb27d8238786712f591b2adc269c
Author: Fernando Soto <fernando.soto <at> peoplewalking.com>
Date: Mon Oct 20 16:03:47 2014 -0500
URL: http://code.openbravo.com/erp/devel/pi/rev/3547f6b6e776cb27d8238786712f591b2adc269c [^]

Fixed bug 27102: Create Variants method is not setting the correct organization

Modified class VariantAutomaticGenerationProcess to set to the Product Characteristics Value the same organization of the product.
Also created UpdateProductChValueOrg modulescript to fix the previously entered data.

---
M src/org/openbravo/materialmgmt/VariantAutomaticGenerationProcess.java
A src-util/modulescript/build/classes/org/openbravo/modulescript/UpdateProductChValueOrg.class
A src-util/modulescript/build/classes/org/openbravo/modulescript/UpdateProductChValueOrgData.class
A src-util/modulescript/src/org/openbravo/modulescript/UpdateProductChValueOrg.java
A src-util/modulescript/src/org/openbravo/modulescript/UpdateProductChValueOrg_data.xsql
---
(0071224)
eduardo_Argal   
2014-10-28 13:44   
Code Reviewed and tested
(0072991)
hudsonbot   
2014-12-30 23:23   
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/6525fe229e06 [^]
Maturity status: Test