Openbravo Issue Tracking System - Modules
View Issue Details
0027117ModulesInitial data loadpublic2014-07-17 18:172014-10-29 17:48
jecharri 
fsoto82 
urgentmajoralways
closedfixed 
5
 
 
Sandrahuguet
0027117: Create Variants method is not setting the correct organization in table m_product_ch_value importing product with "IDL Variants"
Create Variants method is not setting the correct organization in table m_product_ch_value importing product with "IDL Variants" module
http://centralrepository.openbravo.com/heartbeat-server/org.openbravo.forge.ui/ForgeModuleDetail/IDL-For-Variants [^]
-Install module "IDL for Variants"
-Configure the csv products to import with "*"
-Change the user organization to "Vall blanca User"
-Do the import

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
No tags attached.
related to defect 00271023.0PR15Q1 closed fsoto82 Openbravo ERP Create Variants method is not setting the correct organization in table m_product_ch_value 
Issue History
2014-07-17 18:17jecharriNew Issue
2014-07-17 18:17jecharriAssigned To => jonalegriaesarte
2014-07-17 18:17jecharriResolution time => 1408485600
2014-07-17 18:17jecharriRelationship addedrelated to 0027102
2014-07-24 13:46jonalegriaesarteAssigned Tojonalegriaesarte => AtulOpenbravo
2014-10-08 05:25fsoto82Statusnew => scheduled
2014-10-08 05:25fsoto82Assigned ToAtulOpenbravo => fsoto82
2014-10-08 05:25fsoto82fix_in_branch => pi
2014-10-08 05:28fsoto82Note Added: 0070790
2014-10-29 17:45hgbotCheckin
2014-10-29 17:45hgbotNote Added: 0071253
2014-10-29 17:45hgbotStatusscheduled => resolved
2014-10-29 17:45hgbotResolutionopen => fixed
2014-10-29 17:45hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.idl.variants/rev/7531ceb9769413a9470be3835711a85a782288b3 [^]
2014-10-29 17:48SandrahuguetReview Assigned To => Sandrahuguet
2014-10-29 17:48SandrahuguetNote Added: 0071254
2014-10-29 17:48SandrahuguetStatusresolved => closed

Notes
(0070790)
fsoto82   
2014-10-08 05:28   
-Install module "IDL for Variants"
-Configure the csv products to import with "*"
-Do the import

Now the m_product_ch_value orgsnization is the same as the product organization.
(0071253)
hgbot   
2014-10-29 17:45   
Repository: erp/pmods/org.openbravo.idl.variants
Changeset: 7531ceb9769413a9470be3835711a85a782288b3
Author: Fernando Soto <fernando.soto <at> peoplewalking.com>
Date: Wed Oct 29 09:31:20 2014 -0500
URL: http://code.openbravo.com/erp/pmods/org.openbravo.idl.variants/rev/7531ceb9769413a9470be3835711a85a782288b3 [^]

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

Changed ImportProduct class to set to the product organization to the created product chacteristic value.

Also created a Modulescript to fix the data previously imported.
The modulescript is based upon UpdateProductChValueOrg, and recreated here in case the core is not updated.

---
M src/org/openbravo/idl/variants/ImportProduct.java
A build/classes/org/openbravo/idl/variants/modulescript/IDLVariantsModulesScript.class
A build/classes/org/openbravo/idl/variants/modulescript/IDLVariantsModulesScriptData.class
A src-util/modulescript/src/org/openbravo/idl/variants/modulescript/IDLVariantsModulesScript.java
A src-util/modulescript/src/org/openbravo/idl/variants/modulescript/IDLVariantsModulesScript_data.xsql
A src-util/modulescript/src/src/org/openbravo/idl/variants/modulescript/IDLVariantsModulesScriptData.java
---
(0071254)
Sandrahuguet   
2014-10-29 17:48   
Code review + testing OK