Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030815Openbravo ERP04. Warehouse managementpublic2015-09-14 12:562016-02-17 11:38
VictorVillar 
vmromanos 
urgentmajoralways
closedfixed 
5
pi 
3.0PR16Q1 
dmiguelez
Core
No
0030815: It should not be possible to define the Costing background process for Organizations not Legal
It should not be possible to define the Costing background process for Organizations not Legal
As Admin role,
  Go to Process Request window:
     create a new register for España Región Norte.

This is wrong behavior which could cause inconsistent cost values. It should be possible only for Legals or any ancestor (not children organizations)
Define an EntityEventObserver to avoid saving (insert and update) the record when the process is the Costing background and the organization has an ancestor which is a legal entity

Add a similar validation in the costing background process itself for the context organization
No tags attached.
depends on backport 00310883.0PR15Q4 closed vmromanos It should not be possible to define the Costing background process for Organizations not Legal 
Issue History
2015-09-14 12:56VictorVillarNew Issue
2015-09-14 12:56VictorVillarAssigned To => Triage Finance
2015-09-14 12:56VictorVillarModules => Core
2015-09-14 12:56VictorVillarResolution time => 1444687200
2015-09-14 12:56VictorVillarTriggers an Emergency Pack => No
2015-09-14 12:56VictorVillarIssue Monitored: networkb
2015-09-14 17:09vmromanosProposed Solution updated
2015-09-28 11:17vmromanosTarget Version3.0PR15Q4 => 3.0PR16Q1
2015-09-29 13:56vmromanosStatusnew => feedback
2015-09-29 17:09vmromanosAssigned ToTriage Finance => vmromanos
2015-09-29 17:09vmromanosStatusfeedback => scheduled
2015-09-29 17:09vmromanosSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=9519#r9519
2015-09-29 17:09vmromanosProposed Solution updated
2015-09-30 16:23vmromanosNote Added: 0080754
2015-10-01 13:39psanjuanNote Edited: 0080754bug_revision_view_page.php?bugnote_id=0080754#r9568
2015-10-01 14:08psanjuanNote Added: 0080788
2015-10-07 16:47hgbotCheckin
2015-10-07 16:47hgbotNote Added: 0080864
2015-10-07 16:47hgbotStatusscheduled => resolved
2015-10-07 16:47hgbotResolutionopen => fixed
2015-10-07 16:47hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/9bcc5cdaf9996b5bb29aee3422f66f79c589f039 [^]
2015-10-07 16:49dmiguelezStatusresolved => new
2015-10-07 16:49dmiguelezResolutionfixed => open
2015-10-07 16:49dmiguelezStatusnew => scheduled
2015-10-07 16:49dmiguelezStatusscheduled => resolved
2015-10-07 16:49dmiguelezResolutionopen => fixed
2015-10-07 16:50dmiguelezReview Assigned To => dmiguelez
2015-10-07 16:50dmiguelezNote Added: 0080865
2015-10-07 16:50dmiguelezStatusresolved => closed
2015-11-23 21:16hudsonbotCheckin
2015-11-23 21:16hudsonbotNote Added: 0082116

Notes
(0080754)
vmromanos   
2015-09-30 16:23   
(edited on: 2015-10-01 13:39)
Test plan:

As F&B International Group Admin

 In an environment without the fix:
  Go to Process request
   Create a new record
   Select España Región Norte org
   Select Costing Background Process.
   Save it.
  
 Now apply the fix and continue with the testing

 Go to Process request
 Create a new record
 Select España Región Norte org
 Select Costing Background Process
 Try to save. An error is displayed

 Select España org
 Try to save. Verify you can save it

 Create a new record
 Select FB Group org
 Select Costing Background Process
 Try to save. Verify you can save it

 Create a new record
 Select * org
 Select Costing Background Process
 Try to save. Verify you can save it

 Create a new record
 Select España Región Norte org
 Select Log Cleanup Process
 Try to save. Verify you can save it

 Go to Process Group
 Create a new record. Org *, Name="GR"
 Go to Process Group List
  Create a new record. Select Costing Background Process. Save it

 Go to Process request
 Create a new record
 Select España Región Norte org
 Select Group flag.
 Select previous GR group
 Try to save. An error is displayed

 Change the organization to FB España.
 Try to save. Verify you can save it


 Search for the Process Request created at the beginning of the test plan before applying the fix.
 Set Run immediately
 Schedule the process.
 Verify an error is shown in the Process Monitor.

(0080788)
psanjuan   
2015-10-01 14:08   
Test Plan above verified.

Issue can be closed after tech review.
(0080864)
hgbot   
2015-10-07 16:47   
Repository: erp/devel/pi
Changeset: 9bcc5cdaf9996b5bb29aee3422f66f79c589f039
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Wed Sep 30 16:13:10 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/9bcc5cdaf9996b5bb29aee3422f66f79c589f039 [^]

Fixed bug 30815: Scheduled Organization for Costing background process

The Costing Background Process should only be scheduled for a legal entity or any of its ancestor.

The fix adds a validation in both the ProcessRequestEventHandler, so each time a record is saved/updated the validation is run, and in the CostingBackground class itself to control wrong process request scheduled before this validation.

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M src/org/openbravo/costing/CostingBackground.java
M src/org/openbravo/costing/CostingUtils.java
M src/org/openbravo/event/ProcessRequestEventHandler.java
---
(0080865)
dmiguelez   
2015-10-07 16:50   
Code Review + Testing Ok
(0082116)
hudsonbot   
2015-11-23 21:16   
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/7b56bebaaa88 [^]
Maturity status: Test