Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0027999 | Openbravo ERP | A. Platform | public | 2014-10-28 10:35 | 2014-12-30 23:24 |
|
Reporter | jonalegriaesarte | |
Assigned To | reinaldoguerra | |
Priority | normal | Severity | major | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | 3.0PR15Q1 | Fixed in Version | | |
Merge Request Status | |
Review Assigned To | pramakrishnan |
OBNetwork customer | OBPS |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0027999: Image in product created through create variants can not be changed |
Description | Image in product created through create variants can not be changed |
Steps To Reproduce | http://wiki.openbravo.com/wiki/Product_Characteristic [^]
- Create a new product (set as isgeneric) and add a price list.
- Add a characteristc (set as varian) with some values
- Add the characteristic to the product
- Add an image to the product
- Create variant using 'Create Variants' process
- In one of the product created try to change the imagen associated (copied from the original product).
Error
Saving failed. This record cannot be deleted because it is associated with other existing elements. Please see Linked Items |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2014-10-28 10:35 | jonalegriaesarte | New Issue | |
2014-10-28 10:35 | jonalegriaesarte | Assigned To | => AugustoMauch |
2014-10-28 10:35 | jonalegriaesarte | OBNetwork customer | => Yes |
2014-10-28 10:35 | jonalegriaesarte | Modules | => Core |
2014-10-28 10:35 | jonalegriaesarte | Resolution time | => 1417388400 |
2014-10-28 10:35 | jonalegriaesarte | Triggers an Emergency Pack | => No |
2014-10-28 15:09 | extra | Issue Monitored: extra | |
2014-11-10 13:46 | alostale | Note Added: 0071530 | |
2014-11-10 13:46 | alostale | Assigned To | AugustoMauch => Sandrahuguet |
2014-11-13 21:50 | reinaldoguerra | Assigned To | Sandrahuguet => reinaldoguerra |
2014-11-13 21:50 | reinaldoguerra | Status | new => scheduled |
2014-11-16 20:50 | reinaldoguerra | Note Added: 0071669 | |
2014-11-18 11:09 | hgbot | Checkin | |
2014-11-18 11:09 | hgbot | Note Added: 0071749 | |
2014-11-18 11:09 | hgbot | Status | scheduled => resolved |
2014-11-18 11:09 | hgbot | Resolution | open => fixed |
2014-11-18 11:09 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/657fd971187ebbcabfde6ca445b883bed698730e [^] |
2014-11-18 11:09 | hgbot | Checkin | |
2014-11-18 11:09 | hgbot | Note Added: 0071750 | |
2014-11-18 11:11 | pramakrishnan | Review Assigned To | => pramakrishnan |
2014-11-18 11:11 | pramakrishnan | Note Added: 0071751 | |
2014-11-18 11:11 | pramakrishnan | Status | resolved => closed |
2014-12-30 23:24 | hudsonbot | Checkin | |
2014-12-30 23:24 | hudsonbot | Note Added: 0073074 | |
2014-12-30 23:24 | hudsonbot | Checkin | |
2014-12-30 23:24 | hudsonbot | Note Added: 0073075 | |
Notes |
|
|
The problem is in the Create Variants process: in case the original product has an image, the new product links to that image. It should, instead, create a new image and link the new product to that one.
Note this proposed fix will work for newly created products, but not for existent one which will continue linking to old image. |
|
|
|
Test plan used:
1- Login into Openbravo ERP
2- Go to product characteristic window, create a new record for example: Color
3- Check variant flag, save it and ad some values in value tab.
4- Go to product window and create a new one (set as isgeneric), add an image to the product.
5- Add a price list in price tab.
6- Go to Characteristic tab and add previously created (Color)
7- Check variant flag, save record and realize that variant's values are inserted in characteristic configuration tab.
8- Create variant using 'Create Variants' process button
9- In one of the product created try to change the image associated (copied from the original product).
10- The image is changed successfuly.
11- Go to a previous created variant's product through create variants process.
12- Try to change its image and realize that now it is changed successfuly. |
|
|
(0071749)
|
hgbot
|
2014-11-18 11:09
|
|
Repository: erp/devel/pi
Changeset: 657fd971187ebbcabfde6ca445b883bed698730e
Author: Reinaldo Guerra <reinaldo.guerra <at> peoplewalking.com>
Date: Sun Nov 16 16:30:56 2014 -0500
URL: http://code.openbravo.com/erp/devel/pi/rev/657fd971187ebbcabfde6ca445b883bed698730e [^]
Fixed bug 27999: Product's image created on create variants can not be changed.
Actual creating variants process makes a copy from the entire product's object to create the new variants and the new variant's images are the original product's image so it is not possible to update them. This behaviour was changed to also make a copy from original product image, save it and then associate it with the new variant. Now it is possible to update this new image's field as it is not related with any other variant or product.
Also a module script was created to fix this problem in already created variants through the mentioned process. When executing an ant update database, images for products with generic products associated are reinserted and then are associated with them.
---
M src/org/openbravo/materialmgmt/VariantAutomaticGenerationProcess.java
A src-util/modulescript/build/classes/org/openbravo/modulescript/UpdateVariantImage.class
A src-util/modulescript/build/classes/org/openbravo/modulescript/UpdateVariantImageData.class
A src-util/modulescript/src/org/openbravo/modulescript/UpdateVariantImage.java
A src-util/modulescript/src/org/openbravo/modulescript/UpdateVariantImage_data.xsql
---
|
|
|
(0071750)
|
hgbot
|
2014-11-18 11:09
|
|
Repository: erp/devel/pi
Changeset: 81fbb57834f4f20f63fa18c8d5efa05175e83402
Author: Pandeeswari Ramakrishnan <pandeeswari.ramakrishnan <at> openbravo.com>
Date: Tue Nov 18 15:24:31 2014 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/81fbb57834f4f20f63fa18c8d5efa05175e83402 [^]
Related to Issue 27999: Moved the preference creation outside the for loop
---
M src-util/modulescript/build/classes/org/openbravo/modulescript/UpdateVariantImage.class
M src-util/modulescript/src/org/openbravo/modulescript/UpdateVariantImage.java
---
|
|
|
|
Code Review + Testing - OK. |
|
|
|
|
|
|
|