Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0040758Openbravo ERPA. Platformpublic2019-05-02 18:562019-05-24 10:31
malsasua 
caristu 
normalmajoralways
closedfixed 
5
 
3.0PR19Q3 
alostale
Core
No
0040758: In discount & promotions, with Combo discount type, the organization can not be modified
In discount & promotions window, when one record of type Combo has got selected a image, the organization can not be modified
in livebuilds - modules environment:
. go to Discount & Promotions
. create new record:
 - organization: Central Mountain Store
 - type: Combo
 - select one image
>Save record
 - modify the organization to: Posets Store
>Save record
Error
Saving failed. With your current role this action is not allowed.

org.openbravo.base.exception.OBSecurityException: Entity Combo Test (PricingAdjustment) with organization Central Mountain Store references an entity Image through its property obdiscImage but this referenced entity belongs to an organization Central Mountain Store which is not part of the natural tree of Possets Store


(see attachment)
No tags attached.
related to design defect 0040911 new Triage Platform Base Limitations in RemoveImagesEventHandler 
related to defect 0040927 closed alostale ModelProvider does not flag all entities with images 
png error.png (141,819) 2019-05-02 18:56
https://issues.openbravo.com/file_download.php?file_id=12910&type=bug
png
Issue History
2019-05-02 18:56malsasuaNew Issue
2019-05-02 18:56malsasuaAssigned To => Retail
2019-05-02 18:56malsasuaFile Added: error.png
2019-05-02 18:56malsasuaResolution time => 1558476000
2019-05-02 18:56malsasuaTriggers an Emergency Pack => No
2019-05-06 22:17rqueraltaAssigned ToRetail => rqueralta
2019-05-06 22:19rqueraltaStatusnew => scheduled
2019-05-13 08:58alostaleAssigned Torqueralta => platform
2019-05-13 08:58alostaleStatusscheduled => feedback
2019-05-13 08:58alostaleStatusfeedback => new
2019-05-13 12:49caristuAssigned Toplatform => caristu
2019-05-13 13:06alostaleProjectRetail Modules => Openbravo ERP
2019-05-13 13:07alostaleModules => Core
2019-05-13 13:07alostaleCategoryDiscounts and Promotions => A. Platform
2019-05-20 09:42hgbotCheckin
2019-05-20 09:42hgbotNote Added: 0111783
2019-05-20 09:42hgbotStatusnew => resolved
2019-05-20 09:42hgbotResolutionopen => fixed
2019-05-20 09:42hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/ec509bcc31ccb7ba5d047728a67390ef4fbf405a [^]
2019-05-20 11:08hgbotCheckin
2019-05-20 11:08hgbotNote Added: 0111786
2019-05-20 11:52caristuRelationship addedrelated to 0040911
2019-05-21 15:17hudsonbotCheckin
2019-05-21 15:17hudsonbotNote Added: 0112045
2019-05-21 15:17hudsonbotCheckin
2019-05-21 15:17hudsonbotNote Added: 0112046
2019-05-21 16:03alostaleRelationship addedrelated to 0040927
2019-05-24 10:31alostaleReview Assigned To => alostale
2019-05-24 10:31alostaleNote Added: 0112113
2019-05-24 10:31alostaleStatusresolved => closed
2019-05-24 10:31alostaleFixed in Version => 3.0PR19Q3

Notes
(0111783)
hgbot   
2019-05-20 09:42   
Repository: erp/devel/pi
Changeset: ec509bcc31ccb7ba5d047728a67390ef4fbf405a
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Mon May 20 09:20:09 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/ec509bcc31ccb7ba5d047728a67390ef4fbf405a [^]

fixes bug 40758: Skip cross org check for image properties

  The OBInterceptor has a mechanism (cross org check) that verifies whether the organization of the main entity is in the same natural tree that the organization of the entities referenced by the properties of the main entity. This check is performed every time an entity is update/saved through DAL and it is done before the execution of any event observer.

  In the case of this issue, this mechanism was not allowing to save the record because when changing the organization of an entity, if this entity had a property referencing to an AD_Image, the organization of the AD_Image was not being updated accordingly, which could cause the cross org check fail.

  To fix this, we are now skipping the cross org check in the OBInterceptor for those properties referencing to an AD_Image record and with the RemoveImagesEventHandler observer, if the org in the main entity is changed, we put exactly the same org in every AD_Image referenced by that entity.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/event/RemoveImagesEventHandler.java
M src/org/openbravo/base/model/Property.java
M src/org/openbravo/dal/core/OBInterceptor.java
---
(0111786)
hgbot   
2019-05-20 11:08   
Repository: erp/devel/pi
Changeset: 40eca50c2edcfc9dfa960fbb594966b1d75428a1
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Mon May 20 11:08:30 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/40eca50c2edcfc9dfa960fbb594966b1d75428a1 [^]

related to issue 40758: add test cases

---
M src-test/src/org/openbravo/test/AllAntTaskTests.java
A src-test/src/org/openbravo/test/dal/ImageTest.java
---
(0112045)
hudsonbot   
2019-05-21 15:17   
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/9b8f37d9d85e [^]
Maturity status: Test
(0112046)
hudsonbot   
2019-05-21 15:17   
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/9b8f37d9d85e [^]
Maturity status: Test
(0112113)
alostale   
2019-05-24 10:31   
reviewed + tested